public void initialize ( Map < String , Object > configProps ) throws WIMException { try { reposId = ( String ) configProps . get ( KEY_ID ) ; setCustomProperties ( ( List < Map < String , String > > ) configProps . get ( ConfigConstants . CONFIG_DO_CUSTOM_PROPERTIES ) ) ; setMapping ( ) ; setBaseEntry ( configProps ) ; setConfigEntityMapping ( configProps ) ; propsMap = new HashMap < String , String > ( ) ; propsMap . putAll ( attrMap ) ; propsMap . putAll ( customPropertyMap ) ; URBridgeHelper . mapSupportedEntityTypeList ( getSupportedEntityTypes ( ) ) ; personAccountType = URBridgeHelper . getPersonAccountType ( ) ; groupAccountType = URBridgeHelper . getGroupAccountType ( ) ; /* * Properties supportedRegistries = new Properties(); * String registryImplClass = customPropertyMap.get(URBridgeConstants.CUSTOM_REGISTRY_IMPL_CLASS) == null * ? null : (String) customPropertyMap.get(URBridgeConstants.CUSTOM_REGISTRY_IMPL_CLASS); * * if (registryImplClass == null) { * String osType = System.getProperty("os.name"); * if (osType.startsWith("Windows")) { * osType = "Windows"; * } * supportedRegistries.load(getClass().getResourceAsStream(registryPropsFile)); * registryImplClass = supportedRegistries.getProperty(osType); * } * if (registryImplClass == null) { * throw new WIMApplicationException(WIMMessageKey.MISSING_OR_INVALID_CUSTOM_REGISTRY_CLASS_NAME, * Tr.formatMessage(tc, WIMMessageKey.MISSING_OR_INVALID_CUSTOM_REGISTRY_CLASS_NAME, * WIMMessageHelper.generateMsgParms(registryImplClass))); * } * * ClassLoader contextCL = Thread.currentThread().getContextClassLoader(); * if (contextCL == null) { * contextCL = this.getClass().getClassLoader(); * } * * Class wrapperClass = Class.forName(registryImplClass, true, contextCL); * Object wrapperObj = wrapperClass.newInstance(); * * if (wrapperObj instanceof UserRegistry) { * userRegistry = (UserRegistry) wrapperObj; * Properties initProperties = new Properties(); * initProperties.putAll(customPropertyMap); * userRegistry.initialize(initProperties); * } * else { * throw new WIMApplicationException(WIMMessageKey.MISSING_OR_INVALID_CUSTOM_REGISTRY_CLASS_NAME, * Tr.formatMessage(tc, WIMMessageKey.MISSING_OR_INVALID_CUSTOM_REGISTRY_CLASS_NAME, * WIMMessageHelper.generateMsgParms(registryImplClass))); * } */ } catch ( Throwable th ) { throw new InitializationException ( WIMMessageKey . REPOSITORY_INITIALIZATION_FAILED , Tr . formatMessage ( tc , WIMMessageKey . REPOSITORY_INITIALIZATION_FAILED , WIMMessageHelper . generateMsgParms ( reposId , th . toString ( ) ) ) ) ; } }
Initializes the user registry for use by the adapter .