Package de.xima.fc.servlet.resource
Class APluginStaticResourceServletAction
java.lang.Object
de.xima.fc.servlet.resource.APluginStaticResourceServletAction
- All Implemented Interfaces:
INameProviding
,ITransferable
,INamedUiElement
,IFCPlugin
,IPluginServletAction
,IPluginStaticResourceServletAction
,Serializable
public abstract class APluginStaticResourceServletAction
extends Object
implements IPluginStaticResourceServletAction
Base class for
IPluginServletAction
which provides a basic implementation for a servlet action that provides
static resources. In addition to IPluginServletAction
, this abstract base class also stores the version of
the plugin and uses that as the resource's ETag
. For non-stable versions, the current
timestamp is used to bust the cache.- Since:
- 8.0.0
- Author:
- XIMA MEDIA GmbH
- See Also:
-
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
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe main method of this plugin.getResourceTag
(String internalPath) Gets the tag of the requested resource path.void
initialize
(IPluginInitializeData initializeData) Callback method that is invoked when this plugin is initialized.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
getDescription, getDescription, getDisplayName, getName, initPlugin, install, shutdown, shutdown, uninstall, validateConfigurationData
Methods inherited from interface de.xima.fc.servlet.resource.IPluginStaticResourceServletAction
findContentType, getPathParam, isPathSupported, readResource, respondMissingPath, respondResourceFound, respondResourceNotFound, respondServerError, respondUnsupportedPath, toInternalPath
-
Constructor Details
-
APluginStaticResourceServletAction
public APluginStaticResourceServletAction()
-
-
Method Details
-
execute
public final IPluginServletActionRetVal execute(IPluginServletActionParams args) throws FCPluginException Description copied from interface:IPluginServletAction
The main method of this plugin.When any exception other than
FCPluginException
is thrown, a generic HTML error page is returned to the client.- Specified by:
execute
in interfaceIPluginServletAction
- Specified by:
execute
in interfaceIPluginStaticResourceServletAction
- Parameters:
args
- The parameters this plugin may make use of. Contains for example the URL parameters, the data of theHttpSession
or the currentuser
.- Returns:
- The HTTP response code and the data to be sent as the response.
- Throws:
FCPluginException
- May be thrown when this plugin cannot handle the request. When this exception is thrown, a404
HTTP response is returned to the client.
-
getResourceTag
Description copied from interface:IPluginStaticResourceServletAction
Gets the tag of the requested resource path. The tag is used for caching. As long as the tag does not change, the resource content is not sent again to clients that already have the resource.- Specified by:
getResourceTag
in interfaceIPluginStaticResourceServletAction
- Parameters:
internalPath
- Path to check.- Returns:
- The (version) tag of the given resource path.
-
initialize
Description copied from interface:IFCPlugin
Callback method that is invoked when this plugin is initialized.- Specified by:
initialize
in interfaceIFCPlugin
- Parameters:
initializeData
-IPluginInitializeData
- Throws:
FCPluginException
- May be thrown when an error occurred during the initialization process. When an error is thrown, this plugin will be deactivated and not put into service.
-