public class ResourceService extends DefaultComponent
Modifier and Type | Field and Description |
---|---|
protected List<Extension> |
extensions |
protected Map<String,URL> |
registry |
static String |
XP_RESOURCES |
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) |
List<Extension> |
getExtensions() |
URL |
getResource(String name) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
registerExtension(Extension extension)
Registers the given extension.
|
void |
reload(ComponentContext context) |
URL |
removeResource(String name) |
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterExtension(Extension extension)
Unregisters the given extension.
|
getAdapter, getLastModified, setLastModified, setModifiedNow, start, stop
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
public static final String XP_RESOURCES
protected List<Extension> extensions
public ResourceService()
public void registerExtension(Extension extension)
Extensible
registerExtension
in interface Extensible
registerExtension
in class DefaultComponent
extension
- the extension to registerpublic void unregisterExtension(Extension extension)
Extensible
unregisterExtension
in interface Extensible
unregisterExtension
in class DefaultComponent
extension
- the extension to unregisterpublic void reload(ComponentContext context)
public List<Extension> getExtensions()
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 © 2017 Nuxeo. All rights reserved.