public abstract class ItemUtils extends RestHandler
RestHandler.AuthData| Modifier and Type | Field and Description |
|---|---|
protected static String |
PREDEFINED_PATH |
COOKIENAME, PASSWORD, USERNAME| Constructor and Description |
|---|
ItemUtils() |
| Modifier and Type | Method and Description |
|---|---|
static javax.ws.rs.WebApplicationException |
createWebAppException(String msg)
Creates a WebApplicationException response from a simple text message.
|
static javax.ws.rs.WebApplicationException |
createWebAppException(String msg,
Exception ex,
javax.ws.rs.core.Response.Status status)
Creates a WebApplicationException response from a simple text message, exception and status
|
static javax.ws.rs.WebApplicationException |
createWebAppException(String msg,
javax.ws.rs.core.Response.Status status)
Creates a WebApplicationException response from a simple text message and status
|
ArrayList<LinkedHashMap<String,Object>> |
enumerate(ItemProxy item,
ClusterType cluster,
String uriPath,
javax.ws.rs.core.UriInfo uri) |
ArrayList<LinkedHashMap<String,Object>> |
enumerate(ItemProxy item,
String dataPath,
String uriPath,
javax.ws.rs.core.UriInfo uri) |
protected String |
executeJob(ItemProxy item,
String postData,
List<String> types,
String actPath,
String transition,
AgentProxy agent) |
protected String |
executePredefinedStep(ItemProxy item,
String postData,
List<String> types,
String actPath,
AgentProxy agent) |
protected ArrayList<LinkedHashMap<String,Object>> |
getAllViewpoints(ItemProxy item,
javax.ws.rs.core.UriInfo uri) |
protected String |
getItemName(ItemPath ip) |
static List<String> |
getItemNames(Property... props) |
protected static URI |
getItemURI(javax.ws.rs.core.UriInfo uri,
ItemPath item,
Object... path) |
protected static URI |
getItemURI(javax.ws.rs.core.UriInfo uri,
ItemProxy item,
Object... path) |
protected static URI |
getItemURI(javax.ws.rs.core.UriInfo uri,
Object... segments) |
protected static URI |
getItemURI(javax.ws.rs.core.UriInfo uri,
UUID item,
Object... path) |
protected LinkedHashMap<String,Object> |
getJobActivityData(Job job,
String itemName,
javax.ws.rs.core.UriInfo uri) |
protected LinkedHashMap<String,Object> |
getJobItemData(Job job,
String itemName,
javax.ws.rs.core.UriInfo uri) |
protected LinkedHashMap<String,Object> |
getJobOutcomeData(Job job,
String itemName,
javax.ws.rs.core.UriInfo uri) |
protected LinkedHashMap<String,Object> |
getJobTransitionData(Job job,
String itemName,
javax.ws.rs.core.UriInfo uri) |
javax.ws.rs.core.Response |
getOutcome(String uuid,
String schema,
int version,
int eventId,
boolean json) |
protected javax.ws.rs.core.Response |
getOutcomeResponse(Outcome oc,
boolean json)
Creates Response with without any specific header.
|
protected javax.ws.rs.core.Response |
getOutcomeResponse(Outcome oc,
Date eventDate,
boolean json)
Creates Response with header 'Last-Modified:
|
protected javax.ws.rs.core.Response |
getOutcomeResponse(Outcome oc,
Event ev,
boolean json) |
protected static ArrayList<LinkedHashMap<String,String>> |
getPropertySummary(ItemProxy item) |
protected static ItemProxy |
getProxy(String uuid) |
javax.ws.rs.core.Response |
getViewpointOutcome(String uuid,
String schema,
String viewName,
boolean json) |
protected LinkedHashMap<String,Object> |
makeCollectionData(Collection<?> coll,
javax.ws.rs.core.UriInfo uri) |
protected LinkedHashMap<String,Object> |
makeEventData(Event ev,
javax.ws.rs.core.UriInfo uri) |
protected void |
makeItemDomainPathsData(ItemPath ip,
Map<String,Object> jsonRoot) |
protected LinkedHashMap<String,Object> |
makeJobData(Job job,
String itemName,
javax.ws.rs.core.UriInfo uri) |
static boolean |
produceJSON(List<javax.ws.rs.core.MediaType> types)
Check if the requested media type should be a JSON or XML
|
checkAuthCookie, encryptAuthData, getAgent, getAgent, getPagedResult, getPropertiesFromQParams, toJSONprotected static final String PREDEFINED_PATH
protected static URI getItemURI(javax.ws.rs.core.UriInfo uri, ItemProxy item, Object... path)
protected static URI getItemURI(javax.ws.rs.core.UriInfo uri, ItemPath item, Object... path)
protected static ArrayList<LinkedHashMap<String,String>> getPropertySummary(ItemProxy item) throws ObjectNotFoundException
ObjectNotFoundExceptionpublic javax.ws.rs.core.Response getViewpointOutcome(String uuid, String schema, String viewName, boolean json)
public javax.ws.rs.core.Response getOutcome(String uuid, String schema, int version, int eventId, boolean json)
public ArrayList<LinkedHashMap<String,Object>> enumerate(ItemProxy item, ClusterType cluster, String uriPath, javax.ws.rs.core.UriInfo uri)
public ArrayList<LinkedHashMap<String,Object>> enumerate(ItemProxy item, String dataPath, String uriPath, javax.ws.rs.core.UriInfo uri)
protected ArrayList<LinkedHashMap<String,Object>> getAllViewpoints(ItemProxy item, javax.ws.rs.core.UriInfo uri)
protected javax.ws.rs.core.Response getOutcomeResponse(Outcome oc, boolean json)
oc - the Outcome to convertjson - produce json or xmlprotected javax.ws.rs.core.Response getOutcomeResponse(Outcome oc, Date eventDate, boolean json)
oc - the Outcome to convertjson - produce json or xmlprotected javax.ws.rs.core.Response getOutcomeResponse(Outcome oc, Event ev, boolean json)
protected LinkedHashMap<String,Object> makeEventData(Event ev, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> makeJobData(Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> getJobItemData(Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> getJobActivityData(Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> getJobTransitionData(Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> getJobOutcomeData(Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> makeCollectionData(Collection<?> coll, javax.ws.rs.core.UriInfo uri)
public static javax.ws.rs.WebApplicationException createWebAppException(String msg)
msg - text messagepublic static javax.ws.rs.WebApplicationException createWebAppException(String msg, javax.ws.rs.core.Response.Status status)
msg - text messagestatus - HTTP status of the responsepublic static javax.ws.rs.WebApplicationException createWebAppException(String msg, Exception ex, javax.ws.rs.core.Response.Status status)
msg - text messageex - exceptionstatus - HTTP status of the responsepublic static boolean produceJSON(List<javax.ws.rs.core.MediaType> types)
types - the media types requested by the clientprotected void makeItemDomainPathsData(ItemPath ip, Map<String,Object> jsonRoot)
ip - jsonRoot - protected String executePredefinedStep(ItemProxy item, String postData, List<String> types, String actPath, AgentProxy agent) throws ObjectNotFoundException, InvalidDataException, OutcomeBuilderException, AccessRightsException, InvalidTransitionException, PersistencyException, ObjectAlreadyExistsException, InvalidCollectionModification
item - postData - types - actPath - agent - ObjectNotFoundExceptionInvalidDataExceptionOutcomeBuilderExceptionAccessRightsExceptionInvalidTransitionExceptionPersistencyExceptionObjectAlreadyExistsExceptionInvalidCollectionModificationprotected String executeJob(ItemProxy item, String postData, List<String> types, String actPath, String transition, AgentProxy agent) throws AccessRightsException, ObjectNotFoundException, PersistencyException, InvalidDataException, OutcomeBuilderException, InvalidTransitionException, ObjectAlreadyExistsException, InvalidCollectionModification, ScriptErrorException
item - postData - types - actPath - transition - agent - AccessRightsExceptionObjectNotFoundExceptionPersistencyExceptionInvalidDataExceptionOutcomeBuilderExceptionInvalidTransitionExceptionObjectAlreadyExistsExceptionInvalidCollectionModificationScriptErrorExceptionCopyright © 1997–2019 CRISTAL-iSE. All rights reserved.