=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java 2013-12-16 11:09:13 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/common/DefaultIdentifiableObjectManager.java 2013-12-16 13:05:53 +0000 @@ -73,7 +73,7 @@ for ( GenericIdentifiableObjectStore store : identifiableObjectStores ) { - if ( store != null && store.getClass() != null ) + if ( store != null && store.getClazz() != null ) { identifiableObjectStoreMap.put( store.getClazz(), store ); } @@ -83,7 +83,7 @@ for ( GenericNameableObjectStore store : nameableObjectStores ) { - if ( store != null && store.getClass() != null ) + if ( store != null && store.getClazz() != null ) { nameableObjectStoreMap.put( store.getClazz(), store ); } === removed file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/UserDefaultPopulator.java' --- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/UserDefaultPopulator.java 2013-09-08 15:32:46 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/user/UserDefaultPopulator.java 1970-01-01 00:00:00 +0000 @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2004-2012, University of Oslo - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * * Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * * Neither the name of the HISP project nor the names of its contributors may - * be used to endorse or promote products derived from this software without - * specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ -package org.hisp.dhis.user; - -import org.hisp.dhis.system.startup.AbstractStartupRoutine; - - /** - * @author Nguyen Kim Lai - * - * @version UserDefaultPopulator.java 9:06:11 PM Sep 8, 2013 $ - */ -public class UserDefaultPopulator - extends AbstractStartupRoutine -{ - public static final String USER_NAME = "anonymous"; - - // ------------------------------------------------------------------------- - // Dependencies - // ------------------------------------------------------------------------- - - private UserService userService; - - public void setUserService( UserService userService ) - { - this.userService = userService; - } - - // ------------------------------------------------------------------------- - // AbstractStartupRoutine implementation - // ------------------------------------------------------------------------- - - @Override - public void execute() - throws Exception - { - UserCredentials usercredential = userService.getUserCredentialsByUsername( USER_NAME ); - - if( usercredential == null ) - { - User user = new User(); - usercredential = new UserCredentials(); - usercredential.setUsername( USER_NAME ); - usercredential.setPassword( USER_NAME ); - usercredential.setUser( user ); - user.setSurname( USER_NAME ); - user.setFirstName( USER_NAME ); - user.setUserCredentials( usercredential ); - - userService.addUserCredentials( usercredential ); - userService.addUser( user ); - } - } -} - === modified file 'dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2013-12-16 10:17:33 +0000 +++ dhis-2/dhis-services/dhis-service-core/src/main/resources/META-INF/dhis/beans.xml 2013-12-16 13:05:53 +0000 @@ -894,13 +894,7 @@ - - - + @@ -917,7 +911,6 @@ -