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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCommand
(String id, Class<? extends org.nuxeo.connect.update.task.Command> cmd) protected void
org.nuxeo.connect.update.LocalPackage
addPackage
(File file) static XMap
org.nuxeo.connect.update.LocalPackage
getActivePackage
(String name) org.nuxeo.connect.update.task.Command
getCommand
(String id) getInstallDate
(String id) org.nuxeo.connect.update.LocalPackage
getPackage
(String id) List<org.nuxeo.connect.update.LocalPackage>
static XMap
getXmap()
void
boolean
org.nuxeo.connect.update.model.PackageDefinition
loadPackage
(File file) org.nuxeo.connect.update.model.PackageDefinition
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
-
Field Details
-
xmap
-
persistence
-
commands
-
-
Constructor Details
-
StandaloneUpdateService
- Throws:
IOException
-
-
Method Details
-
getXmap
-
getDataDir
- Specified by:
getDataDir
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
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
- 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
-
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
- Specified by:
getDefaultInstallTaskType
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
getDefaultUninstallTaskType
- Specified by:
getDefaultUninstallTaskType
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
addCommand
-
removeCommand
-
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
- Specified by:
isStarted
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
getRegistry
- Specified by:
getRegistry
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
getBackupDir
- Specified by:
getBackupDir
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-
getInstallDate
- Specified by:
getInstallDate
in interfaceorg.nuxeo.connect.update.PackageUpdateService
-