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 java.lang.Object

The file nxserver/data/packages/.packages is storing the sate of all local features Each local package have a corresponding directory in nxserver/data/features/store which is named: ("id-version")

Author:
Bogdan Stefanescu

Constructor Summary
PackagePersistence()
           
 
Method Summary
 org.nuxeo.connect.update.LocalPackage addPackage(java.io.File file)
           
 org.nuxeo.connect.update.LocalPackage getActivePackage(java.lang.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
 java.lang.String getActivePackageId(java.lang.String name)
           
 org.nuxeo.connect.update.LocalPackage getPackage(java.lang.String id)
           
 java.util.List<org.nuxeo.connect.update.LocalPackage> getPackages()
           
 java.io.File getRoot()
           
 int getState(java.lang.String featureId)
           
 java.util.Map<java.lang.String,java.lang.Integer> getStates()
           
 void removePackage(java.lang.String id)
           
 void updateState(java.lang.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 java.io.IOException
Throws:
java.io.IOException
Method Detail

getRoot

public java.io.File getRoot()

getStates

public java.util.Map<java.lang.String,java.lang.Integer> getStates()

getPackage

public org.nuxeo.connect.update.LocalPackage getPackage(java.lang.String id)
                                                 throws org.nuxeo.connect.update.PackageException
Throws:
org.nuxeo.connect.update.PackageException

addPackage

public org.nuxeo.connect.update.LocalPackage addPackage(java.io.File file)
                                                 throws org.nuxeo.connect.update.PackageException
Throws:
org.nuxeo.connect.update.PackageException

getState

public int getState(java.lang.String featureId)
             throws org.nuxeo.connect.update.PackageException
Throws:
org.nuxeo.connect.update.PackageException

getActivePackage

public org.nuxeo.connect.update.LocalPackage getActivePackage(java.lang.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 java.lang.String getActivePackageId(java.lang.String name)

getPackages

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

removePackage

public void removePackage(java.lang.String id)
                   throws org.nuxeo.connect.update.PackageException
Throws:
org.nuxeo.connect.update.PackageException

updateState

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

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.