org.wso2.carbon.identity.common.testng.realm

Class InMemoryRealmService

  • java.lang.Object
    • org.wso2.carbon.identity.common.testng.realm.InMemoryRealmService
  • All Implemented Interfaces:
    org.wso2.carbon.user.api.UserRealmService, org.wso2.carbon.user.core.service.RealmService

    public class InMemoryRealmService
    extends Object
    implements org.wso2.carbon.user.core.service.RealmService
    Simple In Memory realm service for mocking.
    • Constructor Detail

      • InMemoryRealmService

        public InMemoryRealmService(int tenantId)
                             throws org.wso2.carbon.user.core.UserStoreException
        Throws:
        org.wso2.carbon.user.core.UserStoreException
    • Method Detail

      • getUserRealm

        public org.wso2.carbon.user.core.UserRealm getUserRealm(org.wso2.carbon.user.api.RealmConfiguration tenantRealmConfig)
                                                         throws org.wso2.carbon.user.core.UserStoreException
        Specified by:
        getUserRealm in interface  org.wso2.carbon.user.core.service.RealmService
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • setUserRealm

        public void setUserRealm(int tenantId,
                                 org.wso2.carbon.user.core.UserRealm realm)
                          throws org.wso2.carbon.user.core.UserStoreException
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • getBootstrapRealmConfiguration

        public org.wso2.carbon.user.api.RealmConfiguration getBootstrapRealmConfiguration()
        Specified by:
        getBootstrapRealmConfiguration in interface  org.wso2.carbon.user.api.UserRealmService
        Specified by:
        getBootstrapRealmConfiguration in interface  org.wso2.carbon.user.core.service.RealmService
      • setup

        public void setup()
                   throws org.wso2.carbon.user.core.UserStoreException
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • getBootstrapRealm

        public org.wso2.carbon.user.core.UserRealm getBootstrapRealm()
                                                              throws org.wso2.carbon.user.core.UserStoreException
        Specified by:
        getBootstrapRealm in interface  org.wso2.carbon.user.api.UserRealmService
        Specified by:
        getBootstrapRealm in interface  org.wso2.carbon.user.core.service.RealmService
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • setTenantManager

        public void setTenantManager(org.wso2.carbon.user.api.TenantManager tenantManager)
                              throws org.wso2.carbon.user.api.UserStoreException
        Specified by:
        setTenantManager in interface  org.wso2.carbon.user.api.UserRealmService
        Throws:
        org.wso2.carbon.user.api.UserStoreException
      • getTenantManager

        public org.wso2.carbon.user.core.tenant.TenantManager getTenantManager()
        Specified by:
        getTenantManager in interface  org.wso2.carbon.user.api.UserRealmService
        Specified by:
        getTenantManager in interface  org.wso2.carbon.user.core.service.RealmService
      • getTenantUserRealm

        public org.wso2.carbon.user.api.UserRealm getTenantUserRealm(int tenantId)
                                                              throws org.wso2.carbon.user.core.UserStoreException
        Specified by:
        getTenantUserRealm in interface  org.wso2.carbon.user.api.UserRealmService
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • initializeRealm

        public org.wso2.carbon.user.core.UserRealm initializeRealm(org.wso2.carbon.user.api.RealmConfiguration realmConfig,
                                                                   int tenantId)
                                                            throws org.wso2.carbon.user.core.UserStoreException
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • setTenantManager

        public void setTenantManager(org.wso2.carbon.user.core.tenant.TenantManager t)
        Specified by:
        setTenantManager in interface  org.wso2.carbon.user.core.service.RealmService
      • getMultiTenantRealmConfigBuilder

        public org.wso2.carbon.user.core.config.multitenancy.MultiTenantRealmConfigBuilder getMultiTenantRealmConfigBuilder()
                                                                                                                     throws org.wso2.carbon.user.core.UserStoreException
        Specified by:
        getMultiTenantRealmConfigBuilder in interface  org.wso2.carbon.user.core.service.RealmService
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • getCachedUserRealm

        public org.wso2.carbon.user.core.UserRealm getCachedUserRealm(int tenantId)
                                                               throws org.wso2.carbon.user.core.UserStoreException
        Specified by:
        getCachedUserRealm in interface  org.wso2.carbon.user.core.service.RealmService
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • clearCachedUserRealm

        public void clearCachedUserRealm(int i)
                                  throws org.wso2.carbon.user.core.UserStoreException
        Specified by:
        clearCachedUserRealm in interface  org.wso2.carbon.user.core.service.RealmService
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • getTenantMgtConfiguration

        public org.wso2.carbon.user.api.TenantMgtConfiguration getTenantMgtConfiguration()
        Specified by:
        getTenantMgtConfiguration in interface  org.wso2.carbon.user.api.UserRealmService
      • addCustomUserStore

        public void addCustomUserStore(String realmName,
                                       String userStoreClassName,
                                       Map<String,String> properties,
                                       int tenantId)
                                throws org.wso2.carbon.user.core.UserStoreException
        Throws:
        org.wso2.carbon.user.core.UserStoreException
      • setBootstrapRealmConfiguration

        public void setBootstrapRealmConfiguration(org.wso2.carbon.user.api.RealmConfiguration arg0)
        Specified by:
        setBootstrapRealmConfiguration in interface  org.wso2.carbon.user.api.UserRealmService

Copyright © 2018 WSO2. All rights reserved.