Interface FormLogicProviderComponentDefinition

    • Field Detail

      • FORM_LOGIC_PROVIDER_TYPE_FRAGMENTVALIDATOR

        static final int FORM_LOGIC_PROVIDER_TYPE_FRAGMENTVALIDATOR
        See Also:
        Constant Field Values
      • FORM_LOGIC_PROVIDER_TYPE_FORMVALIDATOR

        static final int FORM_LOGIC_PROVIDER_TYPE_FORMVALIDATOR
        See Also:
        Constant Field Values
      • FORM_LOGIC_PROVIDER_TYPE_ROUTER

        static final int FORM_LOGIC_PROVIDER_TYPE_ROUTER
        See Also:
        Constant Field Values
      • FORM_LOGIC_PROVIDER_TYPE_HANDLER

        static final int FORM_LOGIC_PROVIDER_TYPE_HANDLER
        See Also:
        Constant Field Values
    • Method Detail

      • getType

        int getType()
        Returns the type of this form logic provider. Use on of the constants defined in FormLogicProviderComponentDefinition for this.
        Returns:
        the type of this form logic provider
      • getErrorCodes

        List<String> getErrorCodes()
        Returns all error codes this form logic component can output.
        Returns:
        all error codes this form logic component can output
      • getLanguageLabelMapping

        Map<String,​String> getLanguageLabelMapping()
        Returns the default mapping between error codes and language labels. Those language labels are defined in the resource file language_labels_LOCALE.properties. Note that those language labels will be imported in a global list of language labels so conflicts may occur.
        Returns:
        a map from error code to language label
      • getJsFilename

        String getJsFilename()
        Returns the filename that contains the optional JavaScript function that implements the form logic. The contents of the file may look like this: function(a,b) { return a+b; }. The filename is relative to the resources directory.
        Returns:
        the optional name of the file containing the JavaScript function or null if there is none
      • getAllowedToRunClientside

        boolean getAllowedToRunClientside()
        Returns whether this form logic is allowed to be run clientside. This obviously only makes sense for JavaScript form logic.
        Returns:
        true if running this form logic clientside is allowed, false otherwise
      • getTitleLanguageLabel

        String getTitleLanguageLabel()
        Returns the (key of the) language label that is to be used as the title of this form logic component. This language label should refer to the "normal" language labels in the message_LOCALE.properties file (as opposed to the editable clientside language labels that are in the language_labels_LOCALE.properties file).
        Returns:
        the (key of the) language label that is to be used as the title of this form logic component
      • getHelpTextLanguageLabel

        String getHelpTextLanguageLabel()
        Returns the (key of the) language label that is to be used as the help text of this form logic component. This language label should refer to the "normal" language labels in the message_LOCALE.properties file (as opposed to the editable clientside language labels that are in the language_labels_LOCALE.properties file).
        Returns:
        the (key of the) language label that is to be used as the help text of this form logic component
      • getIdentifier

        String getIdentifier()
        Returns a unique identifier that idenities this form logic component. This should start with a letter and may only contain alphanumeric characters.
        Returns:
        the unique identifier of this form logic component.
      • getParameters

        List<FormLogicProviderParameter> getParameters()
        Returns the parameters for this form logic component.
        Returns:
        the parameters for this form logic component.
      • setPermissionCategory

        void setPermissionCategory​(PermissionCategory permissionCategory)
        Sets the permission category associated with the component.
        Parameters:
        permissionCategory - The permission category to set.
      • setPermissionsForPermissionGroup

        void setPermissionsForPermissionGroup​(String permissionGroupValue,
                                              Permission[] permissions)
        Put an array of permissions in a map using the uniquely identifying value of a permission group as a key. Note that this public method is not defined in the ComponentDefinition interface. This means you can only use this method when you still have access to this implementing class.
        Parameters:
        permissionGroupValue - Uniquely identifying value of a permission group
        permissions - Array of permissions
      • setUsePermissions

        void setUsePermissions​(Permission[] permissions)
        Sets the permissions that grant the user the authorization to use this formlogic component. The user has to be assigned to one of the permissions only to be granted that authorization. If input argument is null, use permission is granted to all users
        Parameters:
        permissions - All permissions that grant the user the authorization to use this formlogic component
      • getUsePermissions

        Permission[] getUsePermissions()
        Gets the permissions that grant the user the authorization to use this formlogic component. The user has to be assigned to one of the permissions only to be granted that authorization. If result is null, use permission is granted to all users
        Returns:
        All permissions that grant the user the authorization to use this formlogic component