Class AbstractPlantUMLSVGReader
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.reading.AbstractReader
org.ametys.plugins.workflow.readers.AbstractPlantUMLSVGReader
- All Implemented Interfaces:
Poolable
,Recyclable
,Component
,LogEnabled
,Serviceable
,Reader
,SitemapModelComponent
,SitemapOutputComponent
- Direct Known Subclasses:
AbstractPlantUMLMindmapSVGReader
,PlantUMLSVGReader
Abstract class for reading PlantUML SVG
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
The color for step nodesprotected I18nHelper
The i18n workflow helperprotected I18nUtils
I18n Utilsprotected JSONUtils
The JSON Utilsprotected WorflowRightHelper
The workflow right helperprotected WorkflowSessionHelper
The workflow session helperprotected WorkflowStepDAO
The workflow step DAOprotected WorkflowTransitionDAO
The workflow transition DAOFields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getActionLabel
(String workflowName, com.opensymphony.workflow.loader.ActionDescriptor action) Get the action label for nodeprotected String
_getActionTooltip
(com.opensymphony.workflow.loader.ActionDescriptor action) Get the tooltip for a link on actionprotected String
_getJsFunction
(String workflowName, String stepId, String stepLabel, String actionId, String actionLabel) Get js function to send selectionprotected String
_getPlantUMLContent
(Request request, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor) Get the PlantUML SVG content to readprotected abstract String
_getPlantUMLGraphContent
(Request request, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor) Get the plantUML diagram bodyprotected abstract String
Get plantUML style for current diagramprotected abstract String
Get the diagram typeprotected String
_getStepNodeLabel
(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, int stepId) Get the node label for stepprotected String
_getStepTooltip
(com.opensymphony.workflow.loader.StepDescriptor step) Get the tooltip for a link on stepprotected String
_getStringWithEscapedSpace
(String stringToEscape) Get the string with escaped spacesprotected void
_setContextInRequestAttributes
(Request request) Set all context parameters separatly in requestprotected void
Set common plantUML svg propertiesvoid
generate()
void
service
(ServiceManager serviceManager) Methods inherited from class org.apache.cocoon.reading.AbstractReader
getLastModified, recycle, setOutputStream, setup, shouldSetContentLength
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Field Details
-
__MAIN_STEP_NODE_COLOR
The color for step nodes- See Also:
-
_i18nUtils
I18n Utils -
_i18nHelper
The i18n workflow helper -
_workflowSessionHelper
The workflow session helper -
_workflowStepDAO
The workflow step DAO -
_workflowTransitionDAO
The workflow transition DAO -
_workflowRightHelper
The workflow right helper -
_jsonUtils
The JSON Utils
-
-
Constructor Details
-
AbstractPlantUMLSVGReader
public AbstractPlantUMLSVGReader()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
getMimeType
- Specified by:
getMimeType
in interfaceSitemapOutputComponent
- Overrides:
getMimeType
in classAbstractReader
-
generate
- Specified by:
generate
in interfaceReader
- Throws:
IOException
SAXException
ProcessingException
-
_setContextInRequestAttributes
Set all context parameters separatly in request- Parameters:
request
- the request
-
_setPlantUMLProperties
Set common plantUML svg properties -
_getPlantUMLContent
protected String _getPlantUMLContent(Request request, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor) Get the PlantUML SVG content to read- Parameters:
request
- the requestworkflowDescriptor
- descriptor of current workflow- Returns:
- The content to read
-
_getPlantUMLType
Get the diagram type- Returns:
- the diagram type
-
_getPlantUMLStyle
Get plantUML style for current diagram- Returns:
- the style as string
-
_getPlantUMLGraphContent
protected abstract String _getPlantUMLGraphContent(Request request, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor) Get the plantUML diagram body- Parameters:
request
- the requestworkflowDescriptor
- descriptor of current workflow- Returns:
- the diagram body as string
-
_getJsFunction
protected String _getJsFunction(String workflowName, String stepId, String stepLabel, String actionId, String actionLabel) Get js function to send selection- Parameters:
workflowName
- unique name of current workflowstepId
- current or incoming step's idstepLabel
- current or incoming step's labelactionId
- current action's id, can be nullactionLabel
- current action's label, can be null- Returns:
- the js function
-
_getStepNodeLabel
protected String _getStepNodeLabel(com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor, int stepId) Get the node label for step- Parameters:
workflowDescriptor
- current workflowstepId
- current step id- Returns:
- the node label which is the translated step name and its id
-
_getStepTooltip
Get the tooltip for a link on step- Parameters:
step
- current step- Returns:
- the tooltip
-
_getActionLabel
protected String _getActionLabel(String workflowName, com.opensymphony.workflow.loader.ActionDescriptor action) Get the action label for node- Parameters:
workflowName
- the workflow's unique nameaction
- current action- Returns:
- the label as action's name and id
-
_getActionTooltip
Get the tooltip for a link on action- Parameters:
action
- current action- Returns:
- the tooltip
-
_getStringWithEscapedSpace
Get the string with escaped spaces- Parameters:
stringToEscape
- a string to process for js function- Returns:
- the formated string
-