Class DefaultFD2StatusProvider

    • Field Detail

      • LOG

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

      • DefaultFD2StatusProvider

        public DefaultFD2StatusProvider​(IFormRenderContext renderCtx)
      • DefaultFD2StatusProvider

        public DefaultFD2StatusProvider​(Projekt projekt,
                                        Locale locale)
    • Method Detail

      • 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)