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, name| 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, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerExtension, setLastModified, setModifiedNow, setName, start, stop, unregister, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLastModified, setLastModifiedapplicationStarted, getApplicationStartedOrderprotected 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)
ComponentThis method is called by the runtime when a component is activated.
activate in interface Componentactivate in class DefaultComponentcontext - the runtime contextpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution in class DefaultComponentpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentprotected void computeResourceUri(ResourceDescriptor resource, ComponentInstance contributor)
public Resource getResource(String name)
WebResourceManagerReferenced resource can either be a static resource or a style.
getResource in interface WebResourceManagerpublic ResourceBundle getResourceBundle(String name)
WebResourceManagergetResourceBundle in interface WebResourceManagerpublic List<ResourceBundle> getResourceBundles()
WebResourceManagergetResourceBundles in interface WebResourceManagerpublic Processor getProcessor(String name)
WebResourceManagergetProcessor in interface WebResourceManagerpublic List<Processor> getProcessors()
WebResourceManagergetProcessors in interface WebResourceManagerpublic List<Processor> getProcessors(String type)
WebResourceManagergetProcessors in interface WebResourceManagerpublic List<Resource> getResources(ResourceContext context, String bundleName, String type)
WebResourceManagergetResources in interface WebResourceManagerprotected Map<String,Resource> getSubResources(org.codehaus.plexus.util.dag.DAG graph, Resource r, String type)
public void registerResourceBundle(ResourceBundle bundle)
WebResourceManagerregisterResourceBundle in interface WebResourceManagerpublic void unregisterResourceBundle(ResourceBundle bundle)
WebResourceManagerunregisterResourceBundle in interface WebResourceManagerpublic void registerResource(Resource resource)
WebResourceManagerregisterResource in interface WebResourceManagerpublic void unregisterResource(Resource resource)
WebResourceManagerunregisterResource in interface WebResourceManagerCopyright © 2019 Nuxeo. All rights reserved.