Package com.beaglesecurity.client
Class BeagleSecurityClientBase
- java.lang.Object
-
- com.beaglesecurity.client.BeagleSecurityClientBase
-
- Direct Known Subclasses:
BeagleSecurityClientImpl
public abstract class BeagleSecurityClientBase extends Object
-
-
Constructor Summary
Constructors Constructor Description BeagleSecurityClientBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <T> TconvertJsonToObject(String json, Class<T> type)Convert a json string to object given as typeprotected voidhandleCommonExceptions(int errorCode)Generate common exceptions based or REST API return code
-
-
-
Field Detail
-
baseUrl
protected static final String baseUrl
- See Also:
- Constant Field Values
-
token
protected String token
-
-
Method Detail
-
convertJsonToObject
protected <T> T convertJsonToObject(String json, Class<T> type)
Convert a json string to object given as type
- Type Parameters:
T- passing class type- Parameters:
json- string to convert as objecttype- the type to which the json string needs to convert- Returns:
- Converted json object
-
handleCommonExceptions
protected void handleCommonExceptions(int errorCode)
Generate common exceptions based or REST API return code
- Parameters:
errorCode- is the code for generating custom exception- Throws:
GeneralAPIException- General exceptions.UnAuthorizedException- No permission to view the applicationForbiddenException- ForbiddenInternalServerErrorException- Internal server error
-
-