public class NestableGroup extends SimplePrincipal implements Group, Cloneable
Constructor and Description |
---|
NestableGroup(String name)
Creates new NestableGroup with the given name
|
Modifier and Type | Method and Description |
---|---|
boolean |
addMember(Principal group)
Pushes the group onto the Group stack and makes it the active
Group.
|
Object |
clone() |
boolean |
isMember(Principal member)
Returns true if the passed principal is a member of the active group.
|
Enumeration<Principal> |
members()
Returns an enumeration that contains the single active Principal.
|
boolean |
removeMember(Principal user)
Removes the first occurence of user from the Principal stack.
|
String |
toString() |
equals, getName, hashCode
public NestableGroup(String name)
public Enumeration<Principal> members()
public boolean removeMember(Principal user)
removeMember
in interface Group
user
- the principal to remove from this group.public boolean addMember(Principal group) throws IllegalArgumentException
addMember
in interface Group
group
- the instance of Group that contains the roles to set as the
active Group.IllegalArgumentException
- thrown if group is not an instance of Group.public boolean isMember(Principal member)
public String toString()
toString
in interface Principal
toString
in class SimplePrincipal
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2017 JBoss by Red Hat. All rights reserved.