Class DefaultPluginFormResourceDescriptor.Builder
java.lang.Object
de.xima.fc.plugin.models.retval.form.DefaultPluginFormResourceDescriptor.Builder
- Enclosing class:
DefaultPluginFormResourceDescriptor
A builder for a
DefaultPluginFormResourceDescriptor.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds a newIPluginFormResourceDescriptorwith the current configuration.Sets the name of the file, including the file extension (if any), e.g.includeInForm(boolean includeInForm) Sets whether to include the resource automatically in all forms.includeInTemplate(boolean includeInTemplate) Sets the mime type of the resource, e.g.resource(IResourceDescriptor resource) Sets the accessor for the resources binary content.
-
Method Details
-
build
Builds a newIPluginFormResourceDescriptorwith 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
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
Sets whether to include the resource automatically in allHTMLtemplates. 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.
-