[ 
https://issues.apache.org/jira/browse/JCR-3880?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574858#comment-14574858
 ] 

Tobias Bocanegra edited comment on JCR-3880 at 6/5/15 5:16 PM:
---------------------------------------------------------------

for the add/removeMembers(), it could make sense to return the id's of the 
members that were actually added/removed, instead of just a boolean?
because what do you do if it returns false? you would need to read the 
memberships again to see which one failed.

so:
{code}
 String[] addMembers(String... memberIds) throws RepositoryException;

 String[] removeMembers(String... memberIds) throws RepositoryException;
{code}


was (Author: tripod):
for the add/removeMembers(), it could make sense to return the id's of the 
members that were actually added/removed, instead of just a boolean?
because what do you do if it returns false? you would need to read the 
memberships again to see which one failed.

> Allow to add/remove group members by ID
> ---------------------------------------
>
>                 Key: JCR-3880
>                 URL: https://issues.apache.org/jira/browse/JCR-3880
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-api
>            Reporter: angela
>            Assignee: angela
>         Attachments: JCR-3880.patch
>
>
> for some cases it would be convenient if it was possible to add/remove group 
> members by ID without having to retrieve the corresponding authorizable 
> upfront... in particular for package imports as provided by jackrabbit 
> fvault, where the group my be imported before the members are present.
> similar it might be useful to remove dangling membership entries once a 
> former member got removed.
> the current implementations already allow for such a behavior when using an 
> XML import run with the _besteffort_ flag set for the import of the 
> associated protected items (while failing in case of the other 
> import-behaviour settings). such it would complete the API coverage for a 
> feature we already support while at the same time control it based on the 
> repository configuration.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to