|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.ibm.tspaces.ac.TsPrincipal
This class implements the java.security.Principal, interface. A Principal is a user or group of users that have(or want) access to a resource. This also implements the java.security.acl.Group interface. This is used to represent a group of principals.
Note that Group extends Principal. Thus, either a Principal or a Group can
be passed as an argument to methods containing a Principal parameter. For
example, you can add either a Principal or a Group to a Group object by
calling the object's addMember method, passing it the
Principal or Group.
| Constructor Summary | |
TsPrincipal(java.lang.String name)
Constructor with Principal name specified. |
|
| Method Summary | |
protected void |
addBelongsTo(java.security.acl.Group group)
Adds the specified group to the member to show it belongs. |
boolean |
addMember(java.security.Principal user)
Adds the specified member to the group. |
boolean |
equals(java.lang.Object another)
Returns true if the object passed matches the Principal represented in this interface. |
java.lang.String |
getName()
Return the name associated with this Principal |
int |
hashCode()
Returns a hashcode for this principal. |
boolean |
isMember(java.security.Principal member)
Returns true if the passed principal is a member of the group. |
java.util.Enumeration |
members()
Returns an enumeration of the members in the group. |
protected void |
removeBelongsTo(java.security.acl.Group group)
Removes the specified group from the member. |
boolean |
removeMember(java.security.Principal user)
Removes the specified member from the group. |
void |
setName(java.lang.String name)
Set the name to be associated with this Principal |
java.lang.String |
toString()
Prints a string representation of this Principal. |
| Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public TsPrincipal(java.lang.String name)
| Method Detail |
public java.lang.String getName()
public void setName(java.lang.String name)
public boolean addMember(java.security.Principal user)
user - the principal to add to this group.public boolean removeMember(java.security.Principal user)
user - the principal to remove from this group.protected void addBelongsTo(java.security.acl.Group group)
the - group to add to this principal .protected void removeBelongsTo(java.security.acl.Group group)
the - group to remove from to this principal .public boolean isMember(java.security.Principal member)
member - the principal whose membership is to be checked.public java.util.Enumeration members()
public boolean equals(java.lang.Object another)
another - the Principal object to compare with.public java.lang.String toString()
public int hashCode()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||