[Yanel-commits] rev 42267 - public/yanel/trunk/src/core/java/org/wyona/yanel/core/map

michi at wyona.com michi at wyona.com
Mon Apr 6 13:33:13 CEST 2009


Author: michi
Date: 2009-04-06 13:33:12 +0200 (Mon, 06 Apr 2009)
New Revision: 42267

Modified:
   public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java
Log:
use new methods instead getBeanFactory method

Modified: public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java
===================================================================
--- public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java	2009-04-06 11:32:34 UTC (rev 42266)
+++ public/yanel/trunk/src/core/java/org/wyona/yanel/core/map/Realm.java	2009-04-06 11:33:12 UTC (rev 42267)
@@ -131,7 +131,7 @@
                 pmFactory = (PolicyManagerFactory) Class.forName(customPolicyManagerFactoryImplClassName).newInstance();
                 policyManager = pmFactory.newPolicyManager(ConfigurationUtil.getCustomConfiguration(repoConfigElement, "policy-manager-config", "http://www.wyona.org/security/1.0"), new RealmConfigPathResolver(this));
             } catch (ConfigurationException e) {
-                pmFactory = (PolicyManagerFactory) yanel.getBeanFactory().getBean("PolicyManagerFactory");
+                pmFactory = yanel.getPolicyManagerFactory("PolicyManagerFactory");
                 log.info("Default PolicyManager will be used for realm: " + getName());
                 repoConfig = FileUtil.resolve(getConfigFile(), new File(repoConfigElement.getValue()));
                 RepositoryFactory policiesRepoFactory = yanel.getRepositoryFactory("ACPoliciesRepositoryFactory");
@@ -155,7 +155,7 @@
                 identityManager = imFactory.newIdentityManager(ConfigurationUtil.getCustomConfiguration(repoConfigElement, "identity-manager-config", "http://www.wyona.org/security/1.0"), new RealmConfigPathResolver(this));
                 log.debug("Custom identity manager " + identityManager.getClass().getName() + " has been set for realm: " + getName());
             } catch (ConfigurationException e) {
-            	imFactory = (IdentityManagerFactory) yanel.getBeanFactory().getBean("IdentityManagerFactory");
+            	imFactory = yanel.getIdentityManagerFactory("IdentityManagerFactory");
             	log.info("Default IdentityManager will be used for realm: " + getName());
             	repoConfig = FileUtil.resolve(getConfigFile(), new File(repoConfigElement.getValue()));
                 RepositoryFactory identitiesRepoFactory = yanel.getRepositoryFactory("ACIdentitiesRepositoryFactory");
@@ -277,12 +277,12 @@
                 log.info("Custom repo navigation implementation will be used for realm: " + getName());
             } catch (ConfigurationException e) {
                 log.error(e, e);
-                repoNavigation = (Sitetree) yanel.getBeanFactory().getBean("repo-navigation");
+                repoNavigation = yanel.getSitetreeImpl("repo-navigation");
                 log.warn("Default repo navigation implementation will be used for realm: " + getName());
             }
         } else {
             log.info("Default repo navigation implementation will be used for realm: " + getName());
-            repoNavigation = (Sitetree) yanel.getBeanFactory().getBean("repo-navigation");
+            repoNavigation = yanel.getSitetreeImpl("repo-navigation");
         }
     }
 



More information about the Yanel-commits mailing list