Class DefaultPluginFormResourceDescriptor.Builder

java.lang.Object
de.xima.fc.plugin.models.retval.form.DefaultPluginFormResourceDescriptor.Builder
Enclosing class:
DefaultPluginFormResourceDescriptor

public static final class DefaultPluginFormResourceDescriptor.Builder extends Object
Since:
8.3.0
Author:
XIMA MEDIA GmbH
  • Method Details

    • build

      Builds a new IPluginFormResourceDescriptor with the current configuration. Subsequent changes to this builder will not affect the returned object.
      Returns:
      A new plugin form resource descriptor.
    • fileName

      Sets the name of the file, including the file extension (if any), e.g. "style.css".

      Defaults to "file.bin".

      Parameters:
      fileName - The name of the file, including the file extension.
      Returns:
      This builder for chaining method calls.
    • includeInForm

      public DefaultPluginFormResourceDescriptor.Builder includeInForm(boolean includeInForm)
      Sets whether to include the resource automatically in all forms. If false, the resource is still available via the HTTP endpoint, but must be referenced manually. If true, the resource will be included in all rendered web forms.

      Defaults to false.

      Parameters:
      includeInForm - Whether to include the resource automatically in all forms.
      Returns:
      This builder for chaining method calls.
    • includeInTemplate

      public DefaultPluginFormResourceDescriptor.Builder includeInTemplate(boolean includeInTemplate)
      Sets whether to include the resource automatically in all HTML templates. If false, the resource is still available via the HTTP endpoint, but must be referenced manually. If true, the resource will be included in all rendered HTML templates.

      Defaults to false.

      Parameters:
      includeInTemplate - Whether to include the resource automatically in all templates.
      Returns:
      This builder for chaining method calls.
    • mimeType

      Sets the mime type of the resource, e.g. "text/css" for CSS files.

      Defaults to "application/octet-stream".

      Parameters:
      mimeType - The mime type of the resource.
      Returns:
      This builder for chaining method calls.
    • resource

      Sets the accessor for the resources binary content.

      Defaults to an empty resource descriptor (=no content).

      Parameters:
      resource - The accessor for the resources binary content.
      Returns:
      This builder for chaining method calls.