Class DefaultPluginFormResourceDescriptor.Builder

    • Method Detail

      • fileName

        public DefaultPluginFormResourceDescriptor.Builder fileName​(String 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 included 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.
      • mimeType

        public DefaultPluginFormResourceDescriptor.Builder mimeType​(String 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

        public DefaultPluginFormResourceDescriptor.Builder resource​(IResourceDescriptor 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.