Class DefaultPluginFormResourceDescriptor
- java.lang.Object
-
- de.xima.fc.plugin.models.retval.form.DefaultPluginFormResourceDescriptor
-
- All Implemented Interfaces:
IPluginFormResourceDescriptor
public final class DefaultPluginFormResourceDescriptor extends Object implements IPluginFormResourceDescriptor
POJO implementation ofIPluginFormResourceDescriptor
with a builder.- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultPluginFormResourceDescriptor.Builder
A builder for aDefaultPluginFormResourceDescriptor
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DefaultPluginFormResourceDescriptor.Builder
builder()
Creates a builder for aDefaultPluginFormResourceDescriptor
.String
getFileName()
Gets the name of the file, including the file extension (if any), e.g.String
getMimeType()
Gets the mime type of the resource, e.g.IResourceDescriptor
getResource()
Gets the accessor for the resources binary content.boolean
isIncludeInForm()
Whether to include the resource automatically in all forms.
-
-
-
Method Detail
-
getFileName
public String getFileName()
Description copied from interface:IPluginFormResourceDescriptor
Gets the name of the file, including the file extension (if any), e.g. "style.css". File names are case-sensitive. The file name may also contain slashes, e.g. "images/logo.png". These indicate (virtual) sub folders. The HTTP endpoint, for example, uses these sub folders in the URL, which affects the resolution of relative paths.The file name must be unique among all resources provided by the plugin. Different plugins may provide resources with the same file name.
- Specified by:
getFileName
in interfaceIPluginFormResourceDescriptor
- Returns:
- The name of the file, including the file extension.
-
getMimeType
public String getMimeType()
Description copied from interface:IPluginFormResourceDescriptor
Gets the mime type of the resource, e.g. "text/css" for CSS files.- Specified by:
getMimeType
in interfaceIPluginFormResourceDescriptor
- Returns:
- The mime type of the resource.
-
getResource
public IResourceDescriptor getResource()
Description copied from interface:IPluginFormResourceDescriptor
Gets the accessor for the resources binary content.- Specified by:
getResource
in interfaceIPluginFormResourceDescriptor
- Returns:
- The accessor for the resources binary content.
-
isIncludeInForm
public boolean isIncludeInForm()
Description copied from interface:IPluginFormResourceDescriptor
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.Note: Currently, this feature is supported only for CSS and JavaScript files, i.e. resource whose
IPluginFormResourceDescriptor.getMimeType()
is "text/css" or "text/javascript".- Specified by:
isIncludeInForm
in interfaceIPluginFormResourceDescriptor
- Returns:
- Whether to include the resource automatically in all forms.
-
builder
public static DefaultPluginFormResourceDescriptor.Builder builder()
Creates a builder for aDefaultPluginFormResourceDescriptor
.- Returns:
- A new builder.
-
-