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
A builder for aDefaultPluginFormResourceDescriptor
.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IPluginFormResourceDescriptor
build()
Builds a newIPluginFormResourceDescriptor
with the current configuration.DefaultPluginFormResourceDescriptor.Builder
fileName(String fileName)
Sets the name of the file, including the file extension (if any), e.g.DefaultPluginFormResourceDescriptor.Builder
includeInForm(boolean includeInForm)
Sets whether to include the resource automatically in all forms.DefaultPluginFormResourceDescriptor.Builder
mimeType(String mimeType)
Sets the mime type of the resource, e.g.DefaultPluginFormResourceDescriptor.Builder
resource(IResourceDescriptor resource)
Sets the accessor for the resources binary content.
-
-
-
Method Detail
-
build
public IPluginFormResourceDescriptor build()
Builds a newIPluginFormResourceDescriptor
with the current configuration. Subsequent changes to this builder will not affect the returned object.- Returns:
- A new plugin form resource descriptor.
-
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.
-
-