public class PackagePersistence extends Object
nxserver/data/packages/.packages
stores the state of all
local features.
Each local package have a corresponding directory in
nxserver/data/features/store
which is named: <package_uid>
("id-version")
Constructor and Description |
---|
PackagePersistence() |
Modifier and Type | Method and Description |
---|---|
org.nuxeo.connect.update.LocalPackage |
addPackage(File file) |
org.nuxeo.connect.update.LocalPackage |
getActivePackage(String name)
Get the local package having the given name and which is in either one of
the following states:
PackageState.INSTALLING
PackageState.INSTALLED
PackageState.STARTED
|
String |
getActivePackageId(String name) |
org.nuxeo.connect.update.LocalPackage |
getPackage(String id) |
List<org.nuxeo.connect.update.LocalPackage> |
getPackages() |
File |
getRoot() |
int |
getState(String featureId) |
Map<String,Integer> |
getStates() |
void |
removePackage(String id) |
void |
reset() |
void |
updateState(String id,
int state) |
public PackagePersistence() throws IOException
IOException
public File getRoot()
public org.nuxeo.connect.update.LocalPackage getPackage(String id) throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
public org.nuxeo.connect.update.LocalPackage addPackage(File file) throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
public int getState(String featureId)
public org.nuxeo.connect.update.LocalPackage getActivePackage(String name) throws org.nuxeo.connect.update.PackageException
PackageState.INSTALLING
PackageState.INSTALLED
PackageState.STARTED
name
- org.nuxeo.connect.update.PackageException
public List<org.nuxeo.connect.update.LocalPackage> getPackages() throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
public void removePackage(String id) throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
public void updateState(String id, int state) throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
public void reset() throws org.nuxeo.connect.update.PackageException
org.nuxeo.connect.update.PackageException
Copyright © 2011 Nuxeo SA. All Rights Reserved.