/** * <p>Gets the UserFactory defined in the WebFrameworkConfigElement (return by the <code>getWebFrameworkConfig</code> method. * If a UserFactory has not been defined in the configuration element then a new instance of <code>DefaultUserFactory</code> * will be returned. * * @return A <code>UserFactory</code> */ public UserFactory getUserFactory() { UserFactory userFactory = null; String defaultUserFactoryId = getWebFrameworkConfig().getDefaultUserFactoryId(); if (defaultUserFactoryId != null) { // If a default UserFactory has been defined in the configuration then obtain it from the application context. userFactory = (UserFactory) applicationContext.getBean(defaultUserFactoryId); } else { // If a default UserFactory has not been defined in the configuration then create a DefaultUserFactory. userFactory = new DefaultUserFactory(); } return userFactory; }
/** * <p>Gets the UserFactory defined in the WebFrameworkConfigElement (return by the <code>getWebFrameworkConfig</code> method. * If a UserFactory has not been defined in the configuration element then a new instance of <code>DefaultUserFactory</code> * will be returned. * * @return A <code>UserFactory</code> */ public UserFactory getUserFactory() { UserFactory userFactory = null; String defaultUserFactoryId = getWebFrameworkConfig().getDefaultUserFactoryId(); if (defaultUserFactoryId != null) { // If a default UserFactory has been defined in the configuration then obtain it from the application context. userFactory = (UserFactory) applicationContext.getBean(defaultUserFactoryId); } else { // If a default UserFactory has not been defined in the configuration then create a DefaultUserFactory. userFactory = new DefaultUserFactory(); } return userFactory; }