Class OrgPolicyReport
- java.lang.Object
-
- de.aristaflow.adept2.model.orgmodel.OrgPolicyReport
-
- All Implemented Interfaces:
Serializable
public class OrgPolicyReport extends Object implements Serializable
An instance ofOrgPolicyReportis used to store entries for problems and other issues encountered while parsing an OrgPolicy.- Author:
- Patrick Schmidt
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOrgPolicyReport.EntryAnOrgPolicyReport.Entryis what the name implies: an entry in aOrgPolicyReportand contains data about one error, warning or other information about the parsed OrgPolicy.static classOrgPolicyReport.RangeRepresents a range within an OrgPolicy.static classOrgPolicyReport.ResultTypeTheResultTypeis used for the overall result
-
Constructor Summary
Constructors Constructor Description OrgPolicyReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEntry(OrgPolicyReport.Entry entry)Adds the given entry to this report's list of entries.voidaddEntry(OrgPolicyReport.ResultType resultType, String description, int beginColumn, int endColumn)Creates an entry for the given values and adds it to this report's list of entries.voidaddEntry(OrgPolicyReport.ResultType resultType, String description, OrgPolicyReport.Range... ranges)Creates an entry for the given values and adds it to this report's list of entries.OrgPolicyReport.Entry[]getEntries()Returns an array containing all entries of this report.OrgPolicyReport.EntrygetEntryAt(int index)Returns the entry at the given index.intgetEntryCount()Returns the current number of entries in this report.OrgPolicyReport.ResultTypegetOverallResult()Returns the overall result type of this report.
-
-
-
Method Detail
-
getOverallResult
public OrgPolicyReport.ResultType getOverallResult()
Returns the overall result type of this report. This is determined by the "worst" result type across all its entries.- Returns:
- the overall result type of this report
-
getEntryCount
public int getEntryCount()
Returns the current number of entries in this report.- Returns:
- the current number of entries in this report
-
getEntryAt
public OrgPolicyReport.Entry getEntryAt(int index)
Returns the entry at the given index.- Parameters:
index- the index of the entry to be returned- Returns:
- the entry at the given index
-
getEntries
public OrgPolicyReport.Entry[] getEntries()
Returns an array containing all entries of this report.- Returns:
- an array containing all entries of this report
-
addEntry
public void addEntry(OrgPolicyReport.Entry entry)
Adds the given entry to this report's list of entries.- Parameters:
entry- the entry to be added to this report's list of entries
-
addEntry
public void addEntry(OrgPolicyReport.ResultType resultType, String description, int beginColumn, int endColumn)
Creates an entry for the given values and adds it to this report's list of entries.- Parameters:
resultType- the result type of the new entrydescription- the description of the new entrybeginColumn- the begin column of the affected rangeendColumn- the end column of the affected range
-
addEntry
public void addEntry(OrgPolicyReport.ResultType resultType, String description, OrgPolicyReport.Range... ranges)
Creates an entry for the given values and adds it to this report's list of entries.- Parameters:
resultType- the result type of the new entrydescription- the description of the new entryranges- the affected ranges
-
-