|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.slamd.db.SLAMDPermission
public class SLAMDPermission
This class defines a generic permission that may be associated with some functionality in the SLAMD administrative interface.
| Field Summary | |
|---|---|
static java.lang.String |
ELEMENT_GROUPS
The name of the encoded element that holds the groups names associated with this permission. |
static java.lang.String |
ELEMENT_NAME
The name of the encoded element that holds the name of this permission. |
static java.lang.String |
ELEMENT_USERS
The name of the encoded element that holds the user names associated with this permission. |
| Constructor Summary | |
|---|---|
SLAMDPermission(java.lang.String name,
java.lang.String[] userNames,
java.lang.String[] groupNames)
Creates a new permission with the provided information. |
|
| Method Summary | |
|---|---|
void |
addGroupName(java.lang.String groupName)
Adds the provided group name to the set of groups that have been assigned this permission. |
void |
addUserName(java.lang.String userName)
Adds the provided user name to the set of users that have been assigned this permission. |
boolean |
appliesToUser(SLAMDUser user)
Indicates whether this permission is granted for the provided user. |
static SLAMDPermission |
decode(byte[] encodedPermission)
Decodes the provided byte array as a SLAMD permission. |
static SLAMDPermission |
decodeSequence(ASN1Sequence permissionSequence)
Decodes the provided ASN.1 sequence as a SLAMD permission. |
byte[] |
encode()
Encodes the information associated with this permission to a byte array. |
ASN1Sequence |
encodeAsSequence()
Encodes the information associated with this permission to an ASN.1 sequence. |
java.lang.String[] |
getGroupNames()
Retrieves the names of the groups that have been assigned this permission. |
java.lang.String |
getName()
Retrieves the name of this permission. |
java.lang.String[] |
getUserNames()
Retrieves the names of the users that have been assigned this permission. |
void |
removeGroupName(java.lang.String groupName)
Removes the specified group from the set of groups that have been assigned this permission. |
void |
removeUserName(java.lang.String userName)
Removes the specified user from the set of users that have been assigned this permission. |
void |
setGroupNames(java.lang.String[] groupNames)
Specifies the names of the groups that have been assigned this permission. |
void |
setUserNames(java.lang.String[] userNames)
Specifies the names of the users that have been assigned this permission. |
| 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_USERS
public static final java.lang.String ELEMENT_GROUPS
| Constructor Detail |
|---|
public SLAMDPermission(java.lang.String name,
java.lang.String[] userNames,
java.lang.String[] groupNames)
name - The name of this permission.userNames - The names of the users that have been assigned this
permission.groupNames - The names of the groups that have been assigned this
permission.| Method Detail |
|---|
public java.lang.String getName()
public java.lang.String[] getUserNames()
public void setUserNames(java.lang.String[] userNames)
userNames - The names of the users that have been assigned this
permission.public void addUserName(java.lang.String userName)
userName - The user name to add to the set of users that have been
assigned this permission.public void removeUserName(java.lang.String userName)
userName - The user name to remove from the set of users that have
been assigned this permission.public java.lang.String[] getGroupNames()
public void setGroupNames(java.lang.String[] groupNames)
groupNames - The names of the groups that have been assigned this
permission.public void addGroupName(java.lang.String groupName)
groupName - The group name to add to the set of groups that have
been assigned this permission.public void removeGroupName(java.lang.String groupName)
groupName - The group name to remove from the set of groups that
have been assigned this permission.public boolean appliesToUser(SLAMDUser user)
user - The user for which to make the determination.
true if this permission is granted for the provided
user, or false if not.public ASN1Sequence encodeAsSequence()
public byte[] encode()
public static SLAMDPermission decodeSequence(ASN1Sequence permissionSequence)
throws DecodeException
permissionSequence - The ASN.1 sequence to be decoded.
DecodeException - If a problem occurs while attempting to decode
the permission.
public static SLAMDPermission decode(byte[] encodedPermission)
throws DecodeException
encodedPermission - The byte array containing the data to decode.
DecodeException - If a problem occurs while attempting to decode
the permission.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||