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 I18nHelperThe i18n workflow helperprotected I18nUtilsI18n Utilsprotected JSONUtilsThe JSON Utilsprotected WorflowRightHelperThe workflow right helperprotected WorkflowSessionHelperThe workflow session helperprotected WorkflowStepDAOThe workflow step DAOprotected WorkflowTransitionDAOThe workflow transition DAOFields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source -
Constructor Summary
Constructors -
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 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 String_getStringWithEscapedSpace(String stringToEscape) Get the string with escaped spacesprotected void_setContextInRequestAttributes(Request request) Set all context parameters separatly in requestprotected 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:
-
_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:
servicein interfaceServiceable- Throws:
ServiceException
-
generate
- Specified by:
generatein interfaceReader- Throws:
IOExceptionSAXExceptionProcessingException
-
_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
-