Class FcSwitchCaseBean
- java.lang.Object
-
- de.xima.fc.workflow.designer.bean.nodes.FcSwitchCaseBean
-
- All Implemented Interfaces:
IElementPropertiesBean<FcSwitchCaseProps,WorkflowNode>
,INodePropertiesBean<FcSwitchCaseProps>
,Serializable
@ViewScoped @Named public class FcSwitchCaseBean extends Object implements INodePropertiesBean<FcSwitchCaseProps>, Serializable
Bean for editing FORMCYCLEEWorkflowNodeType.FC_MULTIPLE_CONDITION
nodes.- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected LocaleBean
localeBean
-
Constructor Summary
Constructors Constructor Description FcSwitchCaseBean()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCaseValue()
Called when the user clicks on the add button to add a new condition.List<String>
completeCustomExpression(org.primefaces.extensions.event.CompleteEvent event)
Autocomplete method for the code mirror used to edit the custom boolean infix expression.protected static String
findNewVariableName(Set<String> names)
protected Set<String>
getAllVariables()
List<EMultipleConditionCombinationType>
getOrderedCombinationTypes()
List<EMatchCondition>
getOrderedMatchConditions()
void
lintCustomExpression()
Performs linting for the boolean infix expression the user has entered in the code mirror window.void
prepareViewForElement(IElementPropInitParams<FcSwitchCaseProps> params)
Called each time when the properties panel for a certain workflow element is loaded.void
removeCaseValue(int index)
Called when the user clicks on the remove button on a condition.void
updateCurrentProperties(IElementUpdateCurrentPropsParams<FcSwitchCaseProps> params)
Called each time when the data of the selected node was edited externally.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface de.xima.fc.interfaces.workflow.elements.IElementPropertiesBean
updateCurrentTask
-
Methods inherited from interface de.xima.fc.interfaces.workflow.nodes.INodePropertiesBean
retrieveCurrentProperties
-
-
-
-
Field Detail
-
localeBean
@Inject protected LocaleBean localeBean
-
-
Method Detail
-
addCaseValue
public void addCaseValue()
Called when the user clicks on the add button to add a new condition.
-
prepareViewForElement
public void prepareViewForElement(IElementPropInitParams<FcSwitchCaseProps> params) throws Exception
Description copied from interface:IElementPropertiesBean
Called each time when the properties panel for a certain workflow element is loaded. This method is passed the workflow element and the properties model, and should perform whatever initialization is necessary in order for the user to start editing the properties.- Specified by:
prepareViewForElement
in interfaceIElementPropertiesBean<FcSwitchCaseProps,WorkflowNode>
- Parameters:
params
- The current element to be edited and its properties. You may store a reference to these, modify them, and return them whenIElementPropertiesBean.retrieveCurrentProperties(Object)
is called.- Throws:
Exception
- When the initialization failed. If an exception is thrown, the user is shown an error indicating that the properties cannot be edited.
-
removeCaseValue
public void removeCaseValue(int index)
Called when the user clicks on the remove button on a condition.- Parameters:
index
- Index of the condition to remove.
-
updateCurrentProperties
public void updateCurrentProperties(IElementUpdateCurrentPropsParams<FcSwitchCaseProps> params) throws Exception
Description copied from interface:IElementPropertiesBean
Called each time when the data of the selected node was edited externally. Normally this does not happen. This only happens when the element handler returned a custom client handler (seeIElementHandler.getJavaScript(boolean)
) that invoked an external custom params update from the flowchart. If this bean stored the data in a field duringIElementPropertiesBean.prepareViewForElement(IElementPropInitParams)
, it should update that field.- Specified by:
updateCurrentProperties
in interfaceIElementPropertiesBean<FcSwitchCaseProps,WorkflowNode>
- Parameters:
params
- Params with the old and new data.- Throws:
Exception
- When the data could not be updated. This exception is caught and an error message is shown to the user.
-
completeCustomExpression
public List<String> completeCustomExpression(org.primefaces.extensions.event.CompleteEvent event)
Autocomplete method for the code mirror used to edit the custom boolean infix expression.- Parameters:
event
- Autocomplete event triggered by theCodeMirror
widget.- Returns:
- All suggestions, including variable names, operators, and constants.
-
getOrderedCombinationTypes
public List<EMultipleConditionCombinationType> getOrderedCombinationTypes()
- Returns:
- All available combination types, in the order they are to be shown in the UI.
-
getOrderedMatchConditions
public List<EMatchCondition> getOrderedMatchConditions()
- Returns:
- All available match conditions, in the order they are to be shown in the UI.
-
lintCustomExpression
public void lintCustomExpression()
Performs linting for the boolean infix expression the user has entered in the code mirror window.
-
-