Class DefaultFD2StatusProvider
java.lang.Object
de.xima.fc.web.common.fd2.provider.DefaultFD2StatusProvider
- All Implemented Interfaces:
IFD2StatusProvider
,Serializable
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultFD2StatusProvider
(Projekt projekt, Locale locale) DefaultFD2StatusProvider
(IFormRenderContext renderCtx) -
Method Summary
Modifier and TypeMethodDescriptionstatic <TStatus> com.alibaba.fastjson.JSONArray
createStatusJson
(List<TStatus> statusList, Function<TStatus, String> getName, Function<TStatus, String> getAlias, Locale locale) com.alibaba.fastjson.JSONArray
createStatusJSON
(long workflowVersionNumber) com.alibaba.fastjson.JSONArray
createStatusList
(long workflowVersionNumber) static <TStatus extends IUuidProviding>
com.alibaba.fastjson.JSONArraycreateStatusList
(List<TStatus> stateList, Function<TStatus, String> getName)
-
Field Details
-
LOG
protected static final org.slf4j.Logger LOG
-
-
Constructor Details
-
DefaultFD2StatusProvider
-
DefaultFD2StatusProvider
-
-
Method Details
-
createStatusJSON
public com.alibaba.fastjson.JSONArray createStatusJSON(long workflowVersionNumber) - Specified by:
createStatusJSON
in interfaceIFD2StatusProvider
- Parameters:
workflowVersionNumber
- The version number of the workflow version containing the states. Ignored when the project uses the old workflow.- Returns:
- A JSON array containing information regarding the conditions available to show form elements depending on
the current state of the form. Contains
JSONObject
s with the following key-value pairs:- id: ID of the state-based condition, eg.
-1
or[!]-1
orstatus-effab301-1856816569
or[!]status-effab301-1856816569
- name: A textual and localized description of the state-based condition, eg.
not in state Received
orform has not status
.
- id: ID of the state-based condition, eg.
-
createStatusList
public com.alibaba.fastjson.JSONArray createStatusList(long workflowVersionNumber) - Specified by:
createStatusList
in interfaceIFD2StatusProvider
- Parameters:
workflowVersionNumber
- The version number of the workflow version containing the states. Ignored when the project uses the old workflow.- Returns:
- A JSON array of all states for the current project. Contains
JSONObject
s with the following key-value pairs:- id: The ID (number) of the state.
- name: The given name (string) of the state.
-
createStatusJson
-
createStatusList
public static <TStatus extends IUuidProviding> com.alibaba.fastjson.JSONArray createStatusList(List<TStatus> stateList, Function<TStatus, String> getName)
-