Class OrgPolicyReport
java.lang.Object
de.aristaflow.adept2.model.orgmodel.OrgPolicyReport
- All Implemented Interfaces:
Serializable
An instance of
OrgPolicyReport is used to store entries for problems
and other issues encountered while parsing an OrgPolicy.- Author:
- Patrick Schmidt
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAnOrgPolicyReport.Entryis what the name implies: an entry in aOrgPolicyReportand contains data about one error, warning or other information about the parsed OrgPolicy.static classRepresents a range within an OrgPolicy.static enumTheResultTypeis used for the overall result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntry(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.Returns an array containing all entries of this report.getEntryAt(int index) Returns the entry at the given index.intReturns the current number of entries in this report.Returns the overall result type of this report.
-
Constructor Details
-
OrgPolicyReport
public OrgPolicyReport()
-
-
Method Details
-
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
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
Returns an array containing all entries of this report.- Returns:
- an array containing all entries of this report
-
addEntry
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
-