Nuxeo Enterprise Platform 5.4

org.nuxeo.connect.update.impl
Class PackagePersistence

java.lang.Object
  extended by org.nuxeo.connect.update.impl.PackagePersistence

public class PackagePersistence
extends Object

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

Constructor Summary
PackagePersistence()
           
 
Method Summary
 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 updateState(String id, int state)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackagePersistence

public PackagePersistence()
                   throws IOException
Throws:
IOException
Method Detail

getRoot

public File getRoot()

getStates

public Map<String,Integer> getStates()

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

getState

public int getState(String featureId)

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:

Parameters:
name -
Returns:
Throws:
org.nuxeo.connect.update.PackageException

getActivePackageId

public String getActivePackageId(String name)

getPackages

public List<org.nuxeo.connect.update.LocalPackage> getPackages()
                                                        throws org.nuxeo.connect.update.PackageException
Throws:
org.nuxeo.connect.update.PackageException

removePackage

public void removePackage(String id)

updateState

public void updateState(String id,
                        int state)
                 throws org.nuxeo.connect.update.PackageException
Throws:
org.nuxeo.connect.update.PackageException

Nuxeo Enterprise Platform 5.4

Copyright © 2011 Nuxeo SAS. All Rights Reserved.