Package ro.sync.document
Class DocumentPositionedInfo
java.lang.Object
ro.sync.document.DocumentPositionedInfo
- Direct Known Subclasses:
AuthorDocumentPositionedInfo
This class holds information related to the document, refering to some
errors, or find results. These informations hold the position in the
document, the message and the systemId of the document in which they appear.
If the systemId is null, then the semantics is that the info belongs to the
currently edited file.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIf one of the components is not known, use this constant for it.static final intError message.static final intFatal error message.static final intInformation message.static final intWarning message. -
Constructor Summary
ConstructorsConstructorDescriptionDocumentPositionedInfo(int offset) Constructor for a DPI used only to hold the current position in the editor.DocumentPositionedInfo(int severity, String message) Constructor.DocumentPositionedInfo(int severity, String message, String systemID) Constructor.DocumentPositionedInfo(int severity, String message, String systemID, int line, int column) Constructor.DocumentPositionedInfo(int severity, String message, String systemID, int line, int column, int length) Constructor.DocumentPositionedInfo(int severity, String message, String systemID, int line, int column, int length, int offset, URL additionalInfo, boolean highlightToColumn) Constructor.DocumentPositionedInfo(int severity, ro.sync.document.MessageProvider messageProvider, String systemID, int line, int column, int endLine, int endColumn, int length, int offset, URL additionalInfo, boolean highlightToColumn) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionasHTML()Build the HTML representation of this DPI.asHTML(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the HTML representation of this DPI.asHTML(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Builds the HTML representation of this DPI.asHTML(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription, boolean asCompleteHTMLDocument) Build the HTML representation of this DPI.asJSON()Build the JSON representation of this DPI.asJSON(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the JSON representation of this DPI.asJSON(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the JSON representation of this DPI.asText()Build the text representation of this DPI.asText(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the text representation of this DPI.asText(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the text representation of this DPI.asXML()Build the XML representation of this DPI.asXML(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the XML representation of this DPI.asXML(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the XML representation of this DPI.booleanIndicates whether some other document positioned information is "equal to" this one.static intflipSeverity(int severityToFlip) Used to obtain the severity level to be used when sorting the DPIs by severity.protected StringReturn the additional HTML content, if any.The URL for additional information if available.ro.sync.exml.editor.AnchorGet the error anchor if any.intGets the column of the event.ro.sync.document.DPIDatagetData()Getter for the user managed data.ro.sync.document.DetailedExceptionInfoGet detailed information about the problem.ro.sync.document.DITAAdditionalInfoAdditional info about DITA completeness check.ro.sync.document.ECAdditionalInfoAdditional info for Eclipse inner usage.intGet the highlight end column, or NOT_KNOWN if not available.intGet the highlight end line, or NOT_KNOWN if not available.Get the name of the engine who provided the error.Get the error key.Gets the HTML fragment to be presented when the message is displayed as HTML.Get the imposed initial page if a new editor will be opened.intGets the length of the text that will be selected in the editor.intgetLine()Gets the line attribute of the eventint[]Get the match range if any.Gets the messageintReturn the offset used to highlight the match inside the message in the results panel.ro.sync.document.MessageProviderThe provider of messages from the current document position info.Gets the message prepended with the engine name, if available.getMessageWithEngine(boolean includeSeverity, boolean includeErrorKey) Gets the message prepended with the engine name, if available.Get the message with severity info as a char in the front of the message (W, E, F).getMessageWithSeverity(boolean includeEngineInformation) Get the message with severity info as a char in the front of the message (W, E, F).getMessageWithSeverity(boolean includeEngineInformation, boolean includeErrorKey) Gets the message with severity info as a char in the front of the message (W, E, F).intGet the event's offset.ro.sync.document.OperationDescriptionThe description of an operation (that is an operation which is applied over multiple resources) that generated this DPI.Get the preferred engine name who provided the error.intGets the severity level.Gets the severity level as stringPosition[]getStartEndPositions(String pageId) Get the temporary start and end positions for the current page.Gets the systemID attribute of the DocumentPositionedInfo objectinthashCode()Compute unique hash code for this object.booleanReturntrueif this DPI targets an XML element.booleanCheck if the highlight must be made from column 0 to the specified column.voidsetAdditionalInfo(URL url) Set the additional information URL if available.voidsetAnchor(ro.sync.exml.editor.Anchor anchor) Set the error anchor.voidsetColumn(int column) Sets the column of the event, orNOT_KNOWNif the column is not available.voidsetData(ro.sync.document.DPIData data) Setter for the user managed data.voidsetDetailedExceptionInfo(ro.sync.document.DetailedExceptionInfo detailedExceptionInfo) Set detailed information about the problem.voidsetDITAAdditionalInfo(ro.sync.document.DITAAdditionalInfo additionalInfo) Additional info about DITA completeness check.voidsetECAdditionalInfo(ro.sync.document.ECAdditionalInfo additionalInfo) Additional info for Eclipse inner usage.voidsetElementTarget(boolean isElementTarget) Settrueif this DPI targets an XML element.voidsetEndColumn(int endColumn) Sets the end column of the highlight.voidsetEndLine(int endLine) Sets the end line of the highlight.voidsetEngineName(String engineName) Set the name of the engine who provided the error.voidsetErrorKey(String errorKey) The error validation key.voidsetHighlightToColumn(boolean how) Set highlight strategy for the document positioned information visual presentation.voidsetHtmlMessageFragment(String htmlMessageFragment) Set a special HTML fragment which needs to be presented instead of the message when the DPI is serialized to HTML.voidsetImposedInitialPage(String imposedInitialPage) Set the imposed initial page in which to open the DPI for a new editor.voidsetLength(int length) Sets the length of the selected text.voidsetLine(int line) Sets the line of the event, orNOT_KNOWNif the line is not available.voidsetMaskPasswordsInURLs(boolean maskPasswordsInURLs) Set mask passwords in URLs,trueby default.voidsetMatchRange(int[] matchRange) Set the match range.voidsetMessage(String message) Sets the message.voidsetMessageHighlightOffset(int messageHighlightOffset) Set the offset used to highlight the match inside the message in the results panel.voidsetOffset(int offset) Sets the event's offset.voidsetOperationDescription(ro.sync.document.OperationDescription operationDescription) Sets the description of an operation (that is an operation which is applied over multiple resources) that generated this DPI.voidsetSeverity(int severity) Sets the error severity.voidsetStartEndPositionsMap(Map<String, Position[]> startEndPositionsMap) Set a new temporary positions map.voidsetSystemID(String systemID) Sets the systemID of the event.voidsetTemporaryPositions(Position startPosition, Position endPosition, String pageId) Set the temporary start and end positions used for keeping the DPI synchronized with the highlight range from the page.toString()Gets the string representation.
-
Field Details
-
SEVERITY_INFO
public static final int SEVERITY_INFOInformation message.- See Also:
-
SEVERITY_WARN
public static final int SEVERITY_WARNWarning message.- See Also:
-
SEVERITY_ERROR
public static final int SEVERITY_ERRORError message.- See Also:
-
SEVERITY_FATAL
public static final int SEVERITY_FATALFatal error message.- See Also:
-
NOT_KNOWN
public static final int NOT_KNOWNIf one of the components is not known, use this constant for it.- See Also:
-
-
Constructor Details
-
DocumentPositionedInfo
public DocumentPositionedInfo(int offset) Constructor for a DPI used only to hold the current position in the editor.- Parameters:
offset- Start of selection.
-
DocumentPositionedInfo
public DocumentPositionedInfo(int severity, String message, String systemID, int line, int column, int length) Constructor.- Parameters:
severity- the severity level of the message.message- the error message.systemID- the system ID.line- the line on which the error occurred in the document.column- the column on which the error occurred.length- the length of the text to be selected.
-
DocumentPositionedInfo
public DocumentPositionedInfo(int severity, String message, String systemID, int line, int column, int length, int offset, URL additionalInfo, boolean highlightToColumn) Constructor.- Parameters:
severity- the severity level of the message.message- the error message.systemID- the system ID.line- the line on which the error occurred in the document.column- the column on which the error occurred.length- the length of the text to be selected.offset- the offset in the documentadditionalInfo- the URL from which the user can retrieve additional info about the error.highlightToColumn- true if the opener must highlight the entire text from the 1 column to the column number. This is useful in case of error checks, like validations or well-formed.
-
DocumentPositionedInfo
public DocumentPositionedInfo(int severity, ro.sync.document.MessageProvider messageProvider, String systemID, int line, int column, int endLine, int endColumn, int length, int offset, URL additionalInfo, boolean highlightToColumn) Constructor. Uses a message provider for the cases in which composing the message takes a lot of time (e.g. XPATH).- Parameters:
severity- the severity level of the message.messageProvider- the error message provider.systemID- the system ID.line- the line on which the error occurred in the document.column- the column on which the error occurred.endLine- the highlighted text must end in this line.endColumn- the highlighted text must end in this column.length- the length of the text to be selected.offset- the offset in the documentadditionalInfo- the URL from which the user can retrieve additional info about the error.highlightToColumn- true if the opener must highlight the entire text from the 1 column to the column number. This is useful in case of error checks, like validations or well-formed.
-
DocumentPositionedInfo
Constructor.- Parameters:
severity- the severity level of the message.message- the error message.systemID- the system ID.line- the line on which the error occurred in the document.column- the column on which the error occurred.
-
DocumentPositionedInfo
Constructor.- Parameters:
severity- the severity level of the message.message- the error message.systemID- the system ID.
-
DocumentPositionedInfo
Constructor.- Parameters:
severity- the severity level of the message.message- the error message.
-
DocumentPositionedInfo
Constructor. Use this for IDEAccess#openAndShowLocation. Tries to identify thelineandcolumnparameters in the URL fragment.- Parameters:
url- The URL to open in the editor.
-
-
Method Details
-
flipSeverity
public static int flipSeverity(int severityToFlip) Used to obtain the severity level to be used when sorting the DPIs by severity. This is done to allow natural sorting by severity, having theSEVERITY_FATALto be the small value and theSEVERITY_INFOthe big value.- Parameters:
severityToFlip- The severity of a DPI to be translated into natural ordering.- Returns:
- The natural ordering value to be used for a DPI' severity level.
-
equals
Indicates whether some other document positioned information is "equal to" this one. -
hashCode
public int hashCode()Compute unique hash code for this object. Hashcode is compatible with equals method. -
setSeverity
public void setSeverity(int severity) Sets the error severity.- Parameters:
severity- The new severity value. One of: SEVERITY_INFO, SEVERITY_WARN, SEVERITY_ERROR or SEVERITY_FATAL
-
setColumn
public void setColumn(int column) Sets the column of the event, orNOT_KNOWNif the column is not available.- Parameters:
column- The column
-
setLine
public void setLine(int line) Sets the line of the event, orNOT_KNOWNif the line is not available.- Parameters:
line- The new line value, 1 based.
-
setMessage
Sets the message. It will clear any user info if there is present into the message.- Parameters:
message- The new message
-
setMaskPasswordsInURLs
public void setMaskPasswordsInURLs(boolean maskPasswordsInURLs) Set mask passwords in URLs,trueby default.- Parameters:
maskPasswordsInURLs-trueto mask passwords in URLs which are part of the message.
-
setLength
public void setLength(int length) Sets the length of the selected text.- Parameters:
length- The length of the selected text.
-
setSystemID
Sets the systemID of the event.- Parameters:
systemID- The new systemID value
-
getLength
public int getLength()Gets the length of the text that will be selected in the editor.- Returns:
- The length of the text to be selected.
-
getColumn
public int getColumn()Gets the column of the event.- Returns:
- The column value, 1 based. Can be NOT_KNOWN.
-
getSeverity
public int getSeverity()Gets the severity level. One of: SEVERITY_INFO, SEVERITY_WARN, SEVERITY_ERROR or SEVERITY_FATAL- Returns:
- The severity value
-
getSeverityAsString
Gets the severity level as string- Returns:
- The severity value string
-
getLine
public int getLine()Gets the line attribute of the event- Returns:
- The line value, 1 based. Can be NOT_KNOWN.
-
getMessage
Gets the message- Returns:
- The message value
-
getHTMLMessage
Gets the HTML fragment to be presented when the message is displayed as HTML.- Returns:
- A special HTML fragment which needs to be presented when the message is presented as HTML.
nullif there is no HTML flavor.
-
getMessageProvider
public ro.sync.document.MessageProvider getMessageProvider()The provider of messages from the current document position info.- Returns:
- Returns the message provider.
-
getMessageWithEngine
Gets the message prepended with the engine name, if available.- Returns:
- The message.
-
getMessageWithEngine
Gets the message prepended with the engine name, if available. Could also include the severity and the error key.- Parameters:
includeSeverity-trueto include the severity level (other than INFO).includeErrorKey-trueto include the error code (if available).- Returns:
- the error message built as requested.
-
getMessageWithSeverity
Get the message with severity info as a char in the front of the message (W, E, F).- Returns:
- The message prefixed with the severity char. For INFO we do not present such a char.
-
getMessageWithSeverity
Get the message with severity info as a char in the front of the message (W, E, F). Could include the engine information.- Parameters:
includeEngineInformation-trueto include engine name.- Returns:
- The message prefixed with the severity char. For INFO we do not present such a char.
-
getMessageWithSeverity
Gets the message with severity info as a char in the front of the message (W, E, F). Could also include engine info and error code.- Parameters:
includeEngineInformation-trueto include engine name.includeErrorKey-trueto include error code.- Returns:
- The message prefixed with the severity char. For INFO we do not present such a char.
-
getSystemID
Gets the systemID attribute of the DocumentPositionedInfo object- Returns:
- The systemID value
-
setOffset
public void setOffset(int offset) Sets the event's offset. can be NOT_KNOWN- Parameters:
offset- the new offset.
-
getOffset
public int getOffset()Get the event's offset. Can be NOT_KNOWN- Returns:
- the offset
-
toString
Gets the string representation. -
getAdditionalInfo
The URL for additional information if available.- Returns:
- The additional information URL, or
null.
-
setAdditionalInfo
Set the additional information URL if available.- Parameters:
url- The URL at which the user can find additional information.
-
isHighlightToColumn
public boolean isHighlightToColumn()Check if the highlight must be made from column 0 to the specified column.- Returns:
- True if the highlight must be made from column 0 to the specified column.
-
setHighlightToColumn
public void setHighlightToColumn(boolean how) Set highlight strategy for the document positioned information visual presentation.- Parameters:
how-trueif the visual part should highlight from column 0 to specified columnfalseotherwise.
-
getEndColumn
public int getEndColumn()Get the highlight end column, or NOT_KNOWN if not available.- Returns:
- the highlight end column, or NOT_KNOWN.
-
getEndLine
public int getEndLine()Get the highlight end line, or NOT_KNOWN if not available.- Returns:
- the highlight end line or NOT_KNOWN.
-
setEndLine
public void setEndLine(int endLine) Sets the end line of the highlight.- Parameters:
endLine- The end line of the highlight.
-
setEndColumn
public void setEndColumn(int endColumn) Sets the end column of the highlight.- Parameters:
endColumn- The end column of the highlight.
-
setData
public void setData(ro.sync.document.DPIData data) Setter for the user managed data.- Parameters:
data- The user managed data.
-
getData
public ro.sync.document.DPIData getData()Getter for the user managed data.- Returns:
- The user managed data.
-
setDetailedExceptionInfo
public void setDetailedExceptionInfo(ro.sync.document.DetailedExceptionInfo detailedExceptionInfo) Set detailed information about the problem.- Parameters:
detailedExceptionInfo- The additional detailed info.
-
getDetailedExceptionInfo
public ro.sync.document.DetailedExceptionInfo getDetailedExceptionInfo()Get detailed information about the problem.- Returns:
- Returns the additional detailed info.
-
setEngineName
Set the name of the engine who provided the error.- Parameters:
engineName- The source engine name who provided the error.
-
getEngineName
Get the name of the engine who provided the error.- Returns:
- Returns the source engine name who provided the error.
nullif no was engine set.
-
getPreferredEngineName
Get the preferred engine name who provided the error. For DITA the engine is given by problem type.- Returns:
- Returns the source engine name who provided the error.
-
asXML
Build the XML representation of this DPI.- Returns:
- The XML representation of the DPI.
-
asXML
public String asXML(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the XML representation of this DPI.- Parameters:
includeSeverity-trueif severity details should be included.includeAdditionalInfo-trueif additional info details should be included.includeDescription-trueif description details should be included.includeSystemID-trueif system ID details should be included.includeLocation-trueif location details should be included.includeOperationDescription-trueif operation description details should be included.- Returns:
- The XML representation of the DPI.
-
asXML
public String asXML(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the XML representation of this DPI.- Parameters:
includeSeverity-trueif severity details should be included.includeErrorCode-trueif error code should be included.includeAdditionalInfo-trueif additional info details should be included.includeDescription-trueif description details should be included.includeSystemID-trueif system ID details should be included.includeLocation-trueif location details should be included.includeOperationDescription-trueif operation description details should be included.- Returns:
- The XML representation of the DPI.
-
asJSON
Build the JSON representation of this DPI.- Returns:
- The JSON representation of the DPI.
-
asJSON
public String asJSON(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the JSON representation of this DPI.- Parameters:
includeSeverity-trueif severity details should be included.includeAdditionalInfo-trueif additional info details should be included.includeDescription-trueif description details should be included.includeSystemID-trueif system ID details should be included.includeLocation-trueif location details should be included.includeOperationDescription-trueif operation description details should be included.- Returns:
- The JSON representation of the DPI.
-
asJSON
public String asJSON(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the JSON representation of this DPI.- Parameters:
includeSeverity-trueif severity details should be included.includeErrorCode-trueif error code should be included.includeAdditionalInfo-trueif additional info details should be included.includeDescription-trueif description details should be included.includeSystemID-trueif system ID details should be included.includeLocation-trueif location details should be included.includeOperationDescription-trueif operation description details should be included.- Returns:
- The JSON representation of the DPI.
-
asText
Build the text representation of this DPI.- Returns:
- The text representation of this DPI.
-
asText
public String asText(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the text representation of this DPI.- Parameters:
includeSeverity-trueif severity details should be included.includeAdditionalInfo-trueif additional info details should be included.includeDescription-trueif description details should be included.includeSystemID-trueif system ID details should be included.includeLocation-trueif location details should be included.includeOperationDescription-trueif operation description details should be included.- Returns:
- The text representation of this DPI.
-
asText
public String asText(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the text representation of this DPI.- Parameters:
includeSeverity-trueif severity details should be included.includeErrorCode-trueif error code should be included.includeAdditionalInfo-trueif additional info details should be included.includeDescription-trueif description details should be included.includeSystemID-trueif system ID details should be included.includeLocation-trueif location details should be included.includeOperationDescription-trueif operation description details should be included.- Returns:
- The text representation of this DPI.
-
getImposedInitialPage
Get the imposed initial page if a new editor will be opened.- Returns:
- the imposed initial page
-
setImposedInitialPage
Set the imposed initial page in which to open the DPI for a new editor.- Parameters:
imposedInitialPage- The imposed initial page.
-
getAnchor
public ro.sync.exml.editor.Anchor getAnchor()Get the error anchor if any.- Returns:
- the error anchor if any.
-
setAnchor
public void setAnchor(ro.sync.exml.editor.Anchor anchor) Set the error anchor.- Parameters:
anchor- The anchor to set.
-
getMatchRange
public int[] getMatchRange()Get the match range if any.- Returns:
- The match range if possible.
-
setMatchRange
public void setMatchRange(int[] matchRange) Set the match range.- Parameters:
matchRange- The match range.
-
getMessageHighlightOffset
public int getMessageHighlightOffset()Return the offset used to highlight the match inside the message in the results panel.- Returns:
- the message highlight offset.
-
setMessageHighlightOffset
public void setMessageHighlightOffset(int messageHighlightOffset) Set the offset used to highlight the match inside the message in the results panel.- Parameters:
messageHighlightOffset- The offset to be set.
-
setOperationDescription
public void setOperationDescription(ro.sync.document.OperationDescription operationDescription) Sets the description of an operation (that is an operation which is applied over multiple resources) that generated this DPI. Can benull.- Parameters:
operationDescription- the description of an operation (that is an operation which is applied over multiple resources) that generated this DPI. Can benull.
-
getOperationDescription
public ro.sync.document.OperationDescription getOperationDescription()The description of an operation (that is an operation which is applied over multiple resources) that generated this DPI. Can benull.- Returns:
- the description of an operation (that is an operation which is applied over multiple resources)
that generated this DPI. Can be
null.
-
getDITAAdditionalInfo
public ro.sync.document.DITAAdditionalInfo getDITAAdditionalInfo()Additional info about DITA completeness check.- Returns:
- Returns additional info.
-
setDITAAdditionalInfo
public void setDITAAdditionalInfo(ro.sync.document.DITAAdditionalInfo additionalInfo) Additional info about DITA completeness check.- Parameters:
additionalInfo- Additional info about DITA completeness check.
-
getECAdditionalInfo
public ro.sync.document.ECAdditionalInfo getECAdditionalInfo()Additional info for Eclipse inner usage.- Returns:
- Returns additional info.
-
setECAdditionalInfo
public void setECAdditionalInfo(ro.sync.document.ECAdditionalInfo additionalInfo) Additional info for Eclipse inner usage.- Parameters:
additionalInfo- Additional info for Elipse inner usage.
-
setTemporaryPositions
Set the temporary start and end positions used for keeping the DPI synchronized with the highlight range from the page.- Parameters:
startPosition- The start position.endPosition- The end position. Always exclusive.pageId- The id of the page for which the positions were created, one ofEditorPageConstantsconstants.
-
getStartEndPositions
Get the temporary start and end positions for the current page.- Parameters:
pageId- The id of the page for which we want the positions, one ofEditorPageConstantsconstants.- Returns:
- An arrays with two positions, representing the start and end positions of the DPI. The end position is exclusive.
Can be
nullif the page is closed, or the DPI is not synchronized with the modifications from editor.
-
setStartEndPositionsMap
Set a new temporary positions map.- Parameters:
startEndPositionsMap- The temporary positions map.
-
asHTML
Build the HTML representation of this DPI.- Returns:
- The HTML representation of this DPI.
-
asHTML
public String asHTML(boolean includeSeverity, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Build the HTML representation of this DPI.- Parameters:
includeSeverity-trueif severity details should be included.includeAdditionalInfo-trueif additional info details should be included.includeDescription-trueif description details should be included.includeSystemID-trueif system ID details should be included.includeLocation-trueif location details should be included.includeOperationDescription-trueif operation description details should be included.- Returns:
- The HTML representation of this DPI.
-
asHTML
public String asHTML(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription) Builds the HTML representation of this DPI.- Parameters:
includeSeverity-trueif severity details should be included.includeErrorCode-trueif error code should be included.includeAdditionalInfo-trueif additional info details should be included.includeDescription-trueif description details should be included.includeSystemID-trueif system ID details should be included.includeLocation-trueif location details should be included.includeOperationDescription-trueif operation description details should be included.- Returns:
- The HTML representation of this DPI.
-
asHTML
public String asHTML(boolean includeSeverity, boolean includeErrorCode, boolean includeAdditionalInfo, boolean includeDescription, boolean includeSystemID, boolean includeLocation, boolean includeOperationDescription, boolean asCompleteHTMLDocument) Build the HTML representation of this DPI.- Parameters:
includeSeverity-trueif severity details should be included.includeErrorCode-trueif error code should be included.includeAdditionalInfo-trueif additional info details should be included.includeDescription-trueif description details should be included.includeSystemID-trueif system ID details should be included.includeLocation-trueif location details should be included.includeOperationDescription-trueif operation description details should be included.asCompleteHTMLDocument-truefor a complete valid HTML document representation, including style section. The title of the HTML document is "Message". Iffalse, then the HTML representation only consists of a 'table' inside a 'div' section, and no styling at all.- Returns:
- The HTML representation of this DPI.
-
getAdditionalHtmlContent
Return the additional HTML content, if any.- Returns:
- the additional HTML content, if any.
-
setHtmlMessageFragment
Set a special HTML fragment which needs to be presented instead of the message when the DPI is serialized to HTML.- Parameters:
htmlMessageFragment- The fragment to set.
-
setErrorKey
The error validation key.- Parameters:
errorKey- The error key.
-
getErrorKey
Get the error key.- Returns:
- Returns the error key.
-
isElementTarget
public boolean isElementTarget()Returntrueif this DPI targets an XML element.- Returns:
trueif this DPI targets an XML element.
-
setElementTarget
public void setElementTarget(boolean isElementTarget) Settrueif this DPI targets an XML element.- Parameters:
isElementTarget-trueif this DPI targets an XML element.
-