org.eclipse.actf.validation.reports
Class ValidationReport

java.lang.Object
  extended by org.eclipse.actf.validation.reports.ValidationReport

public class ValidationReport
extends Object

a validation report as generated by an AOP-based validation from a distinct JVM. This class serves as a model for all views that display reports or report-related information, such as creation contexts.

Author:
Mike Squillace

Constructor Summary
ValidationReport()
           
ValidationReport(ValidationReportRecord[] records, CreationContext[] contexts, String id)
           
 
Method Summary
 void addCreationContext(CreationContext context)
          add the creation context to this report
 void addCreationContexts(CreationContext[] contexts)
          add the creation contexts to this report
 void addCreationContexts(Map contexts)
           
 void addRecord(ValidationReportRecord record)
          add a record to this report
 void addRecords(ValidationReportRecord[] records)
          add the specified records to this report
 void addReportModifyListener(IReportModifyListener listener)
          add a listener to be notified when items are added to this report.
 void addUniqueRecords(ValidationReportRecord[] newRecords)
           
 void clear()
          clears this report instance for a new report
protected  void fireReportModifyEvent(ReportModifyEvent event)
           
 Map getCreationContexts()
          return the creation contexts added to this report.
 String getDescription()
          returns the report description
 String getModel()
           
 String getProperty(String key)
          get the property specified by the key
 ValidationReportRecord[] getRecords()
          return all report records in this report
 String getReportID()
           
 String getSource()
          returns the source of the report
 Time getTimestamp()
           
 String getTool()
           
 boolean isActive()
           
 boolean isEmpty()
          returns whether or not this report has content.
 boolean isPersistent()
           
 void removeReportModifyListener(IReportModifyListener listener)
          remove the listener from the list of listeners to be notified when a modification to this report takes place
 void setActive(boolean active)
           
 void setDescription(String desc)
          set the description
 void setModel(String model)
           
 void setPersistent(boolean persistent)
           
 void setProperty(String key, String val)
          set a property on this report
 void setReportID(String id)
           
 void setSource(String source)
          set the source of the report
 void setTimestamp(Time timestamp)
           
 void setTool(String tool)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ValidationReport

public ValidationReport()

ValidationReport

public ValidationReport(ValidationReportRecord[] records,
                        CreationContext[] contexts,
                        String id)
Method Detail

clear

public void clear()
clears this report instance for a new report


isEmpty

public boolean isEmpty()
returns whether or not this report has content. A report is empty if it has no creation contexts and no records associated with it.

Returns:
true if this report has no content

addRecord

public void addRecord(ValidationReportRecord record)
add a record to this report

Parameters:
record - - record to be added

addRecords

public void addRecords(ValidationReportRecord[] records)
add the specified records to this report

Parameters:
records - - records to be added

addCreationContext

public void addCreationContext(CreationContext context)
add the creation context to this report

Parameters:
context - - context to be added

addCreationContexts

public void addCreationContexts(CreationContext[] contexts)
add the creation contexts to this report

Parameters:
contexts - - contexts to be added

addCreationContexts

public void addCreationContexts(Map contexts)

getReportID

public String getReportID()

setReportID

public void setReportID(String id)

getRecords

public ValidationReportRecord[] getRecords()
return all report records in this report

Returns:
all records in this validation report

getCreationContexts

public Map getCreationContexts()
return the creation contexts added to this report. The returned map is keyed by the id of its associated creation context.

Returns:
all creation contexts added to this report

getDescription

public String getDescription()
returns the report description

Returns:
description

setDescription

public void setDescription(String desc)
set the description

Parameters:
desc -

getSource

public String getSource()
returns the source of the report

Returns:
source

setSource

public void setSource(String source)
set the source of the report

Parameters:
source -

getProperty

public String getProperty(String key)
get the property specified by the key

Parameters:
key -
Returns:
property value for the key or null

setProperty

public void setProperty(String key,
                        String val)
set a property on this report

Parameters:
key -
val -

addReportModifyListener

public void addReportModifyListener(IReportModifyListener listener)
add a listener to be notified when items are added to this report. Currently, additions are the only operations that constitute a modification.

Parameters:
listener -

removeReportModifyListener

public void removeReportModifyListener(IReportModifyListener listener)
remove the listener from the list of listeners to be notified when a modification to this report takes place

Parameters:
listener -

fireReportModifyEvent

protected void fireReportModifyEvent(ReportModifyEvent event)

isPersistent

public boolean isPersistent()

isActive

public boolean isActive()

addUniqueRecords

public void addUniqueRecords(ValidationReportRecord[] newRecords)

setPersistent

public void setPersistent(boolean persistent)

setActive

public void setActive(boolean active)

getTimestamp

public Time getTimestamp()

setTimestamp

public void setTimestamp(Time timestamp)

getTool

public String getTool()

setTool

public void setTool(String tool)

getModel

public String getModel()

setModel

public void setModel(String model)