public class WebResourceManagerImpl extends DefaultComponent implements WebResourceManager
Modifier and Type | Field and Description |
---|---|
protected ProcessorRegistry |
processors |
protected static String |
PROCESSORS_ENDPOINT |
protected static String |
RESOURCE_BUNDLES_ENDPOINT |
protected ResourceBundleRegistry |
resourceBundles |
protected ResourceRegistry |
resources |
protected static String |
RESOURCES_ENDPOINT |
lastModified
Constructor and Description |
---|
WebResourceManagerImpl() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
protected void |
computeResourceUri(ResourceDescriptor resource,
ComponentInstance contributor) |
Processor |
getProcessor(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.
|
Resource |
getResource(String name)
Returns a registered resource with given name, or null if not found.
|
ResourceBundle |
getResourceBundle(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) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
registerResource(Resource resource)
Allows to dynamically register a resource.
|
void |
registerResourceBundle(ResourceBundle bundle)
Allows to dynamically register a bundle.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterResource(Resource resource)
Allows to dynamically unregister a resource.
|
void |
unregisterResourceBundle(ResourceBundle bundle)
Allows to dynamically unregister a bundle.
|
deactivate, getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLastModified, setLastModified
applicationStarted, getApplicationStartedOrder
protected static final String RESOURCES_ENDPOINT
protected ResourceRegistry resources
protected static final String RESOURCE_BUNDLES_ENDPOINT
protected ResourceBundleRegistry resourceBundles
protected static final String PROCESSORS_ENDPOINT
protected ProcessorRegistry processors
public WebResourceManagerImpl()
public void activate(ComponentContext context)
Component
This method is called by the runtime when a component is activated.
activate
in interface Component
activate
in class DefaultComponent
context
- the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
protected void computeResourceUri(ResourceDescriptor resource, ComponentInstance contributor)
public Resource getResource(String name)
WebResourceManager
Referenced resource can either be a static resource or a style.
getResource
in interface WebResourceManager
public ResourceBundle getResourceBundle(String name)
WebResourceManager
getResourceBundle
in interface WebResourceManager
public List<ResourceBundle> getResourceBundles()
WebResourceManager
getResourceBundles
in interface WebResourceManager
public Processor getProcessor(String name)
WebResourceManager
getProcessor
in interface WebResourceManager
public List<Processor> getProcessors()
WebResourceManager
getProcessors
in interface WebResourceManager
public List<Processor> getProcessors(String type)
WebResourceManager
getProcessors
in interface WebResourceManager
public List<Resource> getResources(ResourceContext context, String bundleName, String type)
WebResourceManager
getResources
in interface WebResourceManager
protected Map<String,Resource> getSubResources(org.codehaus.plexus.util.dag.DAG graph, Resource r, String type)
public void registerResourceBundle(ResourceBundle bundle)
WebResourceManager
registerResourceBundle
in interface WebResourceManager
public void unregisterResourceBundle(ResourceBundle bundle)
WebResourceManager
unregisterResourceBundle
in interface WebResourceManager
public void registerResource(Resource resource)
WebResourceManager
registerResource
in interface WebResourceManager
public void unregisterResource(Resource resource)
WebResourceManager
unregisterResource
in interface WebResourceManager
Copyright © 2017 Nuxeo. All rights reserved.