@Override public void clear() throws IOException { delegateAsStore().clear(); }
public void clear() throws IOException { getStore().clear(); }
/** * WRITE_LOCK * * @see org.geoserver.security.GeoServerUserGroupStore#clear() */ public void clear() throws IOException { writeLock(); try { getStore().clear(); } finally { writeUnLock(); } }
new GeoServerMultiplexingPasswordEncoder(store.getSecurityManager(), service); store.clear(); Map<String, GeoServerUser> newUserDict = new HashMap<String, GeoServerUser>(); Map<String, GeoServerUserGroup> newGroupDict = new HashMap<String, GeoServerUserGroup>();
@Before public void clearUserGroupService() throws Exception { store.clear(); store.store(); }
@After public void clearUserGroupService() throws IOException { store.clear(); store.store(); }
protected void copyFrom(GeoServerUserGroupService service1, GeoServerUserGroupService service2) throws Exception { GeoServerUserGroupStore store1 = createStore(service1); GeoServerUserGroupStore store2 = createStore(service2); store1.clear(); checkEmpty(store1); insertValues(store1); Util.copyFrom(store1, store2); store1.clear(); checkEmpty(store1); checkValuesInserted(store2); store2.clear(); checkEmpty(store2); }
@Test public void testCopyFrom() throws Exception { GeoServerUserGroupService service1 = createUserGroupService("copyFrom"); GeoServerUserGroupService service2 = createUserGroupService("copyTo"); GeoServerUserGroupStore store1 = createStore(service1); GeoServerUserGroupStore store2 = createStore(service2); store1.clear(); checkEmpty(store1); insertValues(store1); Util.copyFrom(store1, store2); store1.clear(); checkEmpty(store1); checkValuesInserted(store2); }
protected static GeoServerUserGroupService createH2UserGroupService( String serviceName, GeoServerSecurityManager securityManager) throws Exception { if (securityManager.listUserGroupServices().contains(serviceName)) { GeoServerUserGroupService service = securityManager.loadUserGroupService(serviceName); if (service.canCreateStore()) { GeoServerUserGroupStore store = service.createStore(); store.clear(); store.store(); } SecurityUserGroupServiceConfig old = securityManager.loadUserGroupServiceConfig(serviceName); securityManager.removeUserGroupService(old); } securityManager.saveUserGroupService(createConfigObjectH2(serviceName, securityManager)); return securityManager.loadUserGroupService(serviceName); }
store.clear(); assertTrue(store.isModified()); store.load();