public class GMFFUserTextEscapes extends java.lang.Object implements java.lang.Comparable<GMFFUserTextEscapes>
It is basically just a data structure with some attached utility functions on the data elements.
The reason for creating this class is that GMFF parameter type RunParms are not validated and processed until GMFF is initialized, typically when the user requests an export. So the RunParms are cached until initialization time.
The GMFFUserTextEscapes are keyed by exportType because, in theory, different export types could have different escape codes.
Modifier and Type | Field and Description |
---|---|
java.util.List<EscapePair> |
escapePairList |
static java.util.Comparator<GMFFUserTextEscapes> |
EXPORT_TYPE
EXPORT_TYPE sequences by GMFFUserTextEscapes.exportType.
|
java.lang.String |
exportType |
Constructor and Description |
---|
GMFFUserTextEscapes(java.lang.String exportType,
EscapePair[] escapePairs)
Constructor with array of Escape Pairs.
|
GMFFUserTextEscapes(java.lang.String exportType,
java.util.List<EscapePair> escapePairList)
Constructor with List of Escape Pairs.
|
Modifier and Type | Method and Description |
---|---|
boolean |
areUserTextEscapesValid(java.util.List<GMFFExportParms> exportParmsList,
Messages messages)
Validates User Text Escape data.
|
int |
compareTo(GMFFUserTextEscapes obj)
Compares GMFFUserTextEscapes object based on the primary key, exportType.
|
boolean |
equals(java.lang.Object obj)
Compare for equality with another GMFFUserTextEscapes.
|
java.lang.String |
generateAuditReportText()
Converts to Audit Report string for testing purposes.
|
int |
hashCode()
Computes hashcode for this GMFFUserTextEscapes
|
boolean |
isEscapePairListValid(Messages messages)
Validates each
EscapePair in the list. |
boolean |
isExportTypeValid(java.util.List<GMFFExportParms> exportParmsList,
Messages messages)
Validates export type.
|
java.lang.String |
toString()
converts to String
|
public final java.lang.String exportType
public java.util.List<EscapePair> escapePairList
public static final java.util.Comparator<GMFFUserTextEscapes> EXPORT_TYPE
public GMFFUserTextEscapes(java.lang.String exportType, java.util.List<EscapePair> escapePairList)
exportType
- keyescapePairList
- List of EscapePair
public GMFFUserTextEscapes(java.lang.String exportType, EscapePair[] escapePairs)
exportType
- keyescapePairs
- Array of EscapePair
public java.lang.String generateAuditReportText()
public boolean areUserTextEscapesValid(java.util.List<GMFFExportParms> exportParmsList, Messages messages)
For ease of use, validation does not stop at the first error found. Any errors are accumulated in the Messages object.
exportParmsList
- List of GMFFExportParms used to validate
exportType (must be used in the Export Parms.)messages
- The Messages object.public boolean isExportTypeValid(java.util.List<GMFFExportParms> exportParmsList, Messages messages)
exportParmsList
- List of GMFFExportParms used to validate
exportType (must be defined in the Export Parms.)messages
- The Messages object.public boolean isEscapePairListValid(Messages messages)
EscapePair
in the list.
Uses EscapePair.validateEscapePair()
to perform the validation.
Validates every EscapePair even if errors are found.
messages
- The Messages object.public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
Equal if and only if the GMFFUserTextEscapes exportType strings are equal and the obj to be compared to this object is not null and is a GMFFUserTextEscapes as well.
equals
in class java.lang.Object
obj
- another GMFFUserTextEscapes -- otherwise will return false.public int compareTo(GMFFUserTextEscapes obj)
compareTo
in interface java.lang.Comparable<GMFFUserTextEscapes>
obj
- GMFFUserTextEscapes object to compare to this
GMFFUserTextEscapes