@Override public void onSubmit() { setResponsePage(new NewGroupPage(ugServiceName).setReturnPage(this.getPage())); } });
public NewGroupPage(String userGroupServiceName) { super(userGroupServiceName,new GeoServerUserGroup("")); if (!hasUserGroupStore(userGroupServiceName)) { throw new IllegalStateException("New group not possible for read only service"); } }
@Override protected void onFormSubmit(GeoServerUserGroup group) throws IOException { 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; } GeoServerRoleStore gaStore=null; try { if (hasRoleStore(getSecurityManager().getActiveRoleService().getName())) { gaStore = getRoleStore(getSecurityManager().getActiveRoleService().getName()); gaStore = new RoleStoreValidationWrapper(gaStore); for (GeoServerRole role : rolePalette.getSelectedRoles()) { gaStore.associateRoleToGroup(role, group.getGroupname()); } gaStore.store(); } } catch (IOException ex) { try {gaStore.load(); } catch (IOException ex2) {}; throw ex; } }
@Override protected void onFormSubmit(GeoServerUserGroup group) throws IOException { 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; } GeoServerRoleStore gaStore=null; try { if (hasRoleStore(getSecurityManager().getActiveRoleService().getName())) { gaStore = getRoleStore(getSecurityManager().getActiveRoleService().getName()); gaStore = new RoleStoreValidationWrapper(gaStore); for (GeoServerRole role : rolePalette.getSelectedRoles()) { gaStore.associateRoleToGroup(role, group.getGroupname()); } gaStore.store(); } } catch (IOException ex) { try {gaStore.load(); } catch (IOException ex2) {}; throw ex; } }
GeoServerUserGroupStore store = null; try { store = new UserGroupStoreValidationWrapper(getUserGroupStore(userGroupServiceName)); group = store.createGroupObject(group.getGroupname(), group.isEnabled()); store.addGroup(group); if (hasRoleStore(getSecurityManager().getActiveRoleService().getName())) { gaStore = getRoleStore(getSecurityManager().getActiveRoleService().getName()); gaStore = new RoleStoreValidationWrapper(gaStore);
@Override public void onClick() { setResponsePage(new NewGroupPage(serviceName).setReturnPage(getPage())); } });
public NewGroupPage(String userGroupServiceName) { super(userGroupServiceName, new GeoServerUserGroup("")); if (!hasUserGroupStore(userGroupServiceName)) { throw new IllegalStateException("New group not possible for read only service"); } }
@Override public void onClick() { setResponsePage(new NewGroupPage(serviceName).setReturnPage(getPage())); } });
public NewGroupPage(String userGroupServiceName) { super(userGroupServiceName,new GeoServerUserGroup("")); if (!hasUserGroupStore(userGroupServiceName)) { throw new IllegalStateException("New group not possible for read only service"); } }
@Override public void onSubmit() { setResponsePage( new NewGroupPage(ugServiceName).setReturnPage(this.getPage())); } });
@Override public void onClick() { setResponsePage( new NewGroupPage(serviceName).setReturnPage(getPage())); } });
@Override public void onSubmit() { setResponsePage(new NewGroupPage(ugServiceName).setReturnPage(this.getPage())); } });