Interface Group
- All Superinterfaces:
Authorizable
A Group is a collection of
Authorizables.-
Method Summary
Modifier and TypeMethodDescriptionbooleanaddMember(@NotNull Authorizable authorizable) Add a member to this Group.addMembers(@NotNull String... memberIds) Add one or more member(s) to this Group.@NotNull Iterator<Authorizable>@NotNull Iterator<Authorizable>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.removeMembers(@NotNull 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 Details
-
getDeclaredMembers
- Returns:
- Iterator of
Authorizables which are declared members of this Group. - Throws:
RepositoryException- If an error occurs.
-
getMembers
- Returns:
- Iterator of
Authorizables which are members of this Group. This includes both declared members and all authorizables that are indirect group members. - Throws:
RepositoryException- If an error occurs.
-
isDeclaredMember
Test whether anAuthorizableis a declared member of this group.- Parameters:
authorizable- TheAuthorizableto test.- Returns:
trueif the Authorizable to test is a direct member- Throws:
RepositoryException- If an error occurs.
-
isMember
- Parameters:
authorizable- TheAuthorizableto test.- Returns:
- true if the Authorizable to test is a direct or indirect member of this Group.
- Throws:
RepositoryException- If an error occurs.
-
addMember
Add 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:
RepositoryException- If an error occurs.
-
addMembers
@NotNull @NotNull Set<String> addMembers(@NotNull @NotNull String... memberIds) throws RepositoryException Add 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:
RepositoryException- If one of the specified memberIds is invalid or if some other error occurs.
-
removeMember
Remove 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:
RepositoryException- If an error occurs.
-
removeMembers
@NotNull @NotNull Set<String> removeMembers(@NotNull @NotNull String... memberIds) throws RepositoryException Remove 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:
RepositoryException- If one of the specified memberIds is invalid or if some other error occurs.
-