public class ContributionPersistenceComponent extends DefaultComponent implements ContributionPersistenceManager
| Modifier and Type | Field and Description |
|---|---|
protected RuntimeContext |
ctx |
protected ContributionStorage |
storage |
static String |
STORAGE_XP |
lastModified| Constructor and Description |
|---|
ContributionPersistenceComponent() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(ComponentContext context)
Activates the component.
|
Contribution |
addContribution(Contribution contrib)
Persists a new contribution.
|
void |
deactivate(ComponentContext context)
Deactivates the component.
|
static String |
getComponentName(String contribName) |
Contribution |
getContribution(String name)
Gets a contribution given its name.
|
List<Contribution> |
getContributions()
Gets a list with all persisted contributions.
|
boolean |
installContribution(Contribution contrib)
Installs the contribution given its name.
|
boolean |
isInstalled(Contribution contrib)
Checks whether a contribution is currently installed.
|
boolean |
isPersisted(Contribution contrib)
Checks whether a contribution is currently persisted.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
boolean |
removeContribution(Contribution contrib)
Removes a persisted contribution given its name.
|
void |
start()
Starts the service.
|
void |
start(ComponentContext context)
Start the component.
|
void |
stop()
Stops the service.
|
void |
stop(ComponentContext context)
Stop the component.
|
boolean |
uninstallContribution(Contribution contrib)
Uninstalls a contribution given is name.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
Contribution |
updateContribution(Contribution contribution)
Updates in the storage the given contribution modifications.
|
getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtensionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplicationStarted, getApplicationStartedOrderpublic static final String STORAGE_XP
protected ContributionStorage storage
protected RuntimeContext ctx
public ContributionPersistenceComponent()
public static String getComponentName(String contribName)
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 deactivate(ComponentContext context)
ComponentThis method is called by the runtime when a component is deactivated.
deactivate in interface Componentdeactivate 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 DefaultComponentpublic List<Contribution> getContributions()
ContributionPersistenceManagergetContributions in interface ContributionPersistenceManagerpublic Contribution getContribution(String name)
ContributionPersistenceManagergetContribution in interface ContributionPersistenceManagerpublic Contribution addContribution(Contribution contrib)
ContributionPersistenceManagerContributionPersistenceManager.installContribution(Contribution) to install the contribution.addContribution in interface ContributionPersistenceManagerpublic boolean removeContribution(Contribution contrib)
ContributionPersistenceManagerContributionPersistenceManager.uninstallContribution(Contribution) to uninstall it.removeContribution in interface ContributionPersistenceManagerpublic boolean isInstalled(Contribution contrib)
ContributionPersistenceManagerisInstalled in interface ContributionPersistenceManagerpublic boolean installContribution(Contribution contrib)
ContributionPersistenceManagerTo be able to install a contribution you need to persist it first.
installContribution in interface ContributionPersistenceManagerpublic boolean uninstallContribution(Contribution contrib)
ContributionPersistenceManageruninstallContribution in interface ContributionPersistenceManagerpublic Contribution updateContribution(Contribution contribution)
ContributionPersistenceManagerA contribution cannot be renamed. The only permitted modifications are changing the description and the auto start status.
Return back the contribution object.
updateContribution in interface ContributionPersistenceManagerpublic boolean isPersisted(Contribution contrib)
ContributionPersistenceManagerisPersisted in interface ContributionPersistenceManagerpublic void start()
ContributionPersistenceManagerContribution.isDisabled()start in interface ContributionPersistenceManagerpublic void stop()
ContributionPersistenceManagerstop in interface ContributionPersistenceManagerpublic void start(ComponentContext context)
Componentstart in interface Componentstart in class DefaultComponentpublic void stop(ComponentContext context)
Componentstop in interface Componentstop in class DefaultComponentCopyright © 2018 Nuxeo. All rights reserved.