commands
Class SelectAttributes

java.lang.Object
  extended bycommands.SelectAttributes

public class SelectAttributes
extends java.lang.Object

Commands to retrieve a list of attributes for a device interface from the GLTMon database. The commands return either monitored, unmonitored, unremoved, or removed attributes. Using the deviceID and ifIndex, query the database for Device interface's attributes.

Version:
0.1
Author:
gswalters

Constructor Summary
SelectAttributes()
          Construct a default SelectAttributes command with an empty array.
 
Method Summary
 void done()
          Clean up after the command's execution.
 java.util.ArrayList getAttributes()
           
 Device getDevice()
           
 DeviceInterface getInterface()
           
 void initialize(java.sql.Connection dbConn, long deviceID, int ifIndex)
           
 void initialize(java.lang.String dbContext, javax.servlet.http.HttpServletRequest request)
          Initialize the command with the parameters and database context.
 void initialize(java.lang.String dbContext, long deviceID, int ifIndex)
          Initialize the command with the deviceID and ifIndex and database context.
 void selAllAttributes()
          Select all attributes for a device interface.
 void selMonAttributes()
          Select the monitored attributes for a device interface.
 void selRemAttributes()
          Select the monitored attributes for a device interface.
 void selUnMonAttributes()
          Select the unmonitored attributes for a device interface.
 void selUnRemAttributes()
          Select the unremoved attributes for a device interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SelectAttributes

public SelectAttributes()
Construct a default SelectAttributes command with an empty array.

Method Detail

getDevice

public Device getDevice()

getInterface

public DeviceInterface getInterface()

getAttributes

public java.util.ArrayList getAttributes()

initialize

public void initialize(java.lang.String dbContext,
                       long deviceID,
                       int ifIndex)
                throws java.lang.Exception
Initialize the command with the deviceID and ifIndex and database context. If either has problems, throw an exception to indicate the problem.

Parameters:
dbContext - String containing the JNDI context resource
deviceID - long record ID of a single device
ifIndex - int value of the interface index for a device
Throws:
java.lang.Exception - containing the reason the initialize failed

initialize

public void initialize(java.lang.String dbContext,
                       javax.servlet.http.HttpServletRequest request)
                throws java.lang.Exception
Initialize the command with the parameters and database context. If either has problems, throw an exception to indicate the problem.

Parameters:
dbContext - String containing the JNDI context resource
request - HttpServletRequest request header from the Web page
Throws:
java.lang.Exception - containing the reason the initialize failed

initialize

public void initialize(java.sql.Connection dbConn,
                       long deviceID,
                       int ifIndex)
                throws java.lang.Exception
Throws:
java.lang.Exception

selMonAttributes

public void selMonAttributes()
                      throws java.lang.Exception
Select the monitored attributes for a device interface.

Throws:
java.lang.Exception - to problems

selUnMonAttributes

public void selUnMonAttributes()
                        throws java.lang.Exception
Select the unmonitored attributes for a device interface.

Throws:
java.lang.Exception - to problems

selUnRemAttributes

public void selUnRemAttributes()
                        throws java.lang.Exception
Select the unremoved attributes for a device interface.

Throws:
java.lang.Exception - to problems

selRemAttributes

public void selRemAttributes()
                      throws java.lang.Exception
Select the monitored attributes for a device interface.

Throws:
java.lang.Exception - to problems

selAllAttributes

public void selAllAttributes()
                      throws java.lang.Exception
Select all attributes for a device interface.

Throws:
java.lang.Exception - to problems

done

public void done()
Clean up after the command's execution.