|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.slamd.db.SLAMDGroup
public class SLAMDGroup
This class defines a set of information about a user defined in the SLAMD database, including the username and hashed password, the default folder, and the set of groups in which the user is a member.
| Field Summary | |
|---|---|
static java.lang.String |
ELEMENT_MEMBERS
The name of the encoded element that holds the member names for this group. |
static java.lang.String |
ELEMENT_NAME
The name of the encoded element that holds the name of this group. |
| Constructor Summary | |
|---|---|
SLAMDGroup(java.lang.String groupName,
java.lang.String[] memberNames)
Creates a new SLAMD group with the provided information. |
|
| Method Summary | |
|---|---|
void |
addMember(java.lang.String userName)
Adds the specified user as a member of this group. |
static SLAMDGroup |
decode(byte[] encodedGroup)
Decodes the provided byte array as a SLAMD group. |
byte[] |
encode()
Encodes this group into a byte array. |
java.lang.String |
getGroupName()
Retrieves the name of this group. |
java.lang.String[] |
getMemberNames()
Retrieves the names of the members of this group. |
boolean |
isMember(java.lang.String userName)
Determines whether the specified user is a member of this group. |
void |
removeMember(java.lang.String userName)
Removes the specified user from this group. |
void |
setMemberNames(java.lang.String[] memberNames)
Specifies the set of members to use for this group. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String ELEMENT_NAME
public static final java.lang.String ELEMENT_MEMBERS
| Constructor Detail |
|---|
public SLAMDGroup(java.lang.String groupName,
java.lang.String[] memberNames)
groupName - The name of this group.memberNames - The user names of the users that are members of this
group.| Method Detail |
|---|
public java.lang.String getGroupName()
public java.lang.String[] getMemberNames()
public boolean isMember(java.lang.String userName)
userName - The user name of the user for which to make the
determination.
true if the user is a member of this group, or
false if not.public void setMemberNames(java.lang.String[] memberNames)
memberNames - The user names of the users that should be members of
this group.public void addMember(java.lang.String userName)
userName - The user name of the user to add to this group.public void removeMember(java.lang.String userName)
userName - The user name of the user to remove from this group.public byte[] encode()
public static SLAMDGroup decode(byte[] encodedGroup)
throws DecodeException
encodedGroup - The byte array containing the encoded group
information.
DecodeException - If a problem occurs while trying to decode the
provided byte array as a SLAMD group.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||