Class FcTimePointBean
- java.lang.Object
-
- de.xima.fc.workflow.designer.bean.triggers.FcTimePointBean
-
- All Implemented Interfaces:
IElementPropertiesBean<FcTimePointProps,WorkflowTrigger>
,ITriggerPropertiesBean<FcTimePointProps>
,Serializable
@ViewScoped @Named public class FcTimePointBean extends Object implements ITriggerPropertiesBean<FcTimePointProps>, Serializable
Bean for the properties panel ofEWorkflowTriggerType.FC_TIME_POINT
trigger workflow elements.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FcTimePointBean()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
applyToExistingFormRecords()
Callback for the button that lets the user apply the trigger to existing form records.String
getDateTimeFormatCustom()
String
getDateTimeFormatSelect()
String
getDateTimePatternPreview()
List<ETimePointTriggerDurationUnit>
getDurationUnits()
List<ETimePointTriggerOperation>
getOperations()
List<javax.faces.model.SelectItem>
getPredefinedDateTimeFormats()
List<ETimePointType>
getTimePointTypes()
boolean
isCustomDateTimeFormatSelected()
void
prepareViewForElement(IElementPropInitParams<FcTimePointProps> params)
Called each time when the properties panel for a certain workflow element is loaded.IRetrieveElementPropsRetVal<FcTimePointProps>
retrieveCurrentProperties(FcTimePointProps storedModel)
Called each time the data that is currently being edited needs to be retrieved, and possibly persisted.void
setDateTimeFormatCustom(String dateTimeFormatCustom)
void
setDateTimeFormatSelect(String dateTimeFormatSelect)
void
updateCurrentProperties(IElementUpdateCurrentPropsParams<FcTimePointProps> params)
Called each time when the data of the selected node was edited externally.void
updateCurrentTask(IElementUpdateCurrentTaskParams params)
Called each time when task of the selection has changed.
-
-
-
Method Detail
-
getDateTimeFormatCustom
public String getDateTimeFormatCustom()
-
getDateTimeFormatSelect
public String getDateTimeFormatSelect()
-
getDateTimePatternPreview
public String getDateTimePatternPreview()
-
getDurationUnits
public List<ETimePointTriggerDurationUnit> getDurationUnits()
- Returns:
- The available duration units in a well-defined order.
-
getOperations
public List<ETimePointTriggerOperation> getOperations()
- Returns:
- The available operations in a well-defined order.
-
getPredefinedDateTimeFormats
public List<javax.faces.model.SelectItem> getPredefinedDateTimeFormats()
- Returns:
- A list of date time formats the user may select that also serve as examples.
-
getTimePointTypes
public List<ETimePointType> getTimePointTypes()
- Returns:
- The available time point types in a well-defined order.
-
isCustomDateTimeFormatSelected
public boolean isCustomDateTimeFormatSelected()
- Returns:
- Whether a custom date format is selected, i.e. whether to show the input for a custom date format.
-
applyToExistingFormRecords
public void applyToExistingFormRecords()
Callback for the button that lets the user apply the trigger to existing form records.
-
prepareViewForElement
public void prepareViewForElement(IElementPropInitParams<FcTimePointProps> 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<FcTimePointProps,WorkflowTrigger>
- 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.
-
retrieveCurrentProperties
public IRetrieveElementPropsRetVal<FcTimePointProps> retrieveCurrentProperties(FcTimePointProps storedModel)
Description copied from interface:IElementPropertiesBean
Called each time the data that is currently being edited needs to be retrieved, and possibly persisted. Usually this is called when the user switch to another workflow element, or when theNote, however, that you may not assume the editing process for the current workflow element is done. The data is sometimes retrieved while the user is still editing the properties, such as to sync the properties with the workflow design area. Do not perform any clean up work here. Use
PreDestroy
for cleanup.- Specified by:
retrieveCurrentProperties
in interfaceIElementPropertiesBean<FcTimePointProps,WorkflowTrigger>
- Specified by:
retrieveCurrentProperties
in interfaceITriggerPropertiesBean<FcTimePointProps>
- Parameters:
storedModel
- The same model that was passed toIElementPropertiesBean.prepareViewForElement(IElementPropInitParams)
. If you did not need to replace that model with another instance, you can just returned it. Conversely, if you did store the properties model in your bean, you may just return your stored value and ignore this parameter altogether.- Returns:
- The current properties that reflect the current user input. You may mutate and return the same object(s)
that were passed to
IElementPropertiesBean.prepareViewForElement(IElementPropInitParams)
.
-
setDateTimeFormatCustom
public void setDateTimeFormatCustom(String dateTimeFormatCustom)
-
setDateTimeFormatSelect
public void setDateTimeFormatSelect(String dateTimeFormatSelect)
-
updateCurrentProperties
public void updateCurrentProperties(IElementUpdateCurrentPropsParams<FcTimePointProps> 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<FcTimePointProps,WorkflowTrigger>
- 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.
-
updateCurrentTask
public void updateCurrentTask(IElementUpdateCurrentTaskParams params) throws Exception
Description copied from interface:IElementPropertiesBean
Called each time when task of the selection has changed. This happens, for example, when the element is moved between different tasks. Can be used when the bean wishes to keep track of the current task. Otherwise, this does not need to be overridden.- Specified by:
updateCurrentTask
in interfaceIElementPropertiesBean<FcTimePointProps,WorkflowTrigger>
- 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.
-
-