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

org.eclipse.cosmos.rm.validation.internal.common
Interface IValidationMessage

All Known Implementing Classes:
AbstractValidationOutput.ValidationMessage

public interface IValidationMessage

A validation message stores the fields of a message in the form of attributes. See the ATTRIBUTE_* constants for more details.


Field Summary
static java.lang.String ATTRIBUTE_COLUMN_NUMBER
          An integer indicating the character location associated with this message
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 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
 
Method Summary
 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
 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
 

Field Detail

SEVERITY_INFO

static final int SEVERITY_INFO
Indicates a severity of info

See Also:
Constant Field Values

SEVERITY_WARNING

static final int SEVERITY_WARNING
Indicates a severity of warning

See Also:
Constant Field Values

SEVERITY_ERROR

static final int SEVERITY_ERROR
Indicates a severity of error

See Also:
Constant Field Values

ATTRIBUTE_MESSAGE

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

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

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

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

See Also:
Constant Field Values

ATTRIBUTE_COLUMN_NUMBER

static final java.lang.String ATTRIBUTE_COLUMN_NUMBER
An integer indicating the character location associated with this message

See Also:
Constant Field Values
Method Detail

setAttribute

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

Parameters:
key - The key
value - The value

setAttribute

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

Parameters:
key - The key
value - The value

setAttribute

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

Parameters:
key - The key
value - The value

setAttribute

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

Parameters:
key - The key
value - The value

getAttribute

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

Parameters:
key - The key
defaultValue - The default value

getAttribute

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

Parameters:
key - The key
defaultValue - The default value

getAttribute

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

Parameters:
key - The key
defaultValue - The default value

getAttribute

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

Parameters:
key - The key

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