org.eclipse.cosmos.rm.validation.internal.common
Class TextOutput
java.lang.Object
org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput
org.eclipse.cosmos.rm.validation.internal.common.TextOutput
- All Implemented Interfaces:
- IValidationOutput
- Direct Known Subclasses:
- FileOutput, SystemOutput
public abstract class TextOutput
- extends AbstractValidationOutput
An abstract class used to format and output a verification message
to an output stream defined by a subclass
|
Method Summary |
java.lang.String |
formatMessage(org.eclipse.core.resources.IResource resource,
int lineNumber,
java.lang.String severity,
java.lang.String validationMsg)
Formats the attributes of a verification message into a message that can
be logged to an output stream |
protected abstract void |
writeMessage(java.lang.String message)
Concrete classes are expected to write the passed in message to
an output stream. |
void |
writeMessageToSource(IValidationMessage validationMessage)
The final method invoked to write the validation message to
the output source. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TextOutput
public TextOutput()
writeMessageToSource
public void writeMessageToSource(IValidationMessage validationMessage)
- Description copied from class:
AbstractValidationOutput
- The final method invoked to write the validation message to
the output source.
- Specified by:
writeMessageToSource in class AbstractValidationOutput
- Parameters:
validationMessage - The validation message- See Also:
org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput#reportMessage(org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput.ValidationMessage)
formatMessage
public java.lang.String formatMessage(org.eclipse.core.resources.IResource resource,
int lineNumber,
java.lang.String severity,
java.lang.String validationMsg)
- Formats the attributes of a verification message into a message that can
be logged to an output stream
- Parameters:
resource - The resource that is associated with the verification message; null if none is availablelineNumber - The line number associated with the message; -1 if none is availableseverity - The string representation of the message's severityvalidationMsg - The message
- Returns:
- A formatted message that can be logged to an output stream
writeMessage
protected abstract void writeMessage(java.lang.String message)
- Concrete classes are expected to write the passed in message to
an output stream.
- Parameters:
message - The message to be written