com.atlassian.bamboo.plugins.stash.rest.entity.stash
Class StashRestResponse

java.lang.Object
  extended by com.atlassian.bamboo.plugins.stash.rest.entity.stash.StashRestResponse

public class StashRestResponse
extends java.lang.Object

Encapsulation of a REST response from Stash. If Stash is playing nice you will get any errors marshalled into a nice object for you. Also a json formatted response should also hopefully be marshalled into


Nested Class Summary
static class StashRestResponse.StashRestResponseBuilder
           
 
Field Summary
 java.lang.String body
           
 com.google.gson.JsonElement entity
           
 StashErrors errors
           
 int statusCode
           
 java.lang.String statusMessage
           
 
Constructor Summary
StashRestResponse(int statusCode, java.lang.String statusMessage, StashErrors errors, java.lang.String body, com.google.gson.JsonElement entity)
           
StashRestResponse(javax.ws.rs.core.Response.Status status, java.lang.String errorMessage)
           
StashRestResponse(java.lang.String errorMessage)
           
 
Method Summary
 boolean hasErrors()
           
 boolean isSuccesfull()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

statusCode

@NotNull
public final int statusCode

statusMessage

@Nullable
public final java.lang.String statusMessage

errors

@Nullable
public final StashErrors errors

body

@Nullable
public final java.lang.String body

entity

@Nullable
public final com.google.gson.JsonElement entity
Constructor Detail

StashRestResponse

public StashRestResponse(java.lang.String errorMessage)

StashRestResponse

public StashRestResponse(javax.ws.rs.core.Response.Status status,
                         java.lang.String errorMessage)

StashRestResponse

public StashRestResponse(int statusCode,
                         java.lang.String statusMessage,
                         StashErrors errors,
                         java.lang.String body,
                         com.google.gson.JsonElement entity)
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hasErrors

public boolean hasErrors()

isSuccesfull

public boolean isSuccesfull()


Copyright © 2014 Atlassian Software Systems Pty Ltd. All Rights Reserved.