steve.pums.assess.process
Class LoggerService

java.lang.Object
  extended by steve.pums.assess.process.LoggerService

public class LoggerService
extends java.lang.Object

Used for events logging and retrieval in the SUMS database


Constructor Summary
LoggerService(java.sql.Connection conn)
          Creates a new instance of LoggerService
 
Method Summary
 java.util.Vector getAudit(int projectid)
          Used for the retrieval of events associated with a particular project
 void log(int user, int project, java.lang.String item, java.lang.String oldVal, java.lang.String newVal)
          Inserts the log of a new event in the SUMS database
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerService

public LoggerService(java.sql.Connection conn)
Creates a new instance of LoggerService

Parameters:
conn - Connection to the SUMS database
Method Detail

log

public void log(int user,
                int project,
                java.lang.String item,
                java.lang.String oldVal,
                java.lang.String newVal)
         throws java.sql.SQLException,
                java.text.ParseException
Inserts the log of a new event in the SUMS database

Parameters:
user - ID of the user triggering the event
project - ID of the project the event relates to
item - description of the affected item
oldVal - original value of the affected item
newVal - new value of the affected item
Throws:
java.sql.SQLException - as a result of SQL errors
java.text.ParseException - as a result of date parsing error

getAudit

public java.util.Vector getAudit(int projectid)
                          throws java.sql.SQLException
Used for the retrieval of events associated with a particular project

Parameters:
projectid - ID of the project to retrieve events for
Returns:
returns a collection of events associated with the project
Throws:
java.sql.SQLException - in the event of SQL errors