Class 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 Detail

      • xmap

        protected static volatile XMap xmap
      • commands

        protected Map<String,​Class<? extends org.nuxeo.connect.update.task.Command>> commands
    • Method Detail

      • getXmap

        public static XMap getXmap()
      • getDataDir

        public File getDataDir()
        Specified by:
        getDataDir in interface org.nuxeo.connect.update.PackageUpdateService
      • addPackage

        public org.nuxeo.connect.update.LocalPackage addPackage​(File file)
                                                         throws org.nuxeo.connect.update.PackageException
        Specified by:
        addPackage in interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.nuxeo.connect.update.PackageUpdateService
        Throws:
        org.nuxeo.connect.update.PackageException
      • shutdown

        public void shutdown()
                      throws org.nuxeo.connect.update.PackageException
        Specified by:
        shutdown in interface org.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 interface org.nuxeo.connect.update.PackageUpdateService
        Throws:
        org.nuxeo.connect.update.PackageException
      • getDefaultInstallTaskType

        public String getDefaultInstallTaskType()
        Specified by:
        getDefaultInstallTaskType in interface org.nuxeo.connect.update.PackageUpdateService
      • getDefaultUninstallTaskType

        public String getDefaultUninstallTaskType()
        Specified by:
        getDefaultUninstallTaskType in interface org.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 interface org.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 interface org.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 interface org.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 interface org.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 interface org.nuxeo.connect.update.PackageUpdateService
        Throws:
        org.nuxeo.connect.update.PackageException
      • restart

        public void restart()
                     throws org.nuxeo.connect.update.PackageException
        Specified by:
        restart in interface org.nuxeo.connect.update.PackageUpdateService
        Throws:
        org.nuxeo.connect.update.PackageException
      • isStarted

        public boolean isStarted​(String pkgId)
        Specified by:
        isStarted in interface org.nuxeo.connect.update.PackageUpdateService
      • getRegistry

        public File getRegistry()
        Specified by:
        getRegistry in interface org.nuxeo.connect.update.PackageUpdateService
      • getBackupDir

        public File getBackupDir()
        Specified by:
        getBackupDir in interface org.nuxeo.connect.update.PackageUpdateService
      • getInstallDate

        public FileTime getInstallDate​(String id)
        Specified by:
        getInstallDate in interface org.nuxeo.connect.update.PackageUpdateService