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 class
RestClientBase.Method
-
Field Summary
Fields Modifier and Type Field Description protected List<String>
children
protected jakarta.ws.rs.client.Client
client
protected Map<String,Object>
entityValues
protected String
message
protected RestClientBase
parent
protected static String
RESPONSE_TYPE
protected int
status
-
Constructor Summary
Constructors Modifier Constructor Description protected
RestClientBase(jakarta.ws.rs.client.Client c, RestClientBase p)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
delete()
RestResponse
execute(RestClientBase.Method method, String endpoint, boolean needsMultiPart)
RestResponse
execute(RestClientBase.Method method, String endPoint, Map<String,Object> payload)
RestResponse
execute(RestClientBase.Method method, String endPoint, Map<String,Object> payload, boolean needsMultiPart)
protected void
getChildren(Map<String,Object> responseMap)
protected Map<String,String>
getEntityMetadata(Map<String,Object> extraProperties)
protected void
getEntityValues(Map<String,Object> responseMap)
String
getMessage()
protected RestClientBase
getParent()
protected String
getRestUrl()
protected abstract String
getSegment()
int
getStatus()
protected <T> T
getValue(String key, Class<T> clazz)
protected void
initialize()
protected boolean
isNew()
protected boolean
isSuccess(jakarta.ws.rs.core.Response response)
boolean
save()
protected void
setIsNew()
protected <T> void
setValue(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)
-
-