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.core.UserRealm

public class RegistryRealm
extends 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.config.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.core.config.RealmConfiguration configBean, Map<String,org.wso2.carbon.user.core.claim.ClaimMapping> claimMapping, Map<String,org.wso2.carbon.user.core.profile.ProfileConfiguration> profileConfigs, int tenantId)
          Method to initialize the realm.
 
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.core.config.RealmConfiguration configBean,
                 Map<String,org.wso2.carbon.user.core.claim.ClaimMapping> claimMapping,
                 Map<String,org.wso2.carbon.user.core.profile.ProfileConfiguration> profileConfigs,
                 int tenantId)
          throws org.wso2.carbon.user.core.UserStoreException
Method to initialize the realm.

Specified by:
init in interface org.wso2.carbon.user.core.UserRealm
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.

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.core.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.core.UserRealm
Returns:
the user store manager
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the user store manager failed.

cleanUp

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

Specified by:
cleanUp in interface org.wso2.carbon.user.core.UserRealm
Throws:
org.wso2.carbon.user.core.UserStoreException - if the operation is failed.

getRealmConfiguration

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

Specified by:
getRealmConfiguration in interface org.wso2.carbon.user.core.UserRealm
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.core.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.core.UserRealm
Returns:
the claim manager.
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the operation failed.


Copyright © 2010. All Rights Reserved.