Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.further.jaudit.http
Class AuditViewerBean  view AuditViewerBean download AuditViewerBean.java

java.lang.Object
  extended bycom.further.jaudit.http.AuditViewerBean

public class AuditViewerBean
extends java.lang.Object

This bean handles the work of viewing the audit history for a sourcefile. The source file is set on the bean and the source audit history is made available via an Iterator over the dates. For each date, the user can obtain an iterator over the metrics, the user that entered the audit record and the comment.

Since:
1.0
Version:
$Id: AuditViewerBean.java,v 1.1.1.1 2001/10/11 16:42:08 krisw Exp $

Field Summary
private  java.util.Map auditRecordMap
          The map from Date to audit record
private  org.apache.log4j.Category category
          log4j debug audit channel
private  java.util.Map metricMap
          The map from metric id to SourceMetric.
private  com.further.jaudit.SourceFile sourceFile
          The source file whose audit history is being retreived.
 
Constructor Summary
AuditViewerBean()
          Create a new AuditViewerBean
 
Method Summary
 java.lang.String getAuditComment(java.util.Date date)
          Get the audit comment for the audit performed on the given date.
 java.util.Iterator getAuditDateIterator()
          Retreive an Iterator over the audit dates, which can then be used as a primary key to retreive the user performing the audit, the comment and the source metrics.
 java.lang.String getAuditUser(java.util.Date date)
          Get the user who performed the audit on the given date.
 java.lang.String getBackgroundColorFor(java.util.Date date, ColorPreferencesBean colorPreferences)
          Get the displayable background color for the given audit record.
 java.lang.String getMetricDescription(java.lang.String id)
          Get the metric description for the source metric with the given abbreviation.
 java.util.Iterator getMetricIterator(java.util.Date auditDate)
          Get the iterator over the source metrics for the audit record with the given date.
 java.lang.String getMetricName(java.lang.String id)
          Get the metric name for the source metric with the given abbreviation.
 java.lang.String getMetricValue(java.lang.String id)
          Get the metric value (as a string) for the metric with the given abbreviation.
 void setSourceFile(com.further.jaudit.SourceFile file)
          Set the source file to enumerate the audit record for, building the audit record table from date to audit record.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sourceFile

private com.further.jaudit.SourceFile sourceFile
The source file whose audit history is being retreived.


auditRecordMap

private java.util.Map auditRecordMap
The map from Date to audit record


metricMap

private java.util.Map metricMap
The map from metric id to SourceMetric. This is set only when the user requests the metric iterator for a given audit, and is valid only until they request the next iterator


category

private org.apache.log4j.Category category
log4j debug audit channel

Constructor Detail

AuditViewerBean

public AuditViewerBean()
Create a new AuditViewerBean

Method Detail

setSourceFile

public void setSourceFile(com.further.jaudit.SourceFile file)
Set the source file to enumerate the audit record for, building the audit record table from date to audit record.


getAuditDateIterator

public java.util.Iterator getAuditDateIterator()
Retreive an Iterator over the audit dates, which can then be used as a primary key to retreive the user performing the audit, the comment and the source metrics.


getBackgroundColorFor

public java.lang.String getBackgroundColorFor(java.util.Date date,
                                              ColorPreferencesBean colorPreferences)
Get the displayable background color for the given audit record. This uses the color preferences bean and the audit record itself to find the color.


getAuditUser

public java.lang.String getAuditUser(java.util.Date date)
Get the user who performed the audit on the given date.


getAuditComment

public java.lang.String getAuditComment(java.util.Date date)
Get the audit comment for the audit performed on the given date.


getMetricIterator

public java.util.Iterator getMetricIterator(java.util.Date auditDate)
Get the iterator over the source metrics for the audit record with the given date. This sets up the table of metric abbreviation to SourceMetric.


getMetricName

public java.lang.String getMetricName(java.lang.String id)
Get the metric name for the source metric with the given abbreviation.


getMetricDescription

public java.lang.String getMetricDescription(java.lang.String id)
Get the metric description for the source metric with the given abbreviation.


getMetricValue

public java.lang.String getMetricValue(java.lang.String id)
Get the metric value (as a string) for the metric with the given abbreviation.