Class PackagePersistence
java.lang.Object
org.nuxeo.connect.update.standalone.PackagePersistence
The file
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")
- Author:
- Bogdan Stefanescu
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.nuxeo.connect.update.LocalPackage
addPackage
(File file) protected org.nuxeo.connect.update.LocalPackage
addPackageFromDir
(File file) Add unzipped packaged to local cache.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
getActivePackageId
(String name) getInstallDate
(String id) org.nuxeo.connect.update.LocalPackage
getPackage
(String id) List<org.nuxeo.connect.update.LocalPackage>
getRoot()
org.nuxeo.connect.update.PackageState
getStore()
protected File
newTempDir
(String id) void
removePackage
(String id) void
reset()
void
updateState
(String id, org.nuxeo.connect.update.PackageState state) protected void
-
Field Details
-
root
-
store
-
temp
-
RANDOM
-
states
-
-
Constructor Details
-
PackagePersistence
- Throws:
IOException
-
-
Method Details
-
getRoot
-
getStore
- Since:
- 7.1
-
getStates
-
loadStates
- Throws:
IOException
-
writeStates
- Throws:
IOException
-
getPackage
public org.nuxeo.connect.update.LocalPackage getPackage(String id) throws org.nuxeo.connect.update.PackageException - Throws:
org.nuxeo.connect.update.PackageException
-
addPackage
public org.nuxeo.connect.update.LocalPackage addPackage(File file) throws org.nuxeo.connect.update.PackageException - Throws:
org.nuxeo.connect.update.PackageException
-
addPackageFromDir
protected org.nuxeo.connect.update.LocalPackage addPackageFromDir(File file) throws org.nuxeo.connect.update.PackageException Add unzipped packaged to local cache. It replaces SNAPSHOT packages if not installed- Throws:
org.nuxeo.connect.update.AlreadyExistsPackageException
- If not replacing a SNAPSHOT or if the existing package is installedorg.nuxeo.connect.update.PackageException
-
getState
-
getActivePackage
public org.nuxeo.connect.update.LocalPackage getActivePackage(String name) throws org.nuxeo.connect.update.PackageException Get the local package having the given name and which is in either one of the following states:PackageState.INSTALLING
PackageState.INSTALLED
PackageState.STARTED
- Throws:
org.nuxeo.connect.update.PackageException
-
getActivePackageId
- Throws:
org.nuxeo.connect.update.PackageException
-
getPackages
public List<org.nuxeo.connect.update.LocalPackage> getPackages() throws org.nuxeo.connect.update.PackageException- Throws:
org.nuxeo.connect.update.PackageException
-
removePackage
- Throws:
org.nuxeo.connect.update.PackageException
-
updateState
public void updateState(String id, org.nuxeo.connect.update.PackageState state) throws org.nuxeo.connect.update.PackageException - Throws:
org.nuxeo.connect.update.PackageException
- Since:
- 5.7
-
reset
public void reset() throws org.nuxeo.connect.update.PackageException- Throws:
org.nuxeo.connect.update.PackageException
-
newTempDir
-
getInstallDate
- Since:
- 5.8
-