public class VisitReport extends Object
Modifier and Type | Class and Description |
---|---|
static class |
VisitReport.Status
Enumeration of the possible status's in increasing severity: OK,
WARNING,SEVERE
|
Modifier | Constructor and Description |
---|---|
protected |
VisitReport()
Used internally by
clone() . |
|
VisitReport(VisitKind kind,
Object subject,
String message,
int resultId,
Collection<VisitReport> subReports) |
|
VisitReport(VisitKind kind,
Object subject,
String message,
int resultId,
VisitReport.Status status)
Constructs the Visit Report.
|
|
VisitReport(VisitKind kind,
Object subject,
String message,
int resultId,
VisitReport.Status status,
Collection<VisitReport> subReports)
Constructs the Visit Report
|
Modifier and Type | Method and Description |
---|---|
VisitReport |
clone() |
static Object |
findAncestor(List<Object> ancestors,
Class<?> ancestorClass)
Find the most recent ancestor (earliest in the list) of a given class from the list of ancestors
|
long |
getCheckTime() |
VisitKind |
getKind() |
String |
getMessage() |
Map<String,Object> |
getProperties() |
Object |
getProperty(String key) |
int |
getResultId() |
VisitReport.Status |
getStatus()
Determines the overall Status.
|
Object |
getSubject() |
Collection<VisitReport> |
getSubReports()
Provides a list of sub reports.
|
static VisitReport.Status |
getWorstStatus(Collection<VisitReport> reports)
Determine the worst status from a collection of reports
|
protected VisitReport |
internalClone(VisitReport newReport) |
void |
setCheckTime(long time) |
void |
setKind(VisitKind kind) |
void |
setMessage(String message)
Sets the message
|
void |
setProperty(String key,
Object value) |
void |
setResultId(int resultId) |
void |
setStatus(VisitReport.Status status)
Sets the status of this report.
|
void |
setSubject(Object subject) |
void |
setSubReports(Collection<VisitReport> subReports)
Replaces the List of sub reports with those provided.
|
void |
setWasTimeConsuming(boolean wasTimeConsuming) |
String |
toString() |
protected void |
visitReportToStringBuffer(StringBuffer sb,
String indent) |
boolean |
wasTimeConsuming() |
public VisitReport(VisitKind kind, Object subject, String message, int resultId, VisitReport.Status status)
kind
- - the type of visit performedsubject
- - the thing being tested.message
- - a summary of the result of the test.resultId
- - an identification of the type of result relative to the
VisitKindstatus
- - the overall Status.protected VisitReport()
clone()
.public VisitReport(VisitKind kind, Object subject, String message, int resultId, VisitReport.Status status, Collection<VisitReport> subReports)
kind
- - the type of visit performedsubject
- - the thing being tested.message
- - a summary of the result of the test.resultId
- - an identification of the type of result relative to the
VisitKindstatus
- - the overall Status.subReports
- - a List of sub reports.public VisitReport(VisitKind kind, Object subject, String message, int resultId, Collection<VisitReport> subReports)
kind
- The type of visit performedsubject
- The thing that was visitedmessage
- A summary of the result of the testresultId
- An indication of the type of the result relative to the kind of visitsubReports
- A list of sub-reportspublic boolean wasTimeConsuming()
public void setWasTimeConsuming(boolean wasTimeConsuming)
wasTimeConsuming
- whether the VisitReport was generated by a time consuming visitotpublic int getResultId()
public void setResultId(int resultId)
resultId
- The type of the result of the visit relative to the kind of visitpublic String getMessage()
public void setMessage(String message)
message
- a message summarizing the reportpublic VisitReport.Status getStatus()
public void setStatus(VisitReport.Status status)
status
- getStatus()
public Object getSubject()
public void setSubject(Object subject)
subject
- an Object representing the subject of this visit reportpublic Collection<VisitReport> getSubReports()
public void setSubReports(Collection<VisitReport> subReports)
subReports
- a list of sub reportspublic VisitKind getKind()
public void setKind(VisitKind kind)
kind
- Specify the kind of visit that was madepublic static Object findAncestor(List<Object> ancestors, Class<?> ancestorClass)
ancestors
- The list of ancestors to examineancestorClass
- The class to search forpublic void setCheckTime(long time)
public long getCheckTime()
public static VisitReport.Status getWorstStatus(Collection<VisitReport> reports)
reports
- The collection of reports to examineprotected void visitReportToStringBuffer(StringBuffer sb, String indent)
public VisitReport clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
protected VisitReport internalClone(VisitReport newReport) throws CloneNotSupportedException
CloneNotSupportedException
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.