Interface IPluginFormResources
-
- All Superinterfaces:
IFCPlugin
,IFCRemoteSyncPlugin
,INamedUiElement
,INameProviding
,ITransferable
,Serializable
public interface IPluginFormResources extends IFCPlugin, IFCRemoteSyncPlugin
Interface for plugins that wish to add additional frontend resources that are available for web forms. Allows a single plugin to provide any number of resources, which may also be computed dynamically.Note: Plugins of this type must expect to be executed on a frontend server, i.e. when no classes from the master server are available, such as the DAO provider for accessing the database. If you need to access the database, you must use the APIProvider to request data from the master server.
- Since:
- 8.3.0
- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
-
Fields inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
CONFIG_FILENAME
-
Fields inherited from interface de.xima.fc.interfaces.INamedUiElement
ATTR_DISPLAY_NAME
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Map<String,IPluginFormResourceDescriptor>
getResources(IPluginFormResourcesParams params)
Gets all resources that this plugin wishes to provide.-
Methods inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
getDescription, getDescription, getDisplayName, getName, initialize, initPlugin, install, shutdown, shutdown, uninstall, validateConfigurationData
-
-
-
-
Method Detail
-
getResources
Map<String,IPluginFormResourceDescriptor> getResources(IPluginFormResourcesParams params)
Gets all resources that this plugin wishes to provide. The resources should depend only on these parameters, as the resources may get cached.The resources are returned as a map, where the map key is the value of
IPluginFormResourceDescriptor.getFileName()
.- Parameters:
params
- Parameters for obtaining the resources.- Returns:
- A map of resource descriptors for the resources that this plugin wishes to provide, with the file name as a map key.
- Throws:
RuntimeException
- This method should never throw an exception. But if it does, the behavior depends on the context. When a form is rendered, the exception will be caught and logged, but otherwise ignored. The form will still be rendered, albeit without the resources from this plugin. When a specific resource is requested via the HTTP endpoint, the HTTP endpoint will return an appropriate HTTP status code, such as 500.
-
-