Class OrgPolicyReport
- java.lang.Object
-
- de.aristaflow.adept2.model.orgmodel.OrgPolicyReport
-
- All Implemented Interfaces:
Serializable
public class OrgPolicyReport extends Object implements Serializable
An instance ofOrgPolicyReport
is 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 class
OrgPolicyReport.Entry
AnOrgPolicyReport.Entry
is what the name implies: an entry in aOrgPolicyReport
and contains data about one error, warning or other information about the parsed OrgPolicy.static class
OrgPolicyReport.Range
Represents a range within an OrgPolicy.static class
OrgPolicyReport.ResultType
TheResultType
is used for the overall result
-
Constructor Summary
Constructors Constructor Description OrgPolicyReport()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(OrgPolicyReport.Entry entry)
Adds the given entry to this report's list of entries.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.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.OrgPolicyReport.Entry[]
getEntries()
Returns an array containing all entries of this report.OrgPolicyReport.Entry
getEntryAt(int index)
Returns the entry at the given index.int
getEntryCount()
Returns the current number of entries in this report.OrgPolicyReport.ResultType
getOverallResult()
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
-
-