Class PlantUMLSVGReader
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.reading.AbstractReader
org.ametys.plugins.workflow.readers.AbstractPlantUMLSVGReader
org.ametys.plugins.workflow.readers.PlantUMLSVGReader
- All Implemented Interfaces:
Poolable
,Recyclable
,Component
,LogEnabled
,Serviceable
,Reader
,SitemapModelComponent
,SitemapOutputComponent
Serialize PlantUML state diagram
-
Field Summary
Fields inherited from class org.ametys.plugins.workflow.readers.AbstractPlantUMLSVGReader
__MAIN_STEP_NODE_COLOR, _i18nHelper, _i18nUtils, _jsonUtils, _workflowRightHelper, _workflowSessionHelper, _workflowStepDAO, _workflowTransitionDAO
Fields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_createState
(com.opensymphony.workflow.loader.WorkflowDescriptor workflow, com.opensymphony.workflow.loader.StepDescriptor step) Create new state in diagramprotected String
_createTransition
(com.opensymphony.workflow.loader.WorkflowDescriptor workflow, com.opensymphony.workflow.loader.StepDescriptor step, com.opensymphony.workflow.loader.ActionDescriptor transition) Create a new transition between two states in diagramprotected String
_getPlantUMLGraphContent
(Request request, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor) Get the plantUML diagram bodyprotected String
Get plantUML style for current diagramprotected String
Get the diagram typeprotected String
_getTransitionArrow
(String incomingState, String outgoingState, String label, String iconPath, String jsFunction, String linkTooltip, boolean isDashed) Get the transition arrow between 2 statesMethods inherited from class org.ametys.plugins.workflow.readers.AbstractPlantUMLSVGReader
_getActionLabel, _getActionTooltip, _getJsFunction, _getPlantUMLContent, _getStepNodeLabel, _getStepTooltip, _getStringWithEscapedSpace, _setContextInRequestAttributes, _setPlantUMLProperties, generate, getMimeType, service
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
-
Constructor Details
-
PlantUMLSVGReader
public PlantUMLSVGReader()
-
-
Method Details
-
_getPlantUMLType
Description copied from class:AbstractPlantUMLSVGReader
Get the diagram type- Specified by:
_getPlantUMLType
in classAbstractPlantUMLSVGReader
- Returns:
- the diagram type
-
_getPlantUMLStyle
Description copied from class:AbstractPlantUMLSVGReader
Get plantUML style for current diagram- Specified by:
_getPlantUMLStyle
in classAbstractPlantUMLSVGReader
- Returns:
- the style as string
-
_getPlantUMLGraphContent
protected String _getPlantUMLGraphContent(Request request, com.opensymphony.workflow.loader.WorkflowDescriptor workflowDescriptor) Description copied from class:AbstractPlantUMLSVGReader
Get the plantUML diagram body- Specified by:
_getPlantUMLGraphContent
in classAbstractPlantUMLSVGReader
- Parameters:
request
- the requestworkflowDescriptor
- descriptor of current workflow- Returns:
- the diagram body as string
-
_getTransitionArrow
protected String _getTransitionArrow(String incomingState, String outgoingState, String label, String iconPath, String jsFunction, String linkTooltip, boolean isDashed) Get the transition arrow between 2 states- Parameters:
incomingState
- state's id before transitionoutgoingState
- state's id after transitionlabel
- the transition's labeliconPath
- the transition's icon pathjsFunction
- the js function for sending current transition as selectionlinkTooltip
- the transition link's tooltipisDashed
- true if the arrow must be dashed- Returns:
- the transition arrow content
-
_createState
protected String _createState(com.opensymphony.workflow.loader.WorkflowDescriptor workflow, com.opensymphony.workflow.loader.StepDescriptor step) Create new state in diagram- Parameters:
workflow
- unique id of current workflowstep
- a step of the workflow- Returns:
- a string defining a plantUML state
-
_createTransition
protected String _createTransition(com.opensymphony.workflow.loader.WorkflowDescriptor workflow, com.opensymphony.workflow.loader.StepDescriptor step, com.opensymphony.workflow.loader.ActionDescriptor transition) Create a new transition between two states in diagram- Parameters:
workflow
- unique id of current workflowstep
- the initial step of this transitiontransition
- the current action- Returns:
- a string defining a plantUML transition
-