Class RuntimeInstallationManager

    • Constructor Detail

      • RuntimeInstallationManager

        @Inject
        public RuntimeInstallationManager​(String runtimeTypeId)
        Creates an instance of RuntimeInstallationManager for the provided 1C:Enterprise runtime type id.
        Parameters:
        runtimeTypeId - the 1C:Enterprise runtime type id, cannot be null
    • Method Detail

      • isSupportedByOs

        public boolean isSupportedByOs()
        Description copied from interface: IRuntimeInstallationManager
        Returns whether manager supports current running operation system. Result is based on registered 1C:Enterprise runtime component resolvers and version resolvers.
        Specified by:
        isSupportedByOs in interface IRuntimeInstallationManager
        Returns:
        whether service supports current running operations system
      • isSearchAvailable

        public boolean isSearchAvailable()
        Description copied from interface: IRuntimeInstallationManager
        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.
        Specified by:
        isSearchAvailable in interface IRuntimeInstallationManager
        Returns:
        whether search for local installations of 1C:Enterprise runtime is available for the installation manager
      • get

        public RuntimeInstallation get​(UUID uuid)
        Description copied from interface: IRuntimeInstallationManager
        Returns the 1C:Enterprise runtime installation by the provided UUID.
        Specified by:
        get in interface IRuntimeInstallationManager
        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

        public void save​(List<RuntimeInstallation> installations)
        Description copied from interface: IRuntimeInstallationManager
        Saves the entire list of the provided 1C:Enterprise runtime installations. All registered installations will be replaced.
        Specified by:
        save in interface IRuntimeInstallationManager
        Parameters:
        installations - a list of 1C:Enterprise runtime installations to save, cannot be null
      • search

        public List<RuntimeInstallation> search​(Collection<String> existingNames,
                                                org.eclipse.core.runtime.IProgressMonitor monitor)
        Description copied from interface: IRuntimeInstallationManager
        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.
        Specified by:
        search in interface IRuntimeInstallationManager
        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

        public List<RuntimeInstallation> search​(Path directory,
                                                Collection<String> existingNames,
                                                org.eclipse.core.runtime.IProgressMonitor monitor)
        Description copied from interface: IRuntimeInstallationManager
        Searches for local installations of 1C:Enterprise runtime in the target directory. Returns a list of found 1C:Enterprise runtime installations.
        Specified by:
        search in interface IRuntimeInstallationManager
        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
      • generateUniqueName

        public String generateUniqueName​(Version version,
                                         int build,
                                         boolean training,
                                         Arch arch)
        Description copied from interface: IRuntimeInstallationManager
        Generates an unique name for the 1C:Enterprise runtime installation based on the provided version, build number and installation architecture.
        Specified by:
        generateUniqueName in interface IRuntimeInstallationManager
        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
      • generateUniqueName

        public String generateUniqueName​(Version version,
                                         int build,
                                         boolean training,
                                         Arch arch,
                                         Collection<String> existingNames)
        Description copied from interface: IRuntimeInstallationNameGenerator
        Generates an unique name for the 1C:Enterprise runtime installation based on the provided version, build number and installation architecture.
        Specified by:
        generateUniqueName in interface IRuntimeInstallationNameGenerator
        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
        existingNames - a collection of already existed names to guarantee uniqueness for, cannot be null, may be empty
        Returns:
        a unique 1C:Enterprise runtime installation name, never null
      • discriminate

        public Optional<RuntimeInstallationDescription> discriminate​(URI location)
                                                              throws org.eclipse.core.runtime.CoreException
        Description copied from interface: IRuntimeInstallationDiscriminator
        Tries to discriminate the 1C:Enterprise runtime installation by the provided location. Returns an optional description of the 1C:Enterprise runtime installation:
        • The version of the target 1C:Enterprise runtime installation (e.g. 8.3.8)
        • The build number of the target 1C:Enterprise runtime installation (e.g. 1945)
        • The architectire of the target 1C:Enterprise runtime installation (e.g. x86)
        Specified by:
        discriminate in interface IRuntimeInstallationDiscriminator
        Parameters:
        location - the 1C:Enterprise runtime install location to get version from, cannot be null
        Returns:
        an optional description of the 1C:Enterprise runtime installation
        Throws:
        org.eclipse.core.runtime.CoreException - if description resolve failed with some reason
        See Also:
        RuntimeInstallationDescription