Class DefaultFD2StatusProvider

java.lang.Object
de.xima.fc.web.common.fd2.provider.DefaultFD2StatusProvider
All Implemented Interfaces:
IFD2StatusProvider, Serializable

public class DefaultFD2StatusProvider extends Object implements IFD2StatusProvider
See Also:
  • Field Details

    • LOG

      protected static final org.slf4j.Logger LOG
  • Constructor Details

    • DefaultFD2StatusProvider

      public DefaultFD2StatusProvider(IFormRenderContext renderCtx)
    • DefaultFD2StatusProvider

      public DefaultFD2StatusProvider(Projekt projekt, Locale locale)
  • Method Details

    • createStatusJSON

      public com.alibaba.fastjson.JSONArray createStatusJSON(long workflowVersionNumber)
      Specified by:
      createStatusJSON in interface IFD2StatusProvider
      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 JSONObjects with the following key-value pairs:
      • id: ID of the state-based condition, eg. -1 or [!]-1 or status-effab301-1856816569 or [!]status-effab301-1856816569
      • name: A textual and localized description of the state-based condition, eg. not in state Received or form has not status.
    • createStatusList

      public com.alibaba.fastjson.JSONArray createStatusList(long workflowVersionNumber)
      Specified by:
      createStatusList in interface IFD2StatusProvider
      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 JSONObjects with the following key-value pairs:
      • id: The ID (number) of the state.
      • name: The given name (string) of the state.
    • createStatusJson

      public static <TStatus> com.alibaba.fastjson.JSONArray createStatusJson(List<TStatus> statusList, Function<TStatus,String> getName, Function<TStatus,String> getAlias, Locale locale)
    • createStatusList

      public static <TStatus extends IUuidProviding> com.alibaba.fastjson.JSONArray createStatusList(List<TStatus> stateList, Function<TStatus,String> getName)