org.wso2.carbon.registry.core.jdbc.realm
Class RegistryRealm

java.lang.Object
  extended by org.wso2.carbon.registry.core.jdbc.realm.RegistryRealm
All Implemented Interfaces:
org.wso2.carbon.user.api.UserRealm

public class RegistryRealm
extends java.lang.Object
implements org.wso2.carbon.user.core.UserRealm

This class makes sure that the user store of the registry is always in consistent state. It wraps the given realm and performs validations for all required actions before delegating the requests to the wrapped realm.

Realm is only used for getting other user store related classes. Therefore, registry provides a wrappers for all such classes where ever a validation is necessary.


Constructor Summary
RegistryRealm()
          This constructor is provided for extending the RegistryRealm.
RegistryRealm(org.wso2.carbon.user.core.UserRealm userRealm)
          Construct a realm wrapping a user realm.
 
Method Summary
 void cleanUp()
          Clean up the realm
 org.wso2.carbon.user.core.AuthorizationManager getAuthorizationManager()
          Method to get the authorization manager
 org.wso2.carbon.user.core.claim.ClaimManager getClaimManager()
          Method to get the claim manager.
 org.wso2.carbon.user.core.profile.ProfileConfigurationManager getProfileConfigurationManager()
          Method to get the profile configuration manager.
 org.wso2.carbon.user.core.UserRealm getRealm()
          Method to get the realm.
 org.wso2.carbon.user.api.RealmConfiguration getRealmConfiguration()
          Get the realm configuration
 org.wso2.carbon.user.core.UserStoreManager getUserStoreManager()
          Method to get the user store manager.
 void init(org.wso2.carbon.user.api.RealmConfiguration configBean, java.util.Map<java.lang.String,org.wso2.carbon.user.core.claim.ClaimMapping> claimMapping, java.util.Map<java.lang.String,org.wso2.carbon.user.core.profile.ProfileConfiguration> profileConfigs, int tenantId)
          Method to initialize the realm.
 void init(org.wso2.carbon.user.api.RealmConfiguration configBean, java.util.Map<java.lang.String,java.lang.Object> properties, int tenantId)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegistryRealm

public RegistryRealm()
This constructor is provided for extending the RegistryRealm.


RegistryRealm

public RegistryRealm(org.wso2.carbon.user.core.UserRealm userRealm)
              throws RegistryException
Construct a realm wrapping a user realm.

Parameters:
userRealm - the user realm.
Throws:
RegistryException - throws if the operation failed.
Method Detail

init

public void init(org.wso2.carbon.user.api.RealmConfiguration configBean,
                 java.util.Map<java.lang.String,org.wso2.carbon.user.core.claim.ClaimMapping> claimMapping,
                 java.util.Map<java.lang.String,org.wso2.carbon.user.core.profile.ProfileConfiguration> profileConfigs,
                 int tenantId)
          throws org.wso2.carbon.user.core.UserStoreException
Method to initialize the realm.

Parameters:
configBean - the realm configuration.
claimMapping - the claims as a map
profileConfigs - profile configuration.
tenantId - tenant id.
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the operation failed.

init

public void init(org.wso2.carbon.user.api.RealmConfiguration configBean,
                 java.util.Map<java.lang.String,java.lang.Object> properties,
                 int tenantId)
          throws org.wso2.carbon.user.core.UserStoreException
Throws:
org.wso2.carbon.user.core.UserStoreException

getAuthorizationManager

public org.wso2.carbon.user.core.AuthorizationManager getAuthorizationManager()
                                                                       throws org.wso2.carbon.user.core.UserStoreException
Method to get the authorization manager

Specified by:
getAuthorizationManager in interface org.wso2.carbon.user.api.UserRealm
Returns:
the authorization manager.
Throws:
org.wso2.carbon.user.core.UserStoreException

getUserStoreManager

public org.wso2.carbon.user.core.UserStoreManager getUserStoreManager()
                                                               throws org.wso2.carbon.user.core.UserStoreException
Method to get the user store manager.

Specified by:
getUserStoreManager in interface org.wso2.carbon.user.api.UserRealm
Returns:
the user store manager
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the user store manager failed.

getRealm

public org.wso2.carbon.user.core.UserRealm getRealm()
                                             throws org.wso2.carbon.user.core.UserStoreException
Method to get the realm.

Returns:
the realm object.
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the operation failed.

cleanUp

public void cleanUp()
             throws org.wso2.carbon.user.core.UserStoreException
Clean up the realm

Throws:
org.wso2.carbon.user.core.UserStoreException - if the operation is failed.

getRealmConfiguration

public org.wso2.carbon.user.api.RealmConfiguration getRealmConfiguration()
                                                                  throws org.wso2.carbon.user.core.UserStoreException
Get the realm configuration

Returns:
the realm configuration.
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the operation failed.

getProfileConfigurationManager

public org.wso2.carbon.user.core.profile.ProfileConfigurationManager getProfileConfigurationManager()
                                                                                             throws org.wso2.carbon.user.core.UserStoreException
Method to get the profile configuration manager.

Specified by:
getProfileConfigurationManager in interface org.wso2.carbon.user.api.UserRealm
Returns:
the profile configuration manager.
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the operation failed.

getClaimManager

public org.wso2.carbon.user.core.claim.ClaimManager getClaimManager()
                                                             throws org.wso2.carbon.user.core.UserStoreException
Method to get the claim manager.

Specified by:
getClaimManager in interface org.wso2.carbon.user.api.UserRealm
Returns:
the claim manager.
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the operation failed.


Copyright © 2011 WSO2 Inc. All Rights Reserved.