Interface IRuntimeInstallationManager

  • All Superinterfaces:
    IRuntimeInstallationDiscriminator
    All Known Implementing Classes:
    RuntimeInstallationManager

    public interface IRuntimeInstallationManager
    extends IRuntimeInstallationDiscriminator
    Manager service to manage local 1C:Enterprise runtime installations. Allows:
    • Add, get and save 1C:Enterprise runtime installations.
    • Resolve 1C:Enterprise runtime installation version based on registered installation discriminators.
    • Search for existing or target directory installations based on registered installation lookups.
    • Register installation change listeners.

    Method isSupportedByOs() can test properly manager usage with current operation system.

    See Also:
    IRuntimeInstallationDiscriminator
    Restriction:
    This interface is not intended to be extended by clients.
    Restriction:
    This interface is not intended to be implemented by clients.
    • Method Detail

      • isSupportedByOs

        boolean isSupportedByOs()
        Returns whether manager supports current running operation system. Result is based on registered 1C:Enterprise runtime component resolvers and version resolvers.
        Returns:
        whether service supports current running operations system
      • isSearchAvailable

        boolean isSearchAvailable()
        Returns whether search for local installations of 1C:Enterprise runtime is available for the installation manager. If false, then search attempts will always return empty results.
        Returns:
        whether search for local installations of 1C:Enterprise runtime is available for the installation manager
      • getAllSupported

        List<RuntimeInstallation> getAllSupported()
        Returns all registered and supported 1C:Enterprise runtime installations.
        Returns:
        a list of all registered and supported 1C:Enterprise runtime installations, never null
      • get

        RuntimeInstallation get​(UUID uuid)
        Returns the 1C:Enterprise runtime installation by the provided UUID.
        Parameters:
        uuid - the UUID to get 1C:Enterprise runtime installation with, cannot be null
        Returns:
        the 1C:Enterprise runtime installation by provided UUID, or null if not found
      • save

        void save​(List<RuntimeInstallation> installations)
        Saves the entire list of the provided 1C:Enterprise runtime installations. All registered installations will be replaced.
        Parameters:
        installations - a list of 1C:Enterprise runtime installations to save, cannot be null
      • add

        void add​(RuntimeInstallation installation)
        Adds and saves the provided 1C:Enterprise runtime installation.
        Parameters:
        installation - the 1C:Enterprise runtime installation to add, cannot be null
      • generateUniqueName

        String generateUniqueName​(Version version,
                                  int build,
                                  boolean training,
                                  Arch arch)
        Generates an unique name for the 1C:Enterprise runtime installation based on the provided version, build number and installation architecture.
        Parameters:
        version - the version of the provided 1C:Enterprise runtime installation, cannot be null
        build - the build number of the provided 1C:Enterprise runtime installation, cannot be null
        training - whether to generatean unique name for a training 1C:Enterprise platform installation
        arch - the architecture of the provided 1C:Enterprise runtime installation, cannot be null
        Returns:
        a unique 1C:Enterprise runtime installation name, never null
      • refresh

        void refresh()
        Refreshes current collection of 1C:Enterprise runtime installations.
      • search

        List<RuntimeInstallation> search​(Collection<String> existingNames,
                                         org.eclipse.core.runtime.IProgressMonitor monitor)
        Searches for local installations of 1C:Enterprise runtime in default locations. Default location depends on the current OS. Returns a list of found 1C:Enterprise runtime installations.
        Parameters:
        existingNames - a collection of already existing names, manager will not use any of it for newly found 1C:Enterprise runtime installations, cannot be null, can be empty
        monitor - the progress monitor to report progress to and check cancellation status, cannot be null
        Returns:
        a list of found 1C:Enterprise runtime installations, never null
      • search

        List<RuntimeInstallation> search​(Path directory,
                                         Collection<String> existingNames,
                                         org.eclipse.core.runtime.IProgressMonitor monitor)
        Searches for local installations of 1C:Enterprise runtime in the target directory. Returns a list of found 1C:Enterprise runtime installations.
        Parameters:
        directory - the target directory to search 1C:Enterprise runtime installations in, cannot be null
        existingNames - a collection of already existing names, manager will not use any of it for newly found 1C:Enterprise runtime installations, cannot be null, can be empty
        monitor - the progress monitor to report progress to and check cancellation status, cannot be null
        Returns:
        a list of found 1C:Enterprise runtime installations, never null
      • addRuntimeInstallationChangeListener

        void addRuntimeInstallationChangeListener​(IRuntimeInstallationChangeListener listener)
        Adds the 1C:Enterprise runtime installation change listener to the manager. The listener will be notified about runtime installations changes.

        Causes no effect if the provided listener is already registered.

        Parameters:
        listener - the change listener to add, cannot be null
        See Also:
        IRuntimeInstallationChangeListener
      • removeRuntimeInstallationChangeListener

        void removeRuntimeInstallationChangeListener​(IRuntimeInstallationChangeListener listener)
        Removes the registered listener from the manager. The listener will no longer be notified about 1C:Enterprise runtime installations changes.
        Parameters:
        listener - the change listener to remove, cannot be null
        See Also:
        IRuntimeInstallationChangeListener
      • getAllRegistered

        List<RuntimeInstallation> getAllRegistered()
        Returns all registered 1C:Enterprise runtime installations.
        Returns:
        a list of all found and registered 1C:Enterprise runtime installations, never null