Package org.glassfish.admin.rest.client
Class RestClientBase
- java.lang.Object
-
- org.glassfish.admin.rest.client.RestClientBase
-
- Direct Known Subclasses:
RestLeaf,RestLeafCollection
public abstract class RestClientBase extends Object
- Author:
- jasonlee
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRestClientBase.Method
-
Field Summary
Fields Modifier and Type Field Description protected List<String>childrenprotected jakarta.ws.rs.client.Clientclientprotected Map<String,Object>entityValuesprotected Stringmessageprotected RestClientBaseparentprotected static StringRESPONSE_TYPEprotected intstatus
-
Constructor Summary
Constructors Modifier Constructor Description protectedRestClientBase(jakarta.ws.rs.client.Client c, RestClientBase p)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleandelete()RestResponseexecute(RestClientBase.Method method, String endpoint, boolean needsMultiPart)RestResponseexecute(RestClientBase.Method method, String endPoint, Map<String,Object> payload)RestResponseexecute(RestClientBase.Method method, String endPoint, Map<String,Object> payload, boolean needsMultiPart)protected voidgetChildren(Map<String,Object> responseMap)protected Map<String,String>getEntityMetadata(Map<String,Object> extraProperties)protected voidgetEntityValues(Map<String,Object> responseMap)StringgetMessage()protected RestClientBasegetParent()protected StringgetRestUrl()protected abstract StringgetSegment()intgetStatus()protected <T> TgetValue(String key, Class<T> clazz)protected voidinitialize()protected booleanisNew()protected booleanisSuccess(jakarta.ws.rs.core.Response response)booleansave()protected voidsetIsNew()protected <T> voidsetValue(String key, T value)
-
-
-
Field Detail
-
RESPONSE_TYPE
protected static final String RESPONSE_TYPE
- See Also:
- Constant Field Values
-
status
protected int status
-
message
protected String message
-
client
protected jakarta.ws.rs.client.Client client
-
parent
protected RestClientBase parent
-
-
Constructor Detail
-
RestClientBase
protected RestClientBase(jakarta.ws.rs.client.Client c, RestClientBase p)
-
-
Method Detail
-
getParent
protected RestClientBase getParent()
-
getRestUrl
protected String getRestUrl()
-
getSegment
protected abstract String getSegment()
-
getStatus
public int getStatus()
-
getMessage
public String getMessage()
-
save
public boolean save()
-
delete
public boolean delete()
-
execute
public RestResponse execute(RestClientBase.Method method, String endpoint, boolean needsMultiPart)
-
execute
public RestResponse execute(RestClientBase.Method method, String endPoint, Map<String,Object> payload)
-
execute
public RestResponse execute(RestClientBase.Method method, String endPoint, Map<String,Object> payload, boolean needsMultiPart)
-
isSuccess
protected boolean isSuccess(jakarta.ws.rs.core.Response response)
-
isNew
protected boolean isNew()
-
setIsNew
protected void setIsNew()
-
initialize
protected void initialize()
-
setValue
protected <T> void setValue(String key, T value)
-
getEntityMetadata
protected Map<String,String> getEntityMetadata(Map<String,Object> extraProperties)
-
-