Class GroupPrincipal
- java.lang.Object
-
- org.apache.karaf.jaas.boot.principal.GroupPrincipal
-
- All Implemented Interfaces:
Serializable,Principal,Group
public class GroupPrincipal extends Object implements Group, Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GroupPrincipal(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanaddMember(Principal user)Adds the specified member to the group.booleanequals(Object o)StringgetName()inthashCode()booleanisMember(Principal member)Returns true if the passed principal is a member of the group.Enumeration<? extends Principal>members()Returns an enumeration of the members in the group.booleanremoveMember(Principal user)Removes the specified member from the group.StringtoString()
-
-
-
Constructor Detail
-
GroupPrincipal
public GroupPrincipal(String name)
-
-
Method Detail
-
equals
public boolean equals(Object o)
-
hashCode
public int hashCode()
-
toString
public String toString()
-
addMember
public boolean addMember(Principal user)
Description copied from interface:GroupAdds the specified member to the group.
-
removeMember
public boolean removeMember(Principal user)
Description copied from interface:GroupRemoves the specified member from the group.- Specified by:
removeMemberin interfaceGroup- Parameters:
user- the principal to remove from this group.- Returns:
- true if the principal was removed, or false if the principal was not a member.
-
isMember
public boolean isMember(Principal member)
Description copied from interface:GroupReturns 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.
-
members
public Enumeration<? extends Principal> members()
Description copied from interface:GroupReturns an enumeration of the members in the group. The returned objects can be instances of either Principal or Group (which is a subclass of Principal).
-
-