public class ResourceService extends ReloadableComponent
Modifier and Type | Field and Description |
---|---|
protected Map<String,URL> |
registry |
static String |
XP_RESOURCES |
extensions
lastModified
Constructor and Description |
---|
ResourceService() |
Modifier and Type | Method and Description |
---|---|
void |
activate(ComponentContext context)
Activates the component.
|
void |
addResource(ResourceDescriptor resource) |
void |
addResource(String name,
URL url) |
void |
deactivate(ComponentContext context)
Deactivates the component.
|
protected ResourceDescriptor |
findLastContributedResource(String name) |
URL |
getResource(String name) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
URL |
removeResource(String name) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
getExtensions, registerExtension, reload, unregisterExtension
applicationStarted, getAdapter, getApplicationStartedOrder, getLastModified, setLastModified, setModifiedNow
public static final String XP_RESOURCES
public ResourceService()
public URL getResource(String name)
public void addResource(ResourceDescriptor resource)
public void addResource(String name, URL url)
public URL removeResource(String name)
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 deactivate(ComponentContext context)
Component
This method is called by the runtime when a component is deactivated.
deactivate
in interface Component
deactivate
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 ResourceDescriptor findLastContributedResource(String name)
Copyright © 2015 Nuxeo SA. All rights reserved.