Class StandaloneUpdateService
- java.lang.Object
-
- org.nuxeo.connect.update.standalone.StandaloneUpdateService
-
- All Implemented Interfaces:
org.nuxeo.connect.update.PackageUpdateService
- Direct Known Subclasses:
UpdateServiceImpl
public class StandaloneUpdateService extends Object implements org.nuxeo.connect.update.PackageUpdateService
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Class<? extends org.nuxeo.connect.update.task.Command>>
commands
protected PackagePersistence
persistence
protected static XMap
xmap
-
Constructor Summary
Constructors Constructor Description StandaloneUpdateService(Environment env)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addCommand(String id, Class<? extends org.nuxeo.connect.update.task.Command> cmd)
protected void
addCommands()
org.nuxeo.connect.update.LocalPackage
addPackage(File file)
static XMap
createXmap()
org.nuxeo.connect.update.LocalPackage
getActivePackage(String name)
File
getBackupDir()
org.nuxeo.connect.update.task.Command
getCommand(String id)
File
getDataDir()
String
getDefaultInstallTaskType()
String
getDefaultUninstallTaskType()
FileTime
getInstallDate(String id)
org.nuxeo.connect.update.LocalPackage
getPackage(String id)
List<org.nuxeo.connect.update.LocalPackage>
getPackages()
PackagePersistence
getPersistence()
File
getRegistry()
static XMap
getXmap()
void
initialize()
boolean
isStarted(String pkgId)
org.nuxeo.connect.update.model.PackageDefinition
loadPackage(File file)
org.nuxeo.connect.update.model.PackageDefinition
loadPackage(InputStream in)
org.nuxeo.connect.update.model.PackageDefinition
loadPackageFromZip(File file)
void
removeCommand(String id)
void
removePackage(String id)
void
reset()
void
restart()
void
setPackageState(org.nuxeo.connect.update.LocalPackage pkg, int state)
Deprecated.void
setPackageState(org.nuxeo.connect.update.LocalPackage pkg, org.nuxeo.connect.update.PackageState state)
void
shutdown()
protected void
startInstalledPackages()
-
-
-
Field Detail
-
xmap
protected static volatile XMap xmap
-
persistence
protected PackagePersistence persistence
-
-
Constructor Detail
-
StandaloneUpdateService
public StandaloneUpdateService(Environment env) throws IOException
- Throws:
IOException
-
-
Method Detail
-
getXmap
public static XMap getXmap()
-
getDataDir
public File getDataDir()
- Specified by:
getDataDir
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
getPersistence
public PackagePersistence getPersistence()
-
addPackage
public org.nuxeo.connect.update.LocalPackage addPackage(File file) throws org.nuxeo.connect.update.PackageException
- Specified by:
addPackage
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
removePackage
public void removePackage(String id) throws org.nuxeo.connect.update.PackageException
- Specified by:
removePackage
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
getPackage
public org.nuxeo.connect.update.LocalPackage getPackage(String id) throws org.nuxeo.connect.update.PackageException
- Specified by:
getPackage
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
getPackages
public List<org.nuxeo.connect.update.LocalPackage> getPackages() throws org.nuxeo.connect.update.PackageException
- Specified by:
getPackages
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
createXmap
public static XMap createXmap()
-
initialize
public void initialize() throws org.nuxeo.connect.update.PackageException
- Specified by:
initialize
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
addCommands
protected void addCommands()
-
setPackageState
@Deprecated public void setPackageState(org.nuxeo.connect.update.LocalPackage pkg, int state) throws org.nuxeo.connect.update.PackageException
Deprecated.- Specified by:
setPackageState
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
setPackageState
public void setPackageState(org.nuxeo.connect.update.LocalPackage pkg, org.nuxeo.connect.update.PackageState state) throws org.nuxeo.connect.update.PackageException
- Specified by:
setPackageState
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
shutdown
public void shutdown() throws org.nuxeo.connect.update.PackageException
- Specified by:
shutdown
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
getCommand
public org.nuxeo.connect.update.task.Command getCommand(String id) throws org.nuxeo.connect.update.PackageException
- Specified by:
getCommand
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
getDefaultInstallTaskType
public String getDefaultInstallTaskType()
- Specified by:
getDefaultInstallTaskType
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
getDefaultUninstallTaskType
public String getDefaultUninstallTaskType()
- Specified by:
getDefaultUninstallTaskType
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
addCommand
public void addCommand(String id, Class<? extends org.nuxeo.connect.update.task.Command> cmd)
-
removeCommand
public void removeCommand(String id)
-
getActivePackage
public org.nuxeo.connect.update.LocalPackage getActivePackage(String name) throws org.nuxeo.connect.update.PackageException
- Specified by:
getActivePackage
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
loadPackageFromZip
public org.nuxeo.connect.update.model.PackageDefinition loadPackageFromZip(File file) throws org.nuxeo.connect.update.PackageException
- Specified by:
loadPackageFromZip
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
loadPackage
public org.nuxeo.connect.update.model.PackageDefinition loadPackage(File file) throws org.nuxeo.connect.update.PackageException
- Specified by:
loadPackage
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
loadPackage
public org.nuxeo.connect.update.model.PackageDefinition loadPackage(InputStream in) throws org.nuxeo.connect.update.PackageException
- Specified by:
loadPackage
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
startInstalledPackages
protected void startInstalledPackages() throws org.nuxeo.connect.update.PackageException
- Throws:
org.nuxeo.connect.update.PackageException
-
reset
public void reset() throws org.nuxeo.connect.update.PackageException
- Specified by:
reset
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
restart
public void restart() throws org.nuxeo.connect.update.PackageException
- Specified by:
restart
in interfaceorg.nuxeo.connect.update.PackageUpdateService
- Throws:
org.nuxeo.connect.update.PackageException
-
isStarted
public boolean isStarted(String pkgId)
- Specified by:
isStarted
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
getRegistry
public File getRegistry()
- Specified by:
getRegistry
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
getBackupDir
public File getBackupDir()
- Specified by:
getBackupDir
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
-