Class WebResourceManagerImpl
- java.lang.Object
-
- org.nuxeo.runtime.model.DefaultComponent
-
- org.nuxeo.ecm.web.resources.core.service.WebResourceManagerImpl
-
- All Implemented Interfaces:
WebResourceManager,Adaptable,Component,Extensible,TimestampedService
public class WebResourceManagerImpl extends DefaultComponent implements WebResourceManager
- Since:
- 7.3
-
-
Field Summary
Fields Modifier and Type Field Description protected ProcessorRegistryprocessorsprotected static StringPROCESSORS_ENDPOINTprotected static StringRESOURCE_BUNDLES_ENDPOINTprotected ResourceBundleRegistryresourceBundlesprotected ResourceRegistryresourcesprotected static StringRESOURCES_ENDPOINT-
Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, name
-
-
Constructor Summary
Constructors Constructor Description WebResourceManagerImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidactivate(ComponentContext context)Activates the component.protected voidcomputeResourceUri(ResourceDescriptor resource, ComponentInstance contributor)ProcessorgetProcessor(String name)Returns the corresponding processor with given name, or null if not found.List<Processor>getProcessors()Returns all processors registered on the service, ordered.List<Processor>getProcessors(String type)Returns all processors registered on the service, ordered, for given type.ResourcegetResource(String name)Returns a registered resource with given name, or null if not found.ResourceBundlegetResourceBundle(String name)Returns a registered resource bundle with given name, or null if not found.List<ResourceBundle>getResourceBundles()Returns all resource bundles registered on the service.List<Resource>getResources(ResourceContext context, String bundleName, String type)Returns the ordered list of resources for given bundle name, filtered using given type.protected Map<String,Resource>getSubResources(org.codehaus.plexus.util.dag.DAG graph, Resource r, String type)voidregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)voidregisterResource(Resource resource)Allows to dynamically register a resource.voidregisterResourceBundle(ResourceBundle bundle)Allows to dynamically register a bundle.voidunregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)voidunregisterResource(Resource resource)Allows to dynamically unregister a resource.voidunregisterResourceBundle(ResourceBundle bundle)Allows to dynamically unregister a bundle.-
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtension
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.runtime.model.Component
applicationStarted, getApplicationStartedOrder
-
Methods inherited from interface org.nuxeo.runtime.service.TimestampedService
getLastModified, setLastModified
-
-
-
-
Field Detail
-
RESOURCES_ENDPOINT
protected static final String RESOURCES_ENDPOINT
- See Also:
- Constant Field Values
-
resources
protected ResourceRegistry resources
-
RESOURCE_BUNDLES_ENDPOINT
protected static final String RESOURCE_BUNDLES_ENDPOINT
- See Also:
- Constant Field Values
-
resourceBundles
protected ResourceBundleRegistry resourceBundles
-
PROCESSORS_ENDPOINT
protected static final String PROCESSORS_ENDPOINT
- See Also:
- Constant Field Values
-
processors
protected ProcessorRegistry processors
-
-
Method Detail
-
activate
public void activate(ComponentContext context)
Description copied from interface:ComponentActivates the component.This method is called by the runtime when a component is activated.
- Specified by:
activatein interfaceComponent- Overrides:
activatein classDefaultComponent- Parameters:
context- the runtime context
-
registerContribution
public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
registerContributionin classDefaultComponent
-
unregisterContribution
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
- Overrides:
unregisterContributionin classDefaultComponent
-
computeResourceUri
protected void computeResourceUri(ResourceDescriptor resource, ComponentInstance contributor)
-
getResource
public Resource getResource(String name)
Description copied from interface:WebResourceManagerReturns a registered resource with given name, or null if not found.Referenced resource can either be a static resource or a style.
- Specified by:
getResourcein interfaceWebResourceManager
-
getResourceBundle
public ResourceBundle getResourceBundle(String name)
Description copied from interface:WebResourceManagerReturns a registered resource bundle with given name, or null if not found.- Specified by:
getResourceBundlein interfaceWebResourceManager
-
getResourceBundles
public List<ResourceBundle> getResourceBundles()
Description copied from interface:WebResourceManagerReturns all resource bundles registered on the service.- Specified by:
getResourceBundlesin interfaceWebResourceManager
-
getProcessor
public Processor getProcessor(String name)
Description copied from interface:WebResourceManagerReturns the corresponding processor with given name, or null if not found.- Specified by:
getProcessorin interfaceWebResourceManager
-
getProcessors
public List<Processor> getProcessors()
Description copied from interface:WebResourceManagerReturns all processors registered on the service, ordered.- Specified by:
getProcessorsin interfaceWebResourceManager
-
getProcessors
public List<Processor> getProcessors(String type)
Description copied from interface:WebResourceManagerReturns all processors registered on the service, ordered, for given type.- Specified by:
getProcessorsin interfaceWebResourceManager
-
getResources
public List<Resource> getResources(ResourceContext context, String bundleName, String type)
Description copied from interface:WebResourceManagerReturns the ordered list of resources for given bundle name, filtered using given type.- Specified by:
getResourcesin interfaceWebResourceManager
-
getSubResources
protected Map<String,Resource> getSubResources(org.codehaus.plexus.util.dag.DAG graph, Resource r, String type)
-
registerResourceBundle
public void registerResourceBundle(ResourceBundle bundle)
Description copied from interface:WebResourceManagerAllows to dynamically register a bundle.- Specified by:
registerResourceBundlein interfaceWebResourceManager
-
unregisterResourceBundle
public void unregisterResourceBundle(ResourceBundle bundle)
Description copied from interface:WebResourceManagerAllows to dynamically unregister a bundle.- Specified by:
unregisterResourceBundlein interfaceWebResourceManager
-
registerResource
public void registerResource(Resource resource)
Description copied from interface:WebResourceManagerAllows to dynamically register a resource.- Specified by:
registerResourcein interfaceWebResourceManager
-
unregisterResource
public void unregisterResource(Resource resource)
Description copied from interface:WebResourceManagerAllows to dynamically unregister a resource.- Specified by:
unregisterResourcein interfaceWebResourceManager
-
-