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

java.lang.Object
  extended by org.wso2.carbon.registry.core.jdbc.realm.InMemoryRealmService
All Implemented Interfaces:
org.wso2.carbon.user.core.service.RealmService

public class InMemoryRealmService
extends Object
implements org.wso2.carbon.user.core.service.RealmService

Class used to represent an in memory realm service.


Constructor Summary
InMemoryRealmService()
          Construct a in memory realm service.
 
Method Summary
 org.wso2.carbon.user.core.UserRealm getBootstrapRealm()
          Get the bootstrap realm.
 org.wso2.carbon.user.core.config.RealmConfiguration getBootstrapRealmConfiguration()
          Get the boot strap configuration (tenant0's configuration).
 org.wso2.carbon.user.core.tenant.TenantManager getTenantManager()
          Return the tenant manager.
 org.wso2.carbon.user.core.UserRealm getUserRealm(org.wso2.carbon.user.core.config.RealmConfiguration tenantRealmConfig)
          Method to return a user realm for the given realm configuration.
 org.wso2.carbon.user.core.UserRealm initializeRealm(org.wso2.carbon.user.core.config.RealmConfiguration realmConfig, DataSource dataSource, int tenantId)
          Initialize the realm for a tenant id.
 void setup()
          Setup the realm service.
 void setUserRealm(int id, org.wso2.carbon.user.core.UserRealm realm)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InMemoryRealmService

public InMemoryRealmService()
                     throws RegistryException
Construct a in memory realm service.

Throws:
RegistryException - throws if the operation failed.
Method Detail

getUserRealm

public org.wso2.carbon.user.core.UserRealm getUserRealm(org.wso2.carbon.user.core.config.RealmConfiguration tenantRealmConfig)
                                                 throws org.wso2.carbon.user.core.UserStoreException
Method to return a user realm for the given realm configuration.

Specified by:
getUserRealm in interface org.wso2.carbon.user.core.service.RealmService
Parameters:
tenantRealmConfig - the realm configuration.
Returns:
the user realm
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the operation failed.

setUserRealm

public void setUserRealm(int id,
                         org.wso2.carbon.user.core.UserRealm realm)
                  throws org.wso2.carbon.user.core.UserStoreException
Specified by:
setUserRealm in interface org.wso2.carbon.user.core.service.RealmService
Throws:
org.wso2.carbon.user.core.UserStoreException

getBootstrapRealmConfiguration

public org.wso2.carbon.user.core.config.RealmConfiguration getBootstrapRealmConfiguration()
Get the boot strap configuration (tenant0's configuration).

Specified by:
getBootstrapRealmConfiguration in interface org.wso2.carbon.user.core.service.RealmService
Returns:
the bootstrap realm configuration.

setup

public void setup()
           throws RegistryException
Setup the realm service.

Throws:
RegistryException - if the operation failed.

getBootstrapRealm

public org.wso2.carbon.user.core.UserRealm getBootstrapRealm()
                                                      throws org.wso2.carbon.user.core.UserStoreException
Get the bootstrap realm.

Specified by:
getBootstrapRealm in interface org.wso2.carbon.user.core.service.RealmService
Returns:
the bootstrap realm.
Throws:
org.wso2.carbon.user.core.UserStoreException - throws if the operation failed.

getTenantManager

public org.wso2.carbon.user.core.tenant.TenantManager getTenantManager()
Return the tenant manager.

Specified by:
getTenantManager in interface org.wso2.carbon.user.core.service.RealmService
Returns:
the tenant manager.

initializeRealm

public org.wso2.carbon.user.core.UserRealm initializeRealm(org.wso2.carbon.user.core.config.RealmConfiguration realmConfig,
                                                           DataSource dataSource,
                                                           int tenantId)
                                                    throws org.wso2.carbon.user.core.UserStoreException
Initialize the realm for a tenant id.

Parameters:
realmConfig - realm configuration.
dataSource - data source
tenantId - tenant id
Returns:
the user realm.
Throws:
org.wso2.carbon.user.core.UserStoreException - the user realm.


Copyright © 2010. All Rights Reserved.