Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.runtime.model.persistence
Interface ContributionPersistenceManager

All Known Implementing Classes:
ContributionPersistenceComponent

public interface ContributionPersistenceManager

Author:
Bogdan Stefanescu

Method Summary
 Contribution addContribution(Contribution contrib)
          Persists a new contribution.
 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.
 boolean removeContribution(Contribution contrib)
          Removes a persisted contribution given its name.
 void start()
          Starts the service.
 void stop()
          Stops the service.
 boolean uninstallContribution(Contribution contrib)
          Uninstalls a contribution given is name.
 Contribution updateContribution(Contribution contribution)
          Updates in the storage the given contribution modifications.
 

Method Detail

getContributions

List<Contribution> getContributions()
                                    throws Exception
Gets a list with all persisted contributions.

Throws:
Exception

getContribution

Contribution getContribution(String name)
                             throws Exception
Gets a contribution given its name.

Throws:
Exception

addContribution

Contribution addContribution(Contribution contrib)
                             throws Exception
Persists a new contribution. The contribution will not be installed. You need to explicitly call installContribution(Contribution) to install the contribution.

Throws:
Exception

removeContribution

boolean removeContribution(Contribution contrib)
                           throws Exception
Removes a persisted contribution given its name. The contribution will not be uninstalled before being removed. You need to explicitly call uninstallContribution(Contribution) to uninstall it.

Returns:
true if the contribution was removed, false if the contribution was not found in persistence.
Throws:
Exception

installContribution

boolean installContribution(Contribution contrib)
                            throws Exception
Installs the contribution given its name. Return true if contribution install succeeds, false if the contribution is already installed.

To be able to install a contribution you need to persist it first.

Throws:
Exception

uninstallContribution

boolean uninstallContribution(Contribution contrib)
                              throws Exception
Uninstalls a contribution given is name. If not already installed return false otherwise return true. The contribution persisted state is not modified by this operation.

Throws:
Exception

updateContribution

Contribution updateContribution(Contribution contribution)
                                throws Exception
Updates in the storage the given contribution modifications.

A contribution cannot be renamed. The only permitted modifications are changing the description and the auto start status.

Return back the contribution object.

Throws:
Exception

isInstalled

boolean isInstalled(Contribution contrib)
                    throws Exception
Checks whether a contribution is currently installed.

Throws:
Exception

isPersisted

boolean isPersisted(Contribution contrib)
                    throws Exception
Checks whether a contribution is currently persisted.

Throws:
Exception

start

void start()
           throws Exception
Starts the service. This will install all persisted contributions that are marked as auto-install. See Contribution.isDisabled()

Throws:
Exception

stop

void stop()
          throws Exception
Stops the service. This will uninstall all installed contributions.

Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.