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 I18nUtils
I18n Utilsprotected WorkflowHelper
The workflow helperprotected WorkflowStepDAO
The workflow step DAOFields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
_getActionLabel
(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 actionId) 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 void
Set common plantUML svg propertiesvoid
generate()
void
service
(ServiceManager serviceManager) Methods inherited from class org.apache.cocoon.reading.AbstractReader
getLastModified, getMimeType, 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:
-
_workflowHelper
The workflow helper -
_i18nUtils
I18n Utils -
_workflowStepDAO
The workflow step DAO
-
-
Constructor Details
-
AbstractPlantUMLSVGReader
public AbstractPlantUMLSVGReader()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
generate
- Specified by:
generate
in interfaceReader
- Throws:
IOException
SAXException
ProcessingException
-
_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
Get js function to send selection- Parameters:
workflowName
- unique name of current workflowstepId
- current or incoming step's idactionId
- current action's, 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
Get the action label for node- Parameters:
action
- 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
-