Enum EFormThemeResourceContext

java.lang.Object
java.lang.Enum<EFormThemeResourceContext>
de.xima.fc.form.common.models.EFormThemeResourceContext
All Implemented Interfaces:
Serializable, Comparable<EFormThemeResourceContext>

public enum EFormThemeResourceContext extends Enum<EFormThemeResourceContext>
Common resource contexts for form themes, see IFormTheme. The context is a string to allow for plugins to define different contexts. This enumeration lists all common resource contexts known to the system.

Describes the context in which a resource from a form theme is used. Each form theme may provide different resources for different contexts. For example, a form theme might provide a different CSS file for the web form and for HTML templates.

Since:
8.3.0
Author:
XIMA MEDIA GmbH
  • Enum Constant Details

    • HTML_TEMPLATE

      public static final EFormThemeResourceContext HTML_TEMPLATE
      Context for resources that are included in HTML templates, such as the success page returned by the workflow when the form was submitted successfully. These are usually CSS and JavaScript files.
    • RESOURCE

      public static final EFormThemeResourceContext RESOURCE
      Context for dependent resources. Such resources are not included directly, but are referenced by other resources. For example, a CSS file may reference images, fonts, or other CSS resources.
    • WEB_FORM

      public static final EFormThemeResourceContext WEB_FORM
      Context for resources that are included in the rendered web form, e.g. when a form is opened via /form/provide/ID or /form/review/ID. These are usually CSS and JavaScript files.
  • Field Details

  • Method Details

    • values

      public static EFormThemeResourceContext[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static EFormThemeResourceContext valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • getContextName

      public abstract String getContextName()
      Gets the name of this resource context, i.e. the string representation of this context used by IFormTheme.
      Returns:
      The name of this resource context.
    • byContextNameOrNull

      public static EFormThemeResourceContext byContextNameOrNull(String contextName)
      Gets the enum constant of the resource context with the given name, or null if no such context exists.
      Parameters:
      contextName - The name of the context to get.
      Returns:
      The enum constant with the given name, or null if no such context exists.