"WEBNMS_5 API Docs"

com.adventnet.management.config.snmp
Class SnmpAttribute

java.lang.Object
  extended by com.adventnet.management.config.xml.BaseElement
      extended by com.adventnet.management.config.xml.Attribute
          extended by com.adventnet.management.config.snmp.SnmpAttribute
All Implemented Interfaces:
java.io.Serializable

public class SnmpAttribute
extends Attribute

This class holds the SNMP Configuration data for configuring a set of SNMP enabled devices.

Attributes of type SCALAR are used for configuring scalar or columnnar attributes and Attributes of type TABLE are used for configuring rows in a table. For attributes of type SCALAR , index values should be appended with each OID ( scalar OID's should be appended with the index (0) and columnnar OID's should be appended with the encoded value of the index columns present in that row.) For Table Attributes, the index value should also be the encoded value of the index columns present in that Table.

OID's label will be taken for updating the ManagedObject Property after the attribute is successfully configured over a set of devices.
Refer Device, Attribute for details about ManagedObject Updation.

See Also:
Device, Attribute, Serialized Form

Field Summary
 
Fields inherited from class com.adventnet.management.config.xml.BaseElement
element, isServer
 
Constructor Summary
SnmpAttribute()
          Creates a SnmpAttribute by initializing an empty Element of name "Attribute".
SnmpAttribute(Attribute attribute)
          Constructs a SnmpAttribute from Attribute's Element.
SnmpAttribute(org.w3c.dom.Element element)
          Creates a SnmpAttribute from this element.
SnmpAttribute(java.lang.String tableOID, java.lang.String[] columnOidList, byte[] columnTypeList, java.lang.String[] columnValueList, java.lang.String index)
          Creates a table attribute with columnTypes as byte array.The index value is the encoded values of the index columns in that table.
SnmpAttribute(java.lang.String tableOID, java.lang.String[] columnOidList, java.lang.String[] columnOidLabelList, byte[] columnTypeList, java.lang.String[] columnValueList, java.lang.String index)
          Creates a table attribute with columnTypes as byte array.
SnmpAttribute(java.lang.String tableOID, java.lang.String[] columnOidList, java.lang.String[] columnTypeStringList, java.lang.String[] columnValueList, java.lang.String index)
          Creates a table attribute with columnTypes as String Array.The index value is the encoded values of the index columns in that table.
SnmpAttribute(java.lang.String tableOID, java.lang.String[] columnOidList, java.lang.String[] columnOidLabelList, java.lang.String[] columnTypeStringList, java.lang.String[] columnValueList, java.lang.String index)
          Creates a table attribute with columnTypes as String Array.The index value is the encoded values of the index columns in that table.
SnmpAttribute(java.lang.String identifier, java.lang.String label, byte type, java.lang.String value)
          Creates a scalar attribute,which takes type of the OID as byte.
SnmpAttribute(java.lang.String identifier, java.lang.String label, java.lang.String typeString, java.lang.String value)
          Creates a scalar attribute which takes type of the OID as String.
 
Method Summary
 java.lang.String getIndex()
          Returns the index of the row,if the attribute type is AttributeConstants.TABLE_ATTRIBUTE.
 java.lang.String getLabel()
          Returns the label of the OID.
 java.lang.String getTableOID()
          Returns the tableOID,if the attribute type is AttributeConstants.TABLE_ATTRIBUTE.
 byte getType()
          Returns the type of the OID in byte.
 java.lang.String getTypeString()
          Returns the type of the OID in String.
 java.lang.String getValue()
          Returns the value of the OID.
 
Methods inherited from class com.adventnet.management.config.xml.Attribute
getAttributeList, getAttributeType, getIdentifier, getUserAttributes, setAttributeList, setAttributeType, setUserAttributes
 
Methods inherited from class com.adventnet.management.config.xml.BaseElement
addSubTag, getAttribute, getElement, getProperties, getSubTagsByName, hasAttribute, removeSubTagsByName, setAttribute, setProperties, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SnmpAttribute

public SnmpAttribute()
Creates a SnmpAttribute by initializing an empty Element of name "Attribute".


SnmpAttribute

public SnmpAttribute(org.w3c.dom.Element element)
              throws InvalidTemplateException
Creates a SnmpAttribute from this element.

Parameters:
element - element containing Attribute as the root element.
Throws:
InvalidTemplateException - if the element is null.

SnmpAttribute

public SnmpAttribute(Attribute attribute)
Constructs a SnmpAttribute from Attribute's Element.


SnmpAttribute

public SnmpAttribute(java.lang.String identifier,
                     java.lang.String label,
                     byte type,
                     java.lang.String value)
Creates a scalar attribute,which takes type of the OID as byte. For scalar OID's, "0" should be appended and for columnnar OID's encoded value of the index columns present in that row should be appended with the OID.

Parameters:
identifier - OID to be configured.
label - label of the particular OID.
type - type of the OID in byte.
value - value that has to be configured over a device.

SnmpAttribute

public SnmpAttribute(java.lang.String identifier,
                     java.lang.String label,
                     java.lang.String typeString,
                     java.lang.String value)
Creates a scalar attribute which takes type of the OID as String. For scalar OID's , "0" should be appended and for columnnar OID's ,encoded value of the index columns present in that row should be appended with the OID.

Parameters:
identifier - OID to be configured.
label - label of the particular OID.
typeString - type for the OID in String.
value - value that has to be configured over a device.

SnmpAttribute

public SnmpAttribute(java.lang.String tableOID,
                     java.lang.String[] columnOidList,
                     byte[] columnTypeList,
                     java.lang.String[] columnValueList,
                     java.lang.String index)
Creates a table attribute with columnTypes as byte array.The index value is the encoded values of the index columns in that table.

Parameters:
tableOID - OID of the table attribute.
columnoidList - OID's of the columns in that table.
columnTypeList - types of the columnOID's in byte array.
columnValueList - values that has to be configured.
index - index of the row to be manipulated.

SnmpAttribute

public SnmpAttribute(java.lang.String tableOID,
                     java.lang.String[] columnOidList,
                     java.lang.String[] columnTypeStringList,
                     java.lang.String[] columnValueList,
                     java.lang.String index)
Creates a table attribute with columnTypes as String Array.The index value is the encoded values of the index columns in that table.

Parameters:
tableOID - OID for the tableAttribute.
columnoidList - OID's of the columns in that table.
columnTypeStringList - types of the column OID's in String array.
columnValueList - values that has to be configured.
index - the index of the row to be manipulated.

SnmpAttribute

public SnmpAttribute(java.lang.String tableOID,
                     java.lang.String[] columnOidList,
                     java.lang.String[] columnOidLabelList,
                     java.lang.String[] columnTypeStringList,
                     java.lang.String[] columnValueList,
                     java.lang.String index)
Creates a table attribute with columnTypes as String Array.The index value is the encoded values of the index columns in that table.

Parameters:
tableOID - OID for the tableAttribute.
columnoidList - OID's of the columns in that table.
columnOidLabelList - label names of the corresponding columns
columnTypeStringList - types of the column OID's in String array.
columnValueList - values that has to be configured.
index - the index of the row to be manipulated.

SnmpAttribute

public SnmpAttribute(java.lang.String tableOID,
                     java.lang.String[] columnOidList,
                     java.lang.String[] columnOidLabelList,
                     byte[] columnTypeList,
                     java.lang.String[] columnValueList,
                     java.lang.String index)
Creates a table attribute with columnTypes as byte array. The index value is the encoded values of the index columns in that table.

Parameters:
tableOID - OID of the table attribute.
columnOidList - OID's of the columns in that table.
columnOidLabelList - label names of the corresponding columns.
columnTypeList - types of the columnOID's in byte array.
columnValueList - values that has to be configured.
index - index of the row to be manipulated.
Method Detail

getLabel

public java.lang.String getLabel()
Returns the label of the OID.

Returns:
OID's label.

getType

public byte getType()
Returns the type of the OID in byte.

Returns:
OID's type.

getTypeString

public java.lang.String getTypeString()
Returns the type of the OID in String.

Returns:
OID's type in String.

getValue

public java.lang.String getValue()
Returns the value of the OID.

Returns:
the value that has to be set for the particular OID.

getTableOID

public java.lang.String getTableOID()
Returns the tableOID,if the attribute type is AttributeConstants.TABLE_ATTRIBUTE. If it is not a Table Attribute , it returns null.

Returns:
the tableOID of the SnmpAttribute.
See Also:
AttributeConstants

getIndex

public java.lang.String getIndex()
Returns the index of the row,if the attribute type is AttributeConstants.TABLE_ATTRIBUTE. if it is not a Table Attribute it returns -1.

Returns:
index of the row.
See Also:
AttributeConstants

"WEBNMS_5 API Docs"

Copyright © 2011 ZOHO Corp., All Rights Reserved.