Interface RegistryService


  • public interface RegistryService
    This interface can be used to implement an OSGi Service of the Registry. By doing so, the registry would become accessible beyond the Registry Kernel. The OSGi service also can be used as means to make sure that no registry related logic executes before the registry has been fully initialized, and made operational. Also, when the registry is no longer in service, all external entities that use the registry would also become automatically suspended.
    • Method Detail

      • getRegistry

        Registry getRegistry()
                      throws RegistryException
        Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'. Permissions set for anonymous user will be applied for all operations performed using this instance.

        This registry instance belongs to the super tenant of the system.

        Returns:
        Complete Registry for the anonymous user.
        Throws:
        RegistryException - if an error occurs
      • getRegistry

        Registry getRegistry​(String userName,
                             String password)
                      throws RegistryException
        Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'. User name and the password will be authenticated by the EmbeddedRegistry before creating the requested Registry instance.

        This registry instance belongs to the super tenant of the system.

        Parameters:
        userName - User name of the user.
        password - Password of the user.
        Returns:
        Complete Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getRegistry

        Registry getRegistry​(String userName)
                      throws RegistryException
        Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'. This method will NOT authenticate the user before creating the Registry instance. It assumes that the user is authenticated outside the EmbeddedRegistry.

        This registry instance belongs to the super tenant of the system.

        Parameters:
        userName - User name of the user.
        Returns:
        Complete Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getRegistry

        Registry getRegistry​(String userName,
                             String password,
                             int tenantId)
                      throws RegistryException
        Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'. User name and the password will be authenticated by the EmbeddedRegistry before creating the requested Registry instance. This method can be used to obtain instances of Registry belonging to users of multiple tenants.
        Parameters:
        userName - User name of the user.
        password - Password of the user.
        tenantId - tenant id of the user tenant. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        Returns:
        Complete Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getRegistry

        Registry getRegistry​(String userName,
                             String password,
                             int tenantId,
                             String chroot)
                      throws RegistryException
        Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'. User name and the password will be authenticated by the EmbeddedRegistry before creating the requested Registry instance. This method can be used to obtain instances of Registry belonging to users of multiple tenants. The returned Registry will be chrooted to the given path, making it possible to use relative paths.
        Parameters:
        userName - User name of the user.
        password - Password of the user.
        tenantId - tenant id of the user tenant. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        chroot - to return a chrooted registry. The whole registry can be accessed by using the chroot, '/', and a subset of the registry can be accessed by using a chroot, '/x/y/z'. For example, the repository of the configuration local registry can be obtained from '/_system/config/repository'.
        Returns:
        Complete Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getRegistry

        Registry getRegistry​(String userName,
                             int tenantId)
                      throws RegistryException
        Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'. This method will NOT authenticate the user before creating the Registry instance. It assumes that the user is authenticated outside the EmbeddedRegistry. This method can be used to obtain instances of Registry belonging to users of multiple tenants.
        Parameters:
        userName - User name of the user.
        tenantId - tenant id of the user tenant. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        Returns:
        Complete Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getRegistry

        Registry getRegistry​(String userName,
                             int tenantId,
                             String chroot)
                      throws RegistryException
        Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'. This method will NOT authenticate the user before creating the Registry instance. It assumes that the user is authenticated outside the EmbeddedRegistry. This method can be used to obtain instances of Registry belonging to users of multiple tenants. The returned Registry will be chrooted to the given path, making it possible to use relative paths.
        Parameters:
        userName - User name of the user.
        tenantId - tenant id of the user tenant. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        chroot - to return a chrooted registry. The whole registry can be accessed by using the chroot, '/', and a subset of the registry can be accessed by using a chroot, '/x/y/z'. For example, the repository of the configuration local registry can be obtained from '/_system/config/repository'.
        Returns:
        Complete Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getLocalRepository

        Registry getLocalRepository()
                             throws RegistryException
        Returns a registry to be used for node-specific system operations. Human users should not be allowed to log in to this registry. This is the Local Repository which can only be used by the system.

        This registry instance belongs to the super tenant of the system.

        Returns:
        Local Repository for system user.
        Throws:
        RegistryException - if an error occurs
      • getLocalRepository

        Registry getLocalRepository​(int tenantId)
                             throws RegistryException
        Returns a registry to be used for node-specific system operations. Human users should not be allowed to log in to this registry. This is the Local Repository which can only be used by the system.

        This registry instance belongs to a valid tenant of the system.

        Parameters:
        tenantId - tenant id of the user tenant. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        Returns:
        Local Repository for system user.
        Throws:
        RegistryException - if an error occurs
      • getConfigSystemRegistry

        Registry getConfigSystemRegistry()
                                  throws RegistryException
        Returns a registry to be used for system operations. Human users should not be allowed log in using this registry. This is the Configuration registry space which is used by the system.

        This registry instance belongs to the super tenant of the system.

        Returns:
        Config Registry for system user.
        Throws:
        RegistryException - if an error occurs
      • getConfigSystemRegistry

        Registry getConfigSystemRegistry​(int tenantId)
                                  throws RegistryException
        Returns a registry to be used for system operations. Human users should not be allowed log in using this registry. This is the Configuration registry space which is used by the system.
        Parameters:
        tenantId - the tenant id of the system. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        Returns:
        User registry for system user.
        Throws:
        RegistryException - if an error occurs
      • getConfigUserRegistry

        Registry getConfigUserRegistry()
                                throws RegistryException
        Creates a Registry instance for anonymous user from the configuration registry space. Permissions set for anonymous user will be applied for all operations performed using this instance.

        This registry instance belongs to the super tenant of the system.

        Returns:
        Config Registry for the anonymous user.
        Throws:
        RegistryException - if an error occurs
      • getConfigUserRegistry

        Registry getConfigUserRegistry​(String userName,
                                       String password)
                                throws RegistryException
        Creates Registry instances for normal users from the configuration registry space. Applications should use this method to create Registry instances, unless there is a specific need documented in other methods. User name and the password will be authenticated by the EmbeddedRegistry before creating the requested Registry instance.

        This registry instance belongs to the super tenant of the system.

        Parameters:
        userName - User name of the user.
        password - Password of the user.
        Returns:
        Config Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getConfigUserRegistry

        Registry getConfigUserRegistry​(String userName)
                                throws RegistryException
        Creates a Registry instance for the given user from the configuration registry space. This method will NOT authenticate the user before creating the Registry instance. It assumes that the user is authenticated outside the EmbeddedRegistry.

        This registry instance belongs to the super tenant of the system.

        Parameters:
        userName - User name of the user.
        Returns:
        Config Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getConfigUserRegistry

        Registry getConfigUserRegistry​(String userName,
                                       int tenantId)
                                throws RegistryException
        Creates a Registry instance for the given user from the configuration registry space with the tenant id. This method will NOT authenticate the user before creating the Registry instance. It assumes that the user is authenticated outside the registry service.
        Parameters:
        userName - User name of the user.
        tenantId - tenant id of the user tenant. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        Returns:
        Config Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getConfigUserRegistry

        Registry getConfigUserRegistry​(String userName,
                                       String password,
                                       int tenantId)
                                throws RegistryException
        Creates Registry instances for normal users from the configuration registry space. Applications should use this method to create Registry instances, unless there is a specific need documented in other methods. User name and the password will be authenticated by the EmbeddedRegistry before creating the requested Registry instance.
        Parameters:
        userName - User name of the user.
        tenantId - tenant id of the user tenant. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        password - Password of the user.
        Returns:
        Config Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getGovernanceSystemRegistry

        Registry getGovernanceSystemRegistry()
                                      throws RegistryException
        Creates a Registry instance for the Governance space. This is the Governance registry space which is used by the system.

        This registry instance belongs to the super tenant of the system.

        Returns:
        Governance Registry for system user.
        Throws:
        RegistryException - if an error occurs
      • getGovernanceSystemRegistry

        Registry getGovernanceSystemRegistry​(int tenantId)
                                      throws RegistryException
        Creates a Registry instance for the Governance space. This is the Governance registry space which is used by the system.
        Parameters:
        tenantId - the tenant id of the system. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        Returns:
        Governance registry for system user.
        Throws:
        RegistryException - if an error occurs
      • getGovernanceUserRegistry

        Registry getGovernanceUserRegistry()
                                    throws RegistryException
        Creates a Registry instance for anonymous user from the Governance space. Permissions set for anonymous user will be applied for all operations performed using this instance.

        This registry instance belongs to the super tenant of the system.

        Returns:
        Governance Registry for the anonymous user.
        Throws:
        RegistryException - if an error occurs
      • getGovernanceUserRegistry

        Registry getGovernanceUserRegistry​(String userName,
                                           String password)
                                    throws RegistryException
        Creates a Registry instance for anonymous user from the Governance space. User name and the password will be authenticated by the EmbeddedRegistry before creating the requested Registry instance.

        This registry instance belongs to the super tenant of the system.

        Parameters:
        userName - User name of the user.
        password - Password of the user.
        Returns:
        Governance Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getGovernanceUserRegistry

        Registry getGovernanceUserRegistry​(String userName)
                                    throws RegistryException
        Creates a Registry instance for anonymous user from the Governance space. This method will NOT authenticate the user before creating the Registry instance. It assumes that the user is authenticated outside the EmbeddedRegistry.

        This registry instance belongs to the super tenant of the system.

        Parameters:
        userName - User name of the user.
        Returns:
        Governance Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getGovernanceUserRegistry

        Registry getGovernanceUserRegistry​(String userName,
                                           String password,
                                           int tenantId)
                                    throws RegistryException
        Creates a Registry instance for anonymous user from the Governance space. User name and the password will be authenticated by the EmbeddedRegistry before creating the requested Registry instance. This method can be used to obtain instances of Registry belonging to users of multiple tenants.
        Parameters:
        userName - User name of the user.
        password - Password of the user.
        tenantId - tenant id of the user tenant. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        Returns:
        Governance Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs
      • getGovernanceUserRegistry

        Registry getGovernanceUserRegistry​(String userName,
                                           int tenantId)
                                    throws RegistryException
        Creates a Registry instance for anonymous user from the Governance space. This method will NOT authenticate the user before creating the Registry instance. It assumes that the user is authenticated outside the EmbeddedRegistry. This method can be used to obtain instances of Registry belonging to users of multiple tenants.
        Parameters:
        userName - User name of the user.
        tenantId - tenant id of the user tenant. The tenant id '0', corresponds to the super tenant of the system, whereas identifiers greater than '0' correspond to valid tenants.
        Returns:
        Governance Registry instance for the given user.
        Throws:
        RegistryException - if an error occurs