public abstract class RestHandler extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
RestHandler.AuthData
Handles encoding/decoding of agent and timestamp data
|
| Modifier and Type | Field and Description |
|---|---|
static String |
COOKIENAME |
static String |
PASSWORD |
static String |
USERNAME |
| Constructor and Description |
|---|
RestHandler() |
| Modifier and Type | Method and Description |
|---|---|
AgentPath |
checkAuthCookie(javax.ws.rs.core.Cookie authCookie)
Authorisation data is decrypted from the cookie
|
protected RestHandler.AuthData |
decryptAuthData(String authData) |
protected String |
encryptAuthData(RestHandler.AuthData auth) |
AgentProxy |
getAgent(String agentName,
javax.ws.rs.core.Cookie authCookie)
AgentProxy is resolved either from cookie or from the name.
|
AgentProxy |
getAgent(String agentName,
String authData)
AgentProxy is resolved either from authorisation data or from the name.
|
Map<String,Object> |
getPagedResult(javax.ws.rs.core.UriInfo uri,
int start,
int batchSize,
int totalRows,
List<?> rows)
Constructs the Map containing all data describing a PagedResult.
|
List<Property> |
getPropertiesFromQParams(String search)
Converts QueryParams to Item Properties
|
protected Map<String,Object> |
makeItemDomainPathsData(ItemPath ip) |
javax.ws.rs.core.Response |
toJSON(Object data) |
public static final String COOKIENAME
public static final String USERNAME
public static final String PASSWORD
protected RestHandler.AuthData decryptAuthData(String authData) throws InvalidAgentPathException, IllegalBlockSizeException, BadPaddingException, InvalidDataException
authData - InvalidAgentPathExceptionIllegalBlockSizeExceptionBadPaddingExceptionInvalidDataExceptionprotected String encryptAuthData(RestHandler.AuthData auth) throws IllegalBlockSizeException, BadPaddingException
auth - IllegalBlockSizeExceptionBadPaddingExceptionpublic javax.ws.rs.core.Response toJSON(Object data)
public AgentPath checkAuthCookie(javax.ws.rs.core.Cookie authCookie)
authCookie - the cookie sent by the clientpublic AgentProxy getAgent(String agentName, javax.ws.rs.core.Cookie authCookie)
agentName - the name of the AgentauthCookie - the cookie sent by the clientpublic AgentProxy getAgent(String agentName, String authData)
agentName - the name of the AgentauthData - authorisation data (from cookie or token)public Map<String,Object> getPagedResult(javax.ws.rs.core.UriInfo uri, int start, int batchSize, int totalRows, List<?> rows)
uri - The resource URI which is used to create pervPage and nextPage URLstart - the start index of the result set to be retrievedbatchSize - the size of the result set to be retrievedtotalRows - the total number of rows in the result setrows - the actual rowspublic List<Property> getPropertiesFromQParams(String search)
search - the string to decompose in the format: name,prop:val,prop:valCopyright © 1997–2019 CRISTAL-iSE. All rights reserved.