public abstract class ModelRequestHandler extends AbstractRequestHandler
Modifier and Type | Field and Description |
---|---|
protected static ModelManager |
modelManager |
protected static MonitoringUtils |
mu |
protected long |
startTime |
Constructor and Description |
---|
ModelRequestHandler() |
Modifier and Type | Method and Description |
---|---|
protected void |
addFolderStructure(SingleUser user,
org.w3c.dom.Document doc,
org.w3c.dom.Element parent) |
protected ProcessObjectComment |
createComment(java.lang.String id,
int version,
java.lang.String elementId,
LoginableUser user,
java.lang.String text) |
protected ProcessObjectComment |
createComment(java.lang.String modelId,
int version,
java.lang.String elementId,
RequestFacade req,
LoginableUser lu) |
protected JSONArray |
createCommentList(java.lang.String id,
int version,
java.lang.String elementId,
LoginableUser user) |
protected void |
createEdgeLabelPNGGraphics(ProcessEdge currentEdge,
ResponseFacade resp) |
protected org.w3c.dom.Document |
createEdgeList(ProcessModel currentModel,
java.lang.String prefix)
Create an XML-list of all edges contained in the given model
|
protected org.w3c.dom.Document |
createModelMetaData(ProcessModel currentModel,
java.lang.String requestUri,
AccessType access)
Create XML representation of the given model's meta data
|
protected void |
createModelPDF(ProcessModel model,
ResponseFacade resp) |
protected void |
createModelPNGGraphics(ProcessModel model,
ResponseFacade resp) |
protected void |
createModelXPDL(ProcessModel model,
ResponseFacade resp) |
protected void |
createModelXSD(ProcessModel model,
ResponseFacade resp) |
protected org.w3c.dom.Document |
createNodeList(ProcessModel currentModel,
java.lang.String prefix)
Create a list of all nodes belonging to the current model
|
protected void |
createNodePNGGraphics(java.lang.String nodeId,
ProcessModel model,
ResponseFacade resp) |
static java.lang.String |
getAbsoluteAddressPrefix(RequestFacade req) |
protected java.lang.String |
getCommentIdFromUri(java.lang.String requestUri) |
protected java.lang.String |
getNodeIdFromUri(java.lang.String requestUri)
Get the node ID from the given uri
|
java.lang.String |
parseModelIdFromRequestUri(java.lang.String requestUri)
Parse model id from request URI
|
protected int |
parseVersionFromRequestUri(java.lang.String requestUri)
Get the requested version from the request-URI
|
protected void |
respondWithModel(ProcessModel model,
ResponseFacade resp) |
protected void |
respondWithRepresentation(java.lang.String type,
ProcessModel model,
ResponseFacade resp) |
protected void |
retrieveCorrectRepresentation(ProcessModel model,
AccessType access,
java.lang.String requestUri,
RequestFacade req,
ResponseFacade resp) |
protected ProcessEdge |
retrieveProcessEdge(java.lang.String requestUri,
ProcessModel currentModel)
Retrieve the edge queried by the URI path
|
protected ProcessNode |
retrieveProcessNode(java.lang.String requestUri,
ProcessModel currentModel)
Retrieve the requested node by model and node ID given by the URI
|
protected org.w3c.dom.Document |
serializeObject(ProcessObject object) |
handleDeleteRequest, handleGetRequest, handlePostRequest, handlePutRequest
protected static ModelManager modelManager
protected long startTime
protected static MonitoringUtils mu
public java.lang.String parseModelIdFromRequestUri(java.lang.String requestUri)
requestUri
- the request URIprotected int parseVersionFromRequestUri(java.lang.String requestUri)
requestUri
- requested URIprotected org.w3c.dom.Document createNodeList(ProcessModel currentModel, java.lang.String prefix)
currentModel
- the current process modelprefix
- the base address of serverprotected org.w3c.dom.Document createEdgeList(ProcessModel currentModel, java.lang.String prefix)
currentModel
- the current modelprefix
- the base address of serverprotected java.lang.String getNodeIdFromUri(java.lang.String requestUri)
requestUri
- the uriprotected java.lang.String getCommentIdFromUri(java.lang.String requestUri)
protected ProcessNode retrieveProcessNode(java.lang.String requestUri, ProcessModel currentModel)
requestUri
- URI pathprotected ProcessEdge retrieveProcessEdge(java.lang.String requestUri, ProcessModel currentModel)
requestUri
- the URI pathcurrentModel
- the current modelprotected org.w3c.dom.Document serializeObject(ProcessObject object)
protected org.w3c.dom.Document createModelMetaData(ProcessModel currentModel, java.lang.String requestUri, AccessType access)
currentModel
- the current modelprotected void retrieveCorrectRepresentation(ProcessModel model, AccessType access, java.lang.String requestUri, RequestFacade req, ResponseFacade resp) throws java.io.IOException
java.io.IOException
protected void respondWithRepresentation(java.lang.String type, ProcessModel model, ResponseFacade resp) throws java.io.IOException
java.io.IOException
protected void createModelPNGGraphics(ProcessModel model, ResponseFacade resp) throws java.io.IOException
java.io.IOException
protected void createNodePNGGraphics(java.lang.String nodeId, ProcessModel model, ResponseFacade resp)
protected void createModelPDF(ProcessModel model, ResponseFacade resp) throws java.io.IOException
java.io.IOException
protected void createModelXPDL(ProcessModel model, ResponseFacade resp) throws java.io.IOException
java.io.IOException
protected void createModelXSD(ProcessModel model, ResponseFacade resp) throws java.io.IOException
java.io.IOException
protected JSONArray createCommentList(java.lang.String id, int version, java.lang.String elementId, LoginableUser user)
protected ProcessObjectComment createComment(java.lang.String modelId, int version, java.lang.String elementId, RequestFacade req, LoginableUser lu) throws java.lang.Exception
java.lang.Exception
protected ProcessObjectComment createComment(java.lang.String id, int version, java.lang.String elementId, LoginableUser user, java.lang.String text)
protected void createEdgeLabelPNGGraphics(ProcessEdge currentEdge, ResponseFacade resp) throws java.io.IOException
java.io.IOException
protected void addFolderStructure(SingleUser user, org.w3c.dom.Document doc, org.w3c.dom.Element parent)
protected void respondWithModel(ProcessModel model, ResponseFacade resp)
public static java.lang.String getAbsoluteAddressPrefix(RequestFacade req)