Interface Group
- 
- All Superinterfaces:
 Authorizable
@ProviderType public interface Group extends Authorizable
A Group is a collection ofAuthorizables. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanaddMember(@NotNull Authorizable authorizable)Add a member to this Group.@NotNull java.util.Set<java.lang.String>addMembers(@NotNull java.lang.String... memberIds)Add one or more member(s) to this Group.@NotNull java.util.Iterator<Authorizable>getDeclaredMembers()@NotNull java.util.Iterator<Authorizable>getMembers()booleanisDeclaredMember(@NotNull Authorizable authorizable)Test whether anAuthorizableis a declared member of this group.booleanisMember(@NotNull Authorizable authorizable)booleanremoveMember(@NotNull Authorizable authorizable)Remove a member from this Group.@NotNull java.util.Set<java.lang.String>removeMembers(@NotNull java.lang.String... memberIds)Remove one or several members from this Group.- 
Methods inherited from interface org.apache.jackrabbit.api.security.user.Authorizable
declaredMemberOf, getID, getPath, getPrincipal, getProperty, getPropertyNames, getPropertyNames, hasProperty, isGroup, memberOf, remove, removeProperty, setProperty, setProperty 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getDeclaredMembers
@NotNull @NotNull java.util.Iterator<Authorizable> getDeclaredMembers() throws javax.jcr.RepositoryException
- Returns:
 - Iterator of 
Authorizables which are declared members of this Group. - Throws:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
getMembers
@NotNull @NotNull java.util.Iterator<Authorizable> getMembers() throws javax.jcr.RepositoryException
- Returns:
 - Iterator of 
Authorizables which are members of this Group. This includes both declared members and all authorizables that are indirect group members. - Throws:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
isDeclaredMember
boolean isDeclaredMember(@NotNull @NotNull Authorizable authorizable) throws javax.jcr.RepositoryExceptionTest whether anAuthorizableis a declared member of this group.- Parameters:
 authorizable- TheAuthorizableto test.- Returns:
 trueif the Authorizable to test is a direct member- Throws:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
isMember
boolean isMember(@NotNull @NotNull Authorizable authorizable) throws javax.jcr.RepositoryException- Parameters:
 authorizable- TheAuthorizableto test.- Returns:
 - true if the Authorizable to test is a direct or indirect member of this Group.
 - Throws:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
addMember
boolean addMember(@NotNull @NotNull Authorizable authorizable) throws javax.jcr.RepositoryExceptionAdd a member to this Group.- Parameters:
 authorizable- TheAuthorizableto be added as member to this group.- Returns:
 - true if the 
Authorizablehas successfully been added to this Group, false otherwise (e.g. unknown implementation or if it already is a member or if the passed authorizable is this group itself or for some implementation specific constraint). - Throws:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
addMembers
@NotNull @NotNull java.util.Set<java.lang.String> addMembers(@NotNull @NotNull java.lang.String... memberIds) throws javax.jcr.RepositoryExceptionAdd one or more member(s) to this Group. Note, that an implementation may define circumstances under which this method allows to add non-existingAuthorizables as new members. Also an implementation may choose to (partially) postpone validation/verification utilSession.save().- Parameters:
 memberIds- TheIds of the authorizables to be added as members to this group.- Returns:
 - a set of those 
memberIdsthat could not be added or an empty set of all ids have been successfully processed. The former may include those cases where a given id cannot be resolved to an existing authorizable, one that is already member or if adding the member would create a cyclic group membership. - Throws:
 javax.jcr.RepositoryException- If one of the specified memberIds is invalid or if some other error occurs.
 
- 
removeMember
boolean removeMember(@NotNull @NotNull Authorizable authorizable) throws javax.jcr.RepositoryExceptionRemove a member from this Group.- Parameters:
 authorizable- TheAuthorizableto be removed from the list of group members.- Returns:
 - true if the Authorizable was successfully removed. False otherwise.
 - Throws:
 javax.jcr.RepositoryException- If an error occurs.
 
- 
removeMembers
@NotNull @NotNull java.util.Set<java.lang.String> removeMembers(@NotNull @NotNull java.lang.String... memberIds) throws javax.jcr.RepositoryExceptionRemove one or several members from this Group. Note, that an implementation may define circumstances under which this method allows to remove members that (no longer) exist. An implementation may choose to (partially) postpone validation/verification utilSession.save().- Parameters:
 memberIds- TheIds of the authorizables to be removed from the members of this group.- Returns:
 - a set of those 
memberIdsthat could not be removed or an empty set if all ids have been successfully processed. The former may include those cases where a given id cannot be resolved to an existing authorizable. - Throws:
 javax.jcr.RepositoryException- If one of the specified memberIds is invalid or if some other error occurs.
 
 - 
 
 -