Interface AcInstallationService


  • @ProviderType
    public interface AcInstallationService
    • Method Detail

      • applyAsynchronously

        String applyAsynchronously​(InstallationOptions options,
                                   boolean isVerboseLoggingEnabled)
        Applies the configuration asynchronously. Almost immediately returns a string with the ID of the started job. Only one execution at a time is allowed.
        Parameters:
        options - the installation options which further specify the installation
        isVerboseLoggingEnabled - if true, the log will contain more details, otherwise it will be more concise
        Returns:
        the job id
        Throws:
        IllegalStateException - if another asynchronous installation is currently running
        Since:
        4.0.0
        See Also:
        pollLog(String, int, BiConsumer, Duration, Duration)
      • pollLog

        boolean pollLog​(String jobId,
                        int offset,
                        BiConsumer<Optional<Integer>,​String> logConsumer,
                        Duration timeOut,
                        Duration pollInterval)
        Polls the log of an asynchronous installation job with the given ID until the job finishes or the timeout is reached. This method is blocking. It may be called multiple times in case a previous execution returned false due to a timeout or temporary error. In that case make sure to set the offset parameter to the last known offset of the log messages.
        Parameters:
        jobId - the job id returned by applyAsynchronously(InstallationOptions)
        offset - the offset of the last log message received, or 0 to start from the beginning
        logConsumer - is called for each log message (may contain new lines), the first parameter is the optional offset of the log message (for deduplication), the second parameter is the log message itself
        timeOut - the maximum time to wait for the job to finish, if the job does not finish within this time, the method returns false
        pollInterval - the interval between polls of the log, if the job is still running, the method will wait for this duration before polling again
        Returns:
        true if the logs were either polled successfully or the given job id is no longer running or invalid, false if the job ran into a timeout or a temporary error
      • isRunning

        boolean isRunning​(String jobId)
        Checks if the asynchronous installation job with the given ID is running.
        Parameters:
        jobId -
        Returns:
        true if the job with the given ID is running, false otherwise
        Since:
        3.6.1
      • apply

        @Deprecated
        InstallationLog apply()
        Deprecated.
        Applies the full configuration as stored at the path configured at PID biz.netcentric.cq.tools.actool.impl.AcInstallationServiceImpl to the repository.
        Returns:
        the installation log
      • apply

        @Deprecated
        InstallationLog apply​(String configurationRootPath)
        Deprecated.
        Applies the configuration as stored at the given configurationRootPath to the repository.
        Parameters:
        configurationRootPath - the root path for configuration files
        Returns:
        the installation log
      • apply

        @Deprecated
        InstallationLog apply​(String configurationRootPath,
                              String[] restrictedToPaths)
        Deprecated.
        Applies the configuration as stored at the given configurationRootPath to the repository, but only apply ACEs to given restrictedToPaths.
        Parameters:
        restrictedToPaths - only apply ACLs to root paths as given
        configurationRootPath - the root path for configuration files
        Returns:
        the installation log
      • apply

        @Deprecated
        InstallationLog apply​(String configurationRootPath,
                              String[] restrictedToPaths,
                              boolean skipIfConfigUnchanged)
        Deprecated.
        Applies the configuration as stored at the given configurationRootPath to the repository, but only apply ACEs to given restrictedToPaths.
        Parameters:
        restrictedToPaths - only apply ACLs to root paths as given
        configurationRootPath - the root path for configuration files
        skipIfConfigUnchanged - will check if the config is unchanged compared to last execution with same parameters
        Returns:
        the installation log
      • apply

        InstallationLog apply​(InstallationOptions options)
        Applies the configuration.
        Parameters:
        options - the installation options which further specify the installation
        Returns:
        the installation log
        Since:
        3.6.0
      • purgeACL

        String purgeACL​(String path)
        purges all acls of the node specified by path (no deletion of acls of subnodes)
        Parameters:
        path - the path from which to purge the ACL
        Returns:
        status message
      • purgeACLs

        String purgeACLs​(String path)
        Purges all acls of the node specified by path and all acls of all subnodes
        Parameters:
        path - the path from which to purge the ACL (including those of all subnodes)
        Returns:
        status message
      • purgeAuthorizables

        String purgeAuthorizables​(String[] authorizableIds)
        Purges authorizable(s) and all respective aces from the system
        Parameters:
        authorizableIds - Array of authorizableIds to purge
        Returns:
        status message