Interface ConfigurationManager


  • public interface ConfigurationManager
    Represents a service for managing Configuration entries.
    Since:
    5.5
    • Method Detail

      • getServices

        java.util.Iterator<Service> getServices()
        Returns an Iterator of Service objects loaded from the children of the configuration base path.
        Returns:
        Iterator of Service's
      • getServices

        java.util.Iterator<Service> getServices​(java.lang.String[] paths,
                                                java.util.Comparator<Service> comparator)
        Returns an Iterator of Service objects loaded from the provided paths.
        Parameters:
        paths - Service configuration paths
        comparator - A service comparator for ordering
        Returns:
        Iterator of Service's
      • getService

        Service getService​(java.lang.String name)
        Returns the Service with the given name.
        Parameters:
        name - servicename
        Returns:
        Service with given name
      • getServiceName

        java.lang.String getServiceName​(java.lang.String path)
        Returns the service name extracted from provided path.
        Parameters:
        path - path of service persistence
        Returns:
        Service name from given path
      • getConfiguration

        Configuration getConfiguration​(java.lang.String path)
        Returns a Configuration object from the given path or null if the resource is not adaptable.
        Parameters:
        path - Path to the configuration
        Returns:
        Configuration or null
      • getConfiguration

        Configuration getConfiguration​(java.lang.String servicename,
                                       java.lang.String[] configPaths)
        Returns the first Configuration object for a specific service from an array of configuration paths.
        Parameters:
        servicename - servicename
        configPaths - array of config paths
        Returns:
        Configuration or null
      • getConfigurations

        java.util.Iterator<Configuration> getConfigurations​(java.lang.String rootPath)
        Returns an Iterator of Configuration objects loaded from the children of a given rootPath.
        Parameters:
        rootPath - root path for lookup
        Returns:
        Iterator of Configuration's
      • getConfigurationResource

        Resource getConfigurationResource​(Resource resource)
        Ascends the Resource until a Page with a valid configuration is found. The configuration is considered valid if the node has a property cq:cloudserviceconfigs.
        Parameters:
        resource - Resource to check for valid configuration
        Returns:
        Page resource or null if none could be found.