Package org.omnifaces.resourcehandler
Class OmniVersionResourceHandler
- java.lang.Object
-
- jakarta.faces.application.ResourceHandler
-
- jakarta.faces.application.ResourceHandlerWrapper
-
- org.omnifaces.resourcehandler.DefaultResourceHandler
-
- org.omnifaces.resourcehandler.OmniVersionResourceHandler
-
- All Implemented Interfaces:
FacesWrapper<ResourceHandler>
public class OmniVersionResourceHandler extends DefaultResourceHandler
Appends OmniFaces version to resources with library nameomnifaces
.- Since:
- 2.2
- Author:
- Bauke Scholtz
-
-
Field Summary
-
Fields inherited from class org.omnifaces.resourcehandler.DefaultResourceHandler
FACES_SCRIPT_RESOURCE_NAME, RES_NOT_FOUND
-
Fields inherited from class jakarta.faces.application.ResourceHandler
JSF_SCRIPT_LIBRARY_NAME, JSF_SCRIPT_RESOURCE_NAME, LOCALE_PREFIX, RESOURCE_CONTRACT_XML, RESOURCE_EXCLUDES_DEFAULT_VALUE, RESOURCE_EXCLUDES_PARAM_NAME, RESOURCE_IDENTIFIER, WEBAPP_CONTRACTS_DIRECTORY_PARAM_NAME, WEBAPP_RESOURCES_DIRECTORY_PARAM_NAME
-
-
Constructor Summary
Constructors Constructor Description OmniVersionResourceHandler(ResourceHandler wrapped)
Creates a new instance of this OmniFaces version resource handler which wraps the given resource handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Resource
decorateResource(Resource resource)
Decorate the given resource.-
Methods inherited from class org.omnifaces.resourcehandler.DefaultResourceHandler
createResource, createResource, createResource, createResourceFromLibrary, decorateResource, getLibraryName
-
Methods inherited from class jakarta.faces.application.ResourceHandlerWrapper
createResourceFromId, createViewResource, getRendererTypeForResourceName, getViewResources, getViewResources, getWrapped, handleResourceRequest, isResourceRendered, isResourceRequest, isResourceURL, libraryExists, markResourceRendered
-
-
-
-
Constructor Detail
-
OmniVersionResourceHandler
public OmniVersionResourceHandler(ResourceHandler wrapped)
Creates a new instance of this OmniFaces version resource handler which wraps the given resource handler.- Parameters:
wrapped
- The resource handler to be wrapped.
-
-
Method Detail
-
decorateResource
public Resource decorateResource(Resource resource)
Description copied from class:DefaultResourceHandler
Decorate the given resource. This will only be called if no library-specific resource has been requested.The default implementation just returns the given resource unmodified.
- Overrides:
decorateResource
in classDefaultResourceHandler
- Parameters:
resource
- The resource to be decorated.- Returns:
- The decorated resource.
-
-