Class GroupPrincipals
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.principal.GroupPrincipals
-
public final class GroupPrincipals extends java.lang.Object
Helper class to deal with the migration between the 2 types of groups
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
isGroup(@NotNull java.security.Principal principal)
Checks if the provided principal is a group.static boolean
isMember(@NotNull java.security.Principal principal, @NotNull java.security.Principal member)
Returns true if the passed principal is a member of the group.static @NotNull java.util.Enumeration<? extends java.security.Principal>
members(@NotNull java.security.Principal principal)
Returns an enumeration of the members in the group.
-
-
-
Method Detail
-
isGroup
public static boolean isGroup(@NotNull @NotNull java.security.Principal principal)
Checks if the provided principal is a group.- Parameters:
principal
- to be checked.- Returns:
- true if the principal is of type group.
-
members
@NotNull public static @NotNull java.util.Enumeration<? extends java.security.Principal> members(@NotNull @NotNull java.security.Principal principal)
Returns an enumeration of the members in the group.- Parameters:
principal
- the principal whose membership is listed.- Returns:
- an enumeration of the group members.
-
isMember
public static boolean isMember(@NotNull @NotNull java.security.Principal principal, @NotNull @NotNull java.security.Principal member)
Returns true if the passed principal is a member of the group.- Parameters:
principal
- the principal whose members are being checked.member
- the principal whose membership is to be checked.- Returns:
- true if the principal is a member of this group, false otherwise.
-
-