public void delete(final Subject subject) { ResourceRequestBuilderFactory.<Acl>newBuilder() .forResource( "/authz" + resource + "?subject=" + subject.getPrincipal() + "&type=" + subject.getType() + "&perm=" + action.getName()) .delete() // .withCallback( new ResourceCallback<Acl>() { @Override public void onResource(Response response, Acl resource) { if (response.getStatusCode() == Response.SC_OK) { aclDeleteCallback.onDelete(subject); } else { aclDeleteCallback.onDeleteFailed(response, subject); } } }) .send(); }
private boolean hasAction(Acl acl) { for (int i = 0; i < acl.getActionsArray().length(); i++) { if (acl.getActionsArray().get(i).equals(action.getName())) { return true; } } return false; }
public String getHeader() { return action.getName(); }