com.adventnet.snmp.snmp2.vacm
Class VacmGroupEntry

java.lang.Object
  |
  +--com.adventnet.snmp.snmp2.vacm.VacmGroupEntry

public class VacmGroupEntry
extends java.lang.Object
implements java.io.Serializable

This class represents VacmSecurityToGroupEntry. It represents the vacmSecurityToGroupEntry OBJECT-TYPE (OID - .1.3.6.1.6.3.16.1.2.1) from ViewBasedAccessControl. This class has the attributes securitymodel, securityName and GroupName. It maps the combination of a securityModel and securityName into a groupName which is used to define an access control policy for a group of principals. It is to be noted that modifying any of attributes in this entry will not update the entries in other tables. For example while processing the isAccessAllowed, the groupName from this entry is used to consult the VacmGroupAccessTable and VacmAccessEntry to select a single entry that contains three MIB views. If the groupName is modified in this entry, then they are not correspondingly updated in the VacmAccessEntry and VacmGroupAccessEntry.

See Also:
VacmGroupTable, Serialized Form

Field Summary
(package private)  byte[] groupName
          Group name assoicated for access control
(package private) static int NONVOLATILE
           
(package private) static int OTHER
          The below are the various StorageType constants
(package private) static int PERMANENT
           
(package private) static int READONLY
           
(package private)  int securityModel
          Security Model associated with the group
(package private)  byte[] securityName
          Security name associated with the group
(package private)  int storageType
          The StorageType variable
(package private)  int userStatus
          The userStatus variable
(package private) static int VOLATILE
           
 
Constructor Summary
VacmGroupEntry(int model, byte[] name)
          Creates a VacmGroupEntry with the specified security model and security name.
 
Method Summary
 java.lang.Object getKey()
          Retrieve the key for this vacm Group object.
static java.lang.Object getKey(int secModel, byte[] secName)
          Retrieve the key for this vacm Group object.
 int getSecurityModel()
          Get the securityModel value associated with this object.
 byte[] getSecurityName()
          Get the securityName value associated with this object.
 byte[] getVacmGroupName()
          Get the VacmGroupName value.
 int getVacmGroupStatus()
          Get the vacmSecurityToGroupStatus associated with this VacmGroupEntry
 int getVacmGroupStorageType()
          Get the StorageType associated with this VacmGroupEntry
 void print()
          Prints the securityModel, securityName and groupName.
 void setVacmGroupName(byte[] groupName)
          Set the groupName value.
 void setVacmGroupStatus(int userStatus)
          Set the vacmSecurityToGroupStatus associated with this VacmGroupEntry.
 void setVacmGroupStorageType(int storageType)
          Set the StorageType associated with this VacmGroupEntry
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

securityModel

int securityModel
Security Model associated with the group

securityName

byte[] securityName
Security name associated with the group

groupName

byte[] groupName
Group name assoicated for access control

OTHER

static final int OTHER
The below are the various StorageType constants

VOLATILE

static final int VOLATILE

NONVOLATILE

static final int NONVOLATILE

PERMANENT

static final int PERMANENT

READONLY

static final int READONLY

storageType

int storageType
The StorageType variable

userStatus

int userStatus
The userStatus variable
Constructor Detail

VacmGroupEntry

public VacmGroupEntry(int model,
                      byte[] name)
Creates a VacmGroupEntry with the specified security model and security name.
Parameters:
model - The VacmSecurityModel for this object.
name - The VacmSecurityName for this object.
Throws:
java.lang.NullPointerException - if the name is null.
Method Detail

getSecurityModel

public int getSecurityModel()
Get the securityModel value associated with this object.
Returns:
security model associated with this object.

getSecurityName

public byte[] getSecurityName()
Get the securityName value associated with this object.
Returns:
security name

getVacmGroupName

public byte[] getVacmGroupName()
Get the VacmGroupName value. The securityModel and securityName map to this groupName.
Returns:
vacm group name associated with this object.

setVacmGroupName

public void setVacmGroupName(byte[] groupName)
Set the groupName value. The securityModel and securityName map to this groupName.
Parameters:
groupName - The vacm group name to be associated with this object.
Throws:
java.lang.NullPointerException - if the groupName is null.

getVacmGroupStorageType

public int getVacmGroupStorageType()
Get the StorageType associated with this VacmGroupEntry

setVacmGroupStorageType

public void setVacmGroupStorageType(int storageType)
Set the StorageType associated with this VacmGroupEntry

getVacmGroupStatus

public int getVacmGroupStatus()
Get the vacmSecurityToGroupStatus associated with this VacmGroupEntry

setVacmGroupStatus

public void setVacmGroupStatus(int userStatus)
Set the vacmSecurityToGroupStatus associated with this VacmGroupEntry. This is used in case of an agent side implementation.
Parameters:
userStatus - The row status value to be set on this entry.

getKey

public java.lang.Object getKey()
Retrieve the key for this vacm Group object.
Returns:
the key as an Object

getKey

public static java.lang.Object getKey(int secModel,
                                      byte[] secName)
Retrieve the key for this vacm Group object. Takes the security model and security name as parameters.
Parameters:
secModel - The VacmSecurityModel
secName - The VacmSecurityName
Returns:
the key as a String Object
Throws:
java.lang.NullPointerException - if the secName is null.

print

public void print()
Prints the securityModel, securityName and groupName.
Throws:
java.lang.NullPointerException - if the securityName or groupName is null.