protected void setServices(String serviceName) throws Exception { roleService = createRoleService(serviceName); usergroupService = createUserGroupService(serviceName); roleStore = createStore(roleService); usergroupStore = createStore(usergroupService); getSecurityManager().setActiveRoleService(roleService); // getSecurityManager().saveSecurityConfig(config)setActiveUserGroupService(usergroupService); }
@Override public GeoServerUserGroupStore createStore(GeoServerUserGroupService service) throws IOException { JDBCUserGroupStore store = (JDBCUserGroupStore) super.createStore(service); try { JDBCTestSupport.dropExistingTables(store, store.getConnection()); } catch (SQLException e) { throw new IOException(e); } store.createTables(); store.store(); return store; }
@Override public GeoServerUserGroupStore createStore(GeoServerUserGroupService service) throws IOException { JDBCUserGroupStore store = (JDBCUserGroupStore) super.createStore(service); try { JDBCTestSupport.dropExistingTables(store,store.getConnection()); } catch (SQLException e) { throw new IOException(e); } store.createTables(); store.store(); return store; }
@Override public GeoServerRoleStore createStore(GeoServerRoleService service) throws IOException { JDBCRoleStore store = (JDBCRoleStore) super.createStore(service); try { JDBCTestSupport.dropExistingTables(store, store.getConnection()); } catch (SQLException e) { throw new IOException(e); } store.createTables(); store.store(); return store; }
@Override public GeoServerRoleStore createStore(GeoServerRoleService service) throws IOException { JDBCRoleStore store = (JDBCRoleStore) super.createStore(service); try { JDBCTestSupport.dropExistingTables(store,store.getConnection()); } catch (SQLException e) { throw new IOException(e); } store.createTables(); store.store(); return store; }