COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification

org.eclipse.cosmos.rm.validation.internal.common
Class AbstractValidationOutput.ValidationMessage

java.lang.Object
  extended by org.eclipse.cosmos.rm.validation.internal.common.AbstractValidationOutput.ValidationMessage
All Implemented Interfaces:
IValidationMessage
Enclosing class:
AbstractValidationOutput

public static class AbstractValidationOutput.ValidationMessage
extends java.lang.Object
implements IValidationMessage

Represents a verification message, which is simply described as a set of unstructured attributes.


Field Summary
static java.lang.String ATTRIBUTE_LINE_NUMBER
          An integer indicating the line number associated with this message
static java.lang.String ATTRIBUTE_MESSAGE
          The message attribute.
static java.lang.String ATTRIBUTE_RESOURCE
          An object of type IResource indicating the resource associated with this message
static java.lang.String ATTRIBUTE_SEVERITY
          The severity attribute.
static int NO_LINE_NUMBER
          Value indicating no line number has been supplied to the validation message
static int SEVERITY_ERROR
          Indicates a severity of error
static int SEVERITY_INFO
          Indicates a severity of info
static int SEVERITY_WARNING
          Indicates a severity of warning
 
Fields inherited from interface org.eclipse.cosmos.rm.validation.internal.common.IValidationMessage
ATTRIBUTE_COLUMN_NUMBER
 
Constructor Summary
AbstractValidationOutput.ValidationMessage()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.Object getAttribute(java.lang.String key)
          Retrieve an object attribute
 boolean getAttribute(java.lang.String key, boolean defaultValue)
          Retrieve a boolean attribute
 int getAttribute(java.lang.String key, int defaultValue)
          Retrieve an integer attribute
 java.lang.String getAttribute(java.lang.String key, java.lang.String defaultValue)
          Retrieve a string attribute
 int hashCode()
           
 void setAttribute(java.lang.String key, boolean value)
          Set a boolean attribute
 void setAttribute(java.lang.String key, int value)
          Set an integer attribute
 void setAttribute(java.lang.String key, java.lang.Object value)
          Set an object attribute
 void setAttribute(java.lang.String key, java.lang.String value)
          Set a string attribute
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SEVERITY_INFO

public static final int SEVERITY_INFO
Indicates a severity of info

See Also:
Constant Field Values

SEVERITY_WARNING

public static final int SEVERITY_WARNING
Indicates a severity of warning

See Also:
Constant Field Values

SEVERITY_ERROR

public static final int SEVERITY_ERROR
Indicates a severity of error

See Also:
Constant Field Values

ATTRIBUTE_MESSAGE

public static final java.lang.String ATTRIBUTE_MESSAGE
The message attribute. The value of this attribue is expected to be a String

See Also:
Constant Field Values

ATTRIBUTE_SEVERITY

public static final java.lang.String ATTRIBUTE_SEVERITY
The severity attribute. The value of this attribute is expected to be one of:
SEVERITY_INFO
SEVERITY_WARNING
SEVERITY_ERROR

See Also:
Constant Field Values

ATTRIBUTE_RESOURCE

public static final java.lang.String ATTRIBUTE_RESOURCE
An object of type IResource indicating the resource associated with this message

See Also:
Constant Field Values

ATTRIBUTE_LINE_NUMBER

public static final java.lang.String ATTRIBUTE_LINE_NUMBER
An integer indicating the line number associated with this message

See Also:
Constant Field Values

NO_LINE_NUMBER

public static final int NO_LINE_NUMBER
Value indicating no line number has been supplied to the validation message

See Also:
Constant Field Values
Constructor Detail

AbstractValidationOutput.ValidationMessage

public AbstractValidationOutput.ValidationMessage()
Method Detail

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.String value)
Set a string attribute

Specified by:
setAttribute in interface IValidationMessage
Parameters:
key - The key
value - The value

setAttribute

public void setAttribute(java.lang.String key,
                         int value)
Set an integer attribute

Specified by:
setAttribute in interface IValidationMessage
Parameters:
key - The key
value - The value

setAttribute

public void setAttribute(java.lang.String key,
                         boolean value)
Set a boolean attribute

Specified by:
setAttribute in interface IValidationMessage
Parameters:
key - The key
value - The value

setAttribute

public void setAttribute(java.lang.String key,
                         java.lang.Object value)
Set an object attribute

Specified by:
setAttribute in interface IValidationMessage
Parameters:
key - The key
value - The value

getAttribute

public int getAttribute(java.lang.String key,
                        int defaultValue)
Retrieve an integer attribute

Specified by:
getAttribute in interface IValidationMessage
Parameters:
key - The key
defaultValue - The default value

getAttribute

public boolean getAttribute(java.lang.String key,
                            boolean defaultValue)
Retrieve a boolean attribute

Specified by:
getAttribute in interface IValidationMessage
Parameters:
key - The key
defaultValue - The default value

getAttribute

public java.lang.String getAttribute(java.lang.String key,
                                     java.lang.String defaultValue)
Retrieve a string attribute

Specified by:
getAttribute in interface IValidationMessage
Parameters:
key - The key
defaultValue - The default value

getAttribute

public java.lang.Object getAttribute(java.lang.String key)
Retrieve an object attribute

Specified by:
getAttribute in interface IValidationMessage
Parameters:
key - The key

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

COSMOS ${releaseVersion} resource-modeling Project
Internal API Specification