@Override public void removeAttachment(PermissionAttachment attachment) { if (attachment == null) { throw new IllegalArgumentException("Attachment cannot be null"); } if (ppAttachments.contains(attachment)) { ppAttachments.remove(attachment); PermissionRemovedExecutor ex = attachment.getRemovalCallback(); if (ex != null) { ex.attachmentRemoved(attachment); } recalculatePermissions(); } else { throw new IllegalArgumentException("Given attachment is not part of Permissible object " + parent); } }
@Override public PermissionRemovedExecutor getRemovalCallback() { return this.removalCallback; }
@Override public void setRemovalCallback(PermissionRemovedExecutor removalCallback) { this.removalCallback = removalCallback; }
public void setRemovalCallback(PermissionRemovedExecutor ex) { }
public PermissionRemovedExecutor getRemovalCallback() { return null; }