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(org.nuxeo.connect.update.PackageUpdateService pus) |
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) |
FileTime |
getInstallDate(String id) |
org.nuxeo.connect.update.LocalPackage |
getPackage(String id) |
List<org.nuxeo.connect.update.LocalPackage> |
getPackages() |
File |
getRoot() |
org.nuxeo.connect.update.PackageState |
getState(String packageId) |
Map<String,org.nuxeo.connect.update.PackageState> |
getStates() |
File |
getStore() |
void |
removePackage(String id) |
void |
reset() |
void |
updateState(String id,
int state)
Deprecated.
Since 5.7. Use
updateState(String, PackageState) instead. |
void |
updateState(String id,
org.nuxeo.connect.update.PackageState state) |
public PackagePersistence(org.nuxeo.connect.update.PackageUpdateService pus) throws IOException
IOException
public File getRoot()
public File getStore()
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 org.nuxeo.connect.update.PackageState getState(String packageId)
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
@Deprecated public void updateState(String id, int state) throws org.nuxeo.connect.update.PackageException
updateState(String, PackageState)
instead.org.nuxeo.connect.update.PackageException
public void updateState(String id, org.nuxeo.connect.update.PackageState 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 © 2015 Nuxeo SA. All rights reserved.