Interface GroupPrincipal
-
- All Superinterfaces:
java.security.Principal
- All Known Implementing Classes:
EveryonePrincipal
@ProviderType public interface GroupPrincipal extends java.security.Principal
This interface is used to represent a group of principals. It is meant to replace the deprecatedjava.security.acl.Group
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isMember(@NotNull java.security.Principal member)
Returns true if the passed principal is a member of the group.@NotNull java.util.Enumeration<? extends java.security.Principal>
members()
Returns an enumeration of the members in the group.
-
-
-
Method Detail
-
isMember
boolean isMember(@NotNull @NotNull java.security.Principal member)
Returns true if the passed principal is a member of the group. This method does a recursive search, so if a principal belongs to a group which is a member of this group, true is returned.- Parameters:
member
- the principal whose membership is to be checked.- Returns:
- true if the principal is a member of this group, false otherwise.
-
members
@NotNull @NotNull java.util.Enumeration<? extends java.security.Principal> members()
Returns an enumeration of the members in the group. This includes both declared members and all principals that are indirect group members. The returned objects can be instances of either Principal or GroupPrincipal (which is a subclass of Principal).- Returns:
- an enumeration of the group members.
-
-