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(org.cristalise.kernel.entity.proxy.ItemProxy item,
org.cristalise.kernel.persistency.ClusterType cluster,
String uriPath,
javax.ws.rs.core.UriInfo uri) |
ArrayList<LinkedHashMap<String,Object>> |
enumerate(org.cristalise.kernel.entity.proxy.ItemProxy item,
String dataPath,
String uriPath,
javax.ws.rs.core.UriInfo uri) |
protected String |
executeJob(org.cristalise.kernel.entity.proxy.ItemProxy item,
String postData,
List<String> types,
String actPath,
String transition,
org.cristalise.kernel.entity.proxy.AgentProxy agent) |
protected String |
executePredefinedStep(org.cristalise.kernel.entity.proxy.ItemProxy item,
String postData,
List<String> types,
String actPath,
org.cristalise.kernel.entity.proxy.AgentProxy agent) |
protected ArrayList<LinkedHashMap<String,Object>> |
getAllViewpoints(org.cristalise.kernel.entity.proxy.ItemProxy item,
javax.ws.rs.core.UriInfo uri) |
protected String |
getItemName(org.cristalise.kernel.lookup.ItemPath ip) |
static List<String> |
getItemNames(org.cristalise.kernel.property.Property... props) |
protected static URI |
getItemURI(javax.ws.rs.core.UriInfo uri,
org.cristalise.kernel.lookup.ItemPath item,
Object... path) |
protected static URI |
getItemURI(javax.ws.rs.core.UriInfo uri,
org.cristalise.kernel.entity.proxy.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(org.cristalise.kernel.entity.agent.Job job,
String itemName,
javax.ws.rs.core.UriInfo uri) |
protected LinkedHashMap<String,Object> |
getJobItemData(org.cristalise.kernel.entity.agent.Job job,
String itemName,
javax.ws.rs.core.UriInfo uri) |
protected LinkedHashMap<String,Object> |
getJobOutcomeData(org.cristalise.kernel.entity.agent.Job job,
String itemName,
javax.ws.rs.core.UriInfo uri) |
protected LinkedHashMap<String,Object> |
getJobTransitionData(org.cristalise.kernel.entity.agent.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(org.cristalise.kernel.persistency.outcome.Outcome oc,
boolean json)
Creates Response with without any specific header.
|
protected javax.ws.rs.core.Response |
getOutcomeResponse(org.cristalise.kernel.persistency.outcome.Outcome oc,
Date eventDate,
boolean json)
Creates Response with header 'Last-Modified:
|
protected javax.ws.rs.core.Response |
getOutcomeResponse(org.cristalise.kernel.persistency.outcome.Outcome oc,
org.cristalise.kernel.events.Event ev,
boolean json) |
protected static ArrayList<LinkedHashMap<String,String>> |
getPropertySummary(org.cristalise.kernel.entity.proxy.ItemProxy item) |
protected static org.cristalise.kernel.entity.proxy.ItemProxy |
getProxy(String uuid) |
javax.ws.rs.core.Response |
getViewpointOutcome(String uuid,
String schema,
String viewName,
boolean json) |
protected LinkedHashMap<String,Object> |
makeCollectionData(org.cristalise.kernel.collection.Collection<?> coll,
javax.ws.rs.core.UriInfo uri) |
protected LinkedHashMap<String,Object> |
makeEventData(org.cristalise.kernel.events.Event ev,
javax.ws.rs.core.UriInfo uri) |
protected void |
makeItemDomainPathsData(org.cristalise.kernel.lookup.ItemPath ip,
Map<String,Object> jsonRoot) |
protected LinkedHashMap<String,Object> |
makeJobData(org.cristalise.kernel.entity.agent.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, org.cristalise.kernel.entity.proxy.ItemProxy item, Object... path)
protected static URI getItemURI(javax.ws.rs.core.UriInfo uri, org.cristalise.kernel.lookup.ItemPath item, Object... path)
protected static ArrayList<LinkedHashMap<String,String>> getPropertySummary(org.cristalise.kernel.entity.proxy.ItemProxy item) throws org.cristalise.kernel.common.ObjectNotFoundException
org.cristalise.kernel.common.ObjectNotFoundExceptionprotected static org.cristalise.kernel.entity.proxy.ItemProxy getProxy(String uuid)
public 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(org.cristalise.kernel.entity.proxy.ItemProxy item, org.cristalise.kernel.persistency.ClusterType cluster, String uriPath, javax.ws.rs.core.UriInfo uri)
public ArrayList<LinkedHashMap<String,Object>> enumerate(org.cristalise.kernel.entity.proxy.ItemProxy item, String dataPath, String uriPath, javax.ws.rs.core.UriInfo uri)
protected ArrayList<LinkedHashMap<String,Object>> getAllViewpoints(org.cristalise.kernel.entity.proxy.ItemProxy item, javax.ws.rs.core.UriInfo uri)
protected javax.ws.rs.core.Response getOutcomeResponse(org.cristalise.kernel.persistency.outcome.Outcome oc,
boolean json)
oc - the Outcome to convertjson - produce json or xmlprotected javax.ws.rs.core.Response getOutcomeResponse(org.cristalise.kernel.persistency.outcome.Outcome oc,
Date eventDate,
boolean json)
oc - the Outcome to convertjson - produce json or xmlprotected javax.ws.rs.core.Response getOutcomeResponse(org.cristalise.kernel.persistency.outcome.Outcome oc,
org.cristalise.kernel.events.Event ev,
boolean json)
protected LinkedHashMap<String,Object> makeEventData(org.cristalise.kernel.events.Event ev, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> makeJobData(org.cristalise.kernel.entity.agent.Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> getJobItemData(org.cristalise.kernel.entity.agent.Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> getJobActivityData(org.cristalise.kernel.entity.agent.Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> getJobTransitionData(org.cristalise.kernel.entity.agent.Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected LinkedHashMap<String,Object> getJobOutcomeData(org.cristalise.kernel.entity.agent.Job job, String itemName, javax.ws.rs.core.UriInfo uri)
protected String getItemName(org.cristalise.kernel.lookup.ItemPath ip)
protected LinkedHashMap<String,Object> makeCollectionData(org.cristalise.kernel.collection.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 clientpublic static List<String> getItemNames(org.cristalise.kernel.property.Property... props)
type - protected void makeItemDomainPathsData(org.cristalise.kernel.lookup.ItemPath ip,
Map<String,Object> jsonRoot)
ip - jsonRoot - protected String executePredefinedStep(org.cristalise.kernel.entity.proxy.ItemProxy item, String postData, List<String> types, String actPath, org.cristalise.kernel.entity.proxy.AgentProxy agent) throws org.cristalise.kernel.common.ObjectNotFoundException, org.cristalise.kernel.common.InvalidDataException, org.cristalise.kernel.persistency.outcomebuilder.OutcomeBuilderException, org.cristalise.kernel.common.AccessRightsException, org.cristalise.kernel.common.InvalidTransitionException, org.cristalise.kernel.common.PersistencyException, org.cristalise.kernel.common.ObjectAlreadyExistsException, org.cristalise.kernel.common.InvalidCollectionModification
item - postData - types - actPath - agent - org.cristalise.kernel.common.ObjectNotFoundExceptionorg.cristalise.kernel.common.InvalidDataExceptionorg.cristalise.kernel.persistency.outcomebuilder.OutcomeBuilderExceptionorg.cristalise.kernel.common.AccessRightsExceptionorg.cristalise.kernel.common.InvalidTransitionExceptionorg.cristalise.kernel.common.PersistencyExceptionorg.cristalise.kernel.common.ObjectAlreadyExistsExceptionorg.cristalise.kernel.common.InvalidCollectionModificationprotected String executeJob(org.cristalise.kernel.entity.proxy.ItemProxy item, String postData, List<String> types, String actPath, String transition, org.cristalise.kernel.entity.proxy.AgentProxy agent) throws org.cristalise.kernel.common.AccessRightsException, org.cristalise.kernel.common.ObjectNotFoundException, org.cristalise.kernel.common.PersistencyException, org.cristalise.kernel.common.InvalidDataException, org.cristalise.kernel.persistency.outcomebuilder.OutcomeBuilderException, org.cristalise.kernel.common.InvalidTransitionException, org.cristalise.kernel.common.ObjectAlreadyExistsException, org.cristalise.kernel.common.InvalidCollectionModification, org.cristalise.kernel.scripting.ScriptErrorException
item - postData - types - actPath - transition - agent - org.cristalise.kernel.common.AccessRightsExceptionorg.cristalise.kernel.common.ObjectNotFoundExceptionorg.cristalise.kernel.common.PersistencyExceptionorg.cristalise.kernel.common.InvalidDataExceptionorg.cristalise.kernel.persistency.outcomebuilder.OutcomeBuilderExceptionorg.cristalise.kernel.common.InvalidTransitionExceptionorg.cristalise.kernel.common.ObjectAlreadyExistsExceptionorg.cristalise.kernel.common.InvalidCollectionModificationorg.cristalise.kernel.scripting.ScriptErrorExceptionCopyright © 2019 CRISTAL-iSE. All rights reserved.