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
FieldsModifier and TypeFieldDescriptionprotected static final StringThe color for step nodesprotected I18nUtilsI18n Utilsprotected WorkflowHelperThe workflow helperprotected WorkflowStepDAOThe workflow step DAOFields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source -
Constructor Summary
Constructors -
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 StringGet plantUML style for current diagramprotected abstract StringGet 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 voidSet common plantUML svg propertiesvoidgenerate()voidservice(ServiceManager serviceManager) Methods inherited from class org.apache.cocoon.reading.AbstractReader
getLastModified, getMimeType, recycle, setOutputStream, setup, shouldSetContentLengthMethods 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:
servicein interfaceServiceable- Throws:
ServiceException
-
generate
- Specified by:
generatein interfaceReader- Throws:
IOExceptionSAXExceptionProcessingException
-
_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
-