org.wso2.carbon.registry.app
Class RemoteRegistryService

java.lang.Object
  extended by org.wso2.carbon.registry.app.RemoteRegistryService
All Implemented Interfaces:
RegistryService

public class RemoteRegistryService
extends Object
implements RegistryService

This is a core class used by application that use registry in the remote mode. This class is used to create remote registry instances for user sessions. The class acts in a manner that is similar to an EmbeddedRegistryService.


Constructor Summary
RemoteRegistryService(String registryURL, String username, String password)
          Creates a new remote registry service.
RemoteRegistryService(String registryURL, String username, String password, org.wso2.carbon.user.core.service.RealmService realmService, String chroot)
          Creates a new remote registry service.
RemoteRegistryService(String registryURL, String username, String password, org.wso2.carbon.user.core.service.RealmService realmService, String chroot, boolean populateConfiguration)
          Creates a new remote registry service.
RemoteRegistryService(String registryURL, String username, String password, String chroot)
          Creates a new remote registry service.
 
Method Summary
 UserRegistry getConfigSystemRegistry()
          Returns a registry to be used for system operations.
 UserRegistry getConfigSystemRegistry(int tenantId)
          Returns a registry to be used for system operations.
 UserRegistry getConfigUserRegistry()
          Creates a Registry instance for anonymous user from the configuration registry space.
 UserRegistry getConfigUserRegistry(String userName)
          Creates a Registry instance for the given user from the configuration registry space.
 UserRegistry getConfigUserRegistry(String userName, int tenantId)
          Creates a Registry instance for the given user from the configuration registry space with the tenant id.
 UserRegistry getConfigUserRegistry(String userName, String password)
          Creates Registry instances for normal users from the configuration registry space.
 UserRegistry getConfigUserRegistry(String userName, String password, int tenantId)
          Creates Registry instances for normal users from the configuration registry space.
 UserRegistry getGovernanceSystemRegistry()
          Creates a Registry instance for the Governance space.
 UserRegistry getGovernanceSystemRegistry(int tenantId)
          Creates a Registry instance for the Governance space.
 UserRegistry getGovernanceUserRegistry()
          Creates a Registry instance for anonymous user from the Governance space.
 UserRegistry getGovernanceUserRegistry(String userName)
          Creates a Registry instance for anonymous user from the Governance space.
 UserRegistry getGovernanceUserRegistry(String userName, int tenantId)
          Creates a Registry instance for anonymous user from the Governance space.
 UserRegistry getGovernanceUserRegistry(String userName, String password)
          Creates a Registry instance for anonymous user from the Governance space.
 UserRegistry getGovernanceUserRegistry(String userName, String password, int tenantId)
          Creates a Registry instance for anonymous user from the Governance space.
 UserRegistry getLocalRepository()
          Returns a registry to be used for node-specific system operations.
 UserRegistry getLocalRepository(int tenantId)
          Returns a registry to be used for node-specific system operations.
 UserRegistry getRegistry()
          Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'.
 UserRegistry getRegistry(String userName)
          Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'.
 UserRegistry getRegistry(String userName, int tenantId)
          Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'.
 UserRegistry getRegistry(String userName, int tenantId, String chroot)
          Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'.
 UserRegistry getRegistry(String userName, String password)
          Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'.
 UserRegistry getRegistry(String userName, String password, int tenantId)
          Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'.
 UserRegistry getRegistry(String userName, String password, int tenantId, String chroot)
          Creates a Registry instance for anonymous user which contains the entire registry tree starting from '/'.
 UserRegistry getSystemRegistry()
          Returns a registry to be used for system operations.
 UserRegistry getSystemRegistry(int tenantId)
          Returns a registry to be used for system operations.
 UserRegistry getSystemRegistry(int tenantId, String chroot)
          Returns a registry to be used for system operations.
 org.wso2.carbon.user.core.UserRealm getUserRealm(int tenantId)
          This will return a realm specific to the tenant.
 UserRegistry getUserRegistry()
          Creates a UserRegistry instance for anonymous user.
 UserRegistry getUserRegistry(String userName)
          Creates a Registry instance for the given user.
 UserRegistry getUserRegistry(String userName, int tenantId)
          Creates a Registry instance for the given user with tenant id.
 UserRegistry getUserRegistry(String userName, int tenantId, String chroot)
          Creates a Registry instance for the given user with tenant id.
 UserRegistry getUserRegistry(String username, String password)
          Creates UserRegistry instances for normal users.
 UserRegistry getUserRegistry(String username, String password, int tenantId)
          Creates UserRegistry instances for normal users.
 UserRegistry getUserRegistry(String username, String password, int tenantId, String chroot)
          Creates UserRegistry instances for normal users.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemoteRegistryService

public RemoteRegistryService(String registryURL,
                             String username,
                             String password)
                      throws RegistryException
Creates a new remote registry service. This method is intended to be used at the remote end.

Parameters:
registryURL - URL to the registry.
username - the user name.
password - the password.
Throws:
RegistryException - if an error occurred.

RemoteRegistryService

public RemoteRegistryService(String registryURL,
                             String username,
                             String password,
                             String chroot)
                      throws RegistryException
Creates a new remote registry service. This method is intended to be used at the remote end.

Parameters:
registryURL - the registry url.
username - the user name.
password - the password.
chroot - the chroot.
Throws:
RegistryException - if an error occurred.

RemoteRegistryService

public RemoteRegistryService(String registryURL,
                             String username,
                             String password,
                             org.wso2.carbon.user.core.service.RealmService realmService,
                             String chroot)
                      throws RegistryException
Creates a new remote registry service. This method is intended to be used at the local end.

Parameters:
registryURL - the registry url.
username - the user name.
password - the password.
realmService - the OSGi user realm service.
chroot - the chroot.
Throws:
RegistryException - if an error occurred.

RemoteRegistryService

public RemoteRegistryService(String registryURL,
                             String username,
                             String password,
                             org.wso2.carbon.user.core.service.RealmService realmService,
                             String chroot,
                             boolean populateConfiguration)
                      throws RegistryException
Creates a new remote registry service.

Parameters:
registryURL - the registry url.
username - the user name.
password - the password.
realmService - the OSGi user realm service.
chroot - the chroot.
populateConfiguration - whether the configuration must be populated or not.
Throws:
RegistryException - if an error occurred.
Method Detail

getUserRegistry

public UserRegistry getUserRegistry()
                             throws RegistryException
Description copied from interface: RegistryService
Creates a UserRegistry instance for anonymous user. 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:
UserRegistry for the anonymous user.
Throws:
RegistryException - if an error occurs

getSystemRegistry

public UserRegistry getSystemRegistry()
                               throws RegistryException
Description copied from interface: RegistryService
Returns a registry to be used for system operations. Human users should not be allowed log in using this registry.

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

Returns:
User registry for system user.
Throws:
RegistryException - if an error occurs

getSystemRegistry

public UserRegistry getSystemRegistry(int tenantId)
                               throws RegistryException
Description copied from interface: RegistryService
Returns a registry to be used for system operations. Human users should not be allowed log in using this registry.

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

getSystemRegistry

public UserRegistry getSystemRegistry(int tenantId,
                                      String chroot)
                               throws RegistryException
Description copied from interface: RegistryService
Returns a registry to be used for system operations. Human users should not be allowed log in using this registry.

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.
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:
User registry for system user.
Throws:
RegistryException - if an error occurs

getUserRegistry

public UserRegistry getUserRegistry(String username,
                                    String password)
                             throws RegistryException
Description copied from interface: RegistryService
Creates UserRegistry instances for normal users. Applications should use this method to create UserRegistry 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 UserRegistry 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:
UserRegistry instance for the given user.
Throws:
RegistryException - if an error occurs

getUserRegistry

public UserRegistry getUserRegistry(String username,
                                    String password,
                                    int tenantId)
                             throws RegistryException
Description copied from interface: RegistryService
Creates UserRegistry instances for normal users. Applications should use this method to create UserRegistry 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 UserRegistry instance.

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:
UserRegistry instance for the given user.
Throws:
RegistryException - if an error occurs

getUserRegistry

public UserRegistry getUserRegistry(String username,
                                    String password,
                                    int tenantId,
                                    String chroot)
                             throws RegistryException
Description copied from interface: RegistryService
Creates UserRegistry instances for normal users. Applications should use this method to create UserRegistry 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 UserRegistry instance.

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:
UserRegistry instance for the given user.
Throws:
RegistryException - if an error occurs

getUserRegistry

public UserRegistry getUserRegistry(String userName)
                             throws RegistryException
Description copied from interface: RegistryService
Creates a Registry instance for the given user. This method will NOT authenticate the user before creating the UserRegistry 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:
UserRegistry instance for the given user.
Throws:
RegistryException - if an error occurs

getUserRegistry

public UserRegistry getUserRegistry(String userName,
                                    int tenantId)
                             throws RegistryException
Description copied from interface: RegistryService
Creates a Registry instance for the given user with 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:
UserRegistry instance for the given user.
Throws:
RegistryException - if an error occurs

getUserRegistry

public UserRegistry getUserRegistry(String userName,
                                    int tenantId,
                                    String chroot)
                             throws RegistryException
Description copied from interface: RegistryService
Creates a Registry instance for the given user with 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.
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:
UserRegistry instance for the given user.
Throws:
RegistryException - if an error occurs

getUserRealm

public org.wso2.carbon.user.core.UserRealm getUserRealm(int tenantId)
                                                 throws RegistryException
Description copied from interface: RegistryService
This will return a realm specific to the tenant.

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:
UserRealm instance associated with the tenant id.
Throws:
RegistryException - if an error occurs

getRegistry

public UserRegistry getRegistry(String userName,
                                int tenantId,
                                String chroot)
                         throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getRegistry in interface RegistryService
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

getRegistry

public UserRegistry getRegistry(String userName,
                                String password,
                                int tenantId,
                                String chroot)
                         throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getRegistry in interface RegistryService
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

public UserRegistry getRegistry()
                         throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getRegistry in interface RegistryService
Returns:
Complete Registry for the anonymous user.
Throws:
RegistryException - if an error occurs

getRegistry

public UserRegistry getRegistry(String userName)
                         throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getRegistry in interface RegistryService
Parameters:
userName - User name of the user.
Returns:
Complete Registry instance for the given user.
Throws:
RegistryException - if an error occurs

getRegistry

public UserRegistry getRegistry(String userName,
                                int tenantId)
                         throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getRegistry in interface RegistryService
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

public UserRegistry getRegistry(String userName,
                                String password)
                         throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getRegistry in interface RegistryService
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

public UserRegistry getRegistry(String userName,
                                String password,
                                int tenantId)
                         throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getRegistry in interface RegistryService
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

getLocalRepository

public UserRegistry getLocalRepository()
                                throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getLocalRepository in interface RegistryService
Returns:
Local Repository for system user.
Throws:
RegistryException - if an error occurs

getLocalRepository

public UserRegistry getLocalRepository(int tenantId)
                                throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getLocalRepository in interface RegistryService
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

public UserRegistry getConfigSystemRegistry(int tenantId)
                                     throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getConfigSystemRegistry in interface RegistryService
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

getConfigSystemRegistry

public UserRegistry getConfigSystemRegistry()
                                     throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getConfigSystemRegistry in interface RegistryService
Returns:
Config Registry for system user.
Throws:
RegistryException - if an error occurs

getConfigUserRegistry

public UserRegistry getConfigUserRegistry(String userName,
                                          int tenantId)
                                   throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getConfigUserRegistry in interface RegistryService
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

public UserRegistry getConfigUserRegistry(String userName,
                                          String password,
                                          int tenantId)
                                   throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getConfigUserRegistry in interface RegistryService
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:
Config Registry instance for the given user.
Throws:
RegistryException - if an error occurs

getConfigUserRegistry

public UserRegistry getConfigUserRegistry()
                                   throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getConfigUserRegistry in interface RegistryService
Returns:
Config Registry for the anonymous user.
Throws:
RegistryException - if an error occurs

getConfigUserRegistry

public UserRegistry getConfigUserRegistry(String userName)
                                   throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getConfigUserRegistry in interface RegistryService
Parameters:
userName - User name of the user.
Returns:
Config Registry instance for the given user.
Throws:
RegistryException - if an error occurs

getConfigUserRegistry

public UserRegistry getConfigUserRegistry(String userName,
                                          String password)
                                   throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getConfigUserRegistry in interface RegistryService
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

getGovernanceSystemRegistry

public UserRegistry getGovernanceSystemRegistry(int tenantId)
                                         throws RegistryException
Description copied from interface: RegistryService
Creates a Registry instance for the Governance space. This is the Governance registry space which is used by the system.

Specified by:
getGovernanceSystemRegistry in interface RegistryService
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

getGovernanceSystemRegistry

public UserRegistry getGovernanceSystemRegistry()
                                         throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getGovernanceSystemRegistry in interface RegistryService
Returns:
Governance Registry for system user.
Throws:
RegistryException - if an error occurs

getGovernanceUserRegistry

public UserRegistry getGovernanceUserRegistry(String userName,
                                              int tenantId)
                                       throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getGovernanceUserRegistry in interface RegistryService
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

getGovernanceUserRegistry

public UserRegistry getGovernanceUserRegistry(String userName,
                                              String password,
                                              int tenantId)
                                       throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getGovernanceUserRegistry in interface RegistryService
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

public UserRegistry getGovernanceUserRegistry()
                                       throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getGovernanceUserRegistry in interface RegistryService
Returns:
Governance Registry for the anonymous user.
Throws:
RegistryException - if an error occurs

getGovernanceUserRegistry

public UserRegistry getGovernanceUserRegistry(String userName)
                                       throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getGovernanceUserRegistry in interface RegistryService
Parameters:
userName - User name of the user.
Returns:
Governance Registry instance for the given user.
Throws:
RegistryException - if an error occurs

getGovernanceUserRegistry

public UserRegistry getGovernanceUserRegistry(String userName,
                                              String password)
                                       throws RegistryException
Description copied from interface: RegistryService
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.

Specified by:
getGovernanceUserRegistry in interface RegistryService
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


Copyright © 2011 WSO2 Inc. All Rights Reserved.