Package org.geoserver.security

Examples of org.geoserver.security.GeoServerUserGroupStore.store()


        fail=true;
        try {
            store2.clear();
        } catch (IOException ex) {
            try {
                store2.store();
            } catch (IOException e) {
                fail=false;
            }
        }
        if (fail)
View Full Code Here


           
        service2.registerUserGroupLoadedListener(listener);
       
        // modifiy store1
        store1.addGroup(group);
        store1.store();
        assertTrue(service1.getUserGroups().size()==1);
        assertTrue(service1.getGroupCount()==1);
       
     // increment lastmodified adding a second manually, the test is too fast
        xmlFile.setLastModified(xmlFile.lastModified()+2000)
View Full Code Here

        GeoServerUserGroupStore store = null;
        try {
            if (hasUserGroupStore(userGroupServiceName)) {
                store = new UserGroupStoreValidationWrapper(getUserGroupStore(userGroupServiceName));
                store.updateGroup(group);
                store.store();
            };
        } catch (IOException ex) {
            try {
                //try to reload the store
                store.load();
View Full Code Here

        GeoServerUserGroupStore store=null;
        try {
            store = new UserGroupStoreValidationWrapper(getUserGroupStore(userGroupServiceName));
            group = store.createGroupObject(group.getGroupname(),group.isEnabled());
            store.addGroup(group);
            store.store();
        } catch (IOException ex) {
            try {
                store.load();
            } catch (IOException ex2) {};
            throw ex;
View Full Code Here

                            .loadUserGroupService(userGroupsServiceName);
                    ugStore = new UserGroupStoreValidationWrapper(ugService.createStore());
                    for (GeoServerUserGroup group : removePanel.getRoots()) {                    
                         ugStore.removeGroup(group);
                    }
                    ugStore.store();
                } catch (IOException ex) {
                    try {ugStore.load(); } catch (IOException ex2) {};
                    throw new RuntimeException(ex);
                }
               
View Full Code Here

                ugStore.updateUser(user);

                for (GeoServerUserGroup g : add) ugStore.associateUserToGroup(user, g);
                for (GeoServerUserGroup g : remove) ugStore.disAssociateUserFromGroup(user,g);

                ugStore.store();
            }
        } catch (IOException ex) {
            LOGGER.log(Level.WARNING, ex.getLocalizedMessage(), ex);
            try { ugStore.load(); } catch (IOException ex2) {};
            throw ex;
View Full Code Here

                            .getSecurityManager().loadUserGroupService(userGroupsServiceName);
                    ugStore = new UserGroupStoreValidationWrapper(ugService.createStore());
                    for (GeoServerUser user : removePanel.getRoots()) {                    
                        ugStore.removeUser(user);
                    }
                    ugStore.store();
                } catch (IOException ex) {
                    try {ugStore.load(); } catch (IOException ex2) {};
                    throw new RuntimeException(ex);
                }
               
View Full Code Here

            ugStore.addUser(user);

            for (GeoServerUserGroup group :  userGroupPalette.getSelectedGroups()) {
                ugStore.associateUserToGroup(user, group);
            }
            ugStore.store();

        } catch (IOException ex) {
            try {ugStore.load(); } catch (IOException ex2) {};
            throw ex;
        } catch (PasswordPolicyException ex) {          
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.