Skip to content

Instantly share code, notes, and snippets.

@crh
Created April 10, 2012 14:04
Show Gist options
  • Save crh/2351598 to your computer and use it in GitHub Desktop.
Save crh/2351598 to your computer and use it in GitHub Desktop.
Remove Organization from Group
public void removeOrganization(String groupId, String id) throws EscidocClientException {
TaskParam tp = new TaskParam();
UserGroup updated = c.retrieve(groupId);
tp.setLastModificationDate(updated.getLastModificationDate());
// FIXME not optimal
for (Selector selector : updated.getSelectors()) {
if (selector.getContent().equals(id)) {
tp.addResourceRef(selector.getObjid());
}
}
c.removeSelectors(groupId, tp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment