commands
Class UpdateDevice

java.lang.Object
  extended bycommands.UpdateDevice

public class UpdateDevice
extends java.lang.Object

Commands to update a list of device records in the GLTMon database. The commands use a list of retrieved devices to compare against a list of checked deviceIDs. Those that differ get updated in the GLTMon database.

Version:
0.1
Author:
gswalters

Constructor Summary
UpdateDevice()
           
 
Method Summary
 void done()
          Clean up after the command's execution.
 java.lang.String getUpdateResults()
           
 void initialize(java.lang.String dbContext, javax.servlet.http.HttpServletRequest request)
          Initialize the command with the database context and request.
 void updateMonitoring()
          Execute the updateMonitoring UpdateDevice command.
 void updateRemoved()
          Execute the updateMonitoring UpdateDevice command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UpdateDevice

public UpdateDevice()
Method Detail

getUpdateResults

public java.lang.String getUpdateResults()

initialize

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

Parameters:
dbContext - String containing the JNDI context resource
request - HttpServletRequest holding the full HTTP request
Throws:
java.lang.Exception - containing the reason the initialize failed

updateMonitoring

public void updateMonitoring()
                      throws java.lang.Exception
Execute the updateMonitoring UpdateDevice command. Construct the database query and submit it to the database.

Throws:
java.lang.Exception - to indicate a failed query

updateRemoved

public void updateRemoved()
                   throws java.lang.Exception
Execute the updateMonitoring UpdateDevice command. Construct the database query and submit it to the database.

Throws:
java.lang.Exception - to indicate a failed query

done

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