org.eclipse.emf.validation.model
Class ConstraintSeverity

java.lang.Object
  extended by org.eclipse.emf.validation.model.ConstraintSeverity
All Implemented Interfaces:
Serializable

public final class ConstraintSeverity
extends Object
implements Serializable

Describes the severity of failure to meet a constraint. See the individual value descriptions for details. The values correspond one-to-one with the Eclipse IStatus severity constants.

See Also:
IStatus, IModelConstraint, Serialized Form

Field Summary
static ConstraintSeverity CANCEL
          Indicates that failure of the constraint constitutes an error condition that should cancel the validation operation (no further constraints are evaluated).
static ConstraintSeverity ERROR
          Indicates that failure of the constraint constitutes an error condition.
static ConstraintSeverity INFO
          Indicates that failure of the constraint should only generate an informational message to the user.
static ConstraintSeverity NULL
          This special value is a pointer-safe null value according to the Null Object pattern.
static ConstraintSeverity WARNING
          Indicates that failure of the constraint constitutes a warning condition.
 
Method Summary
static List getAllInstances()
          Obtains all values of the enumeration.
static ConstraintSeverity getInstance(String name)
          Obtains the named instance.
 String getLocalizedName()
          Obtains my localized (user-friendly) name.
 String getName()
          Obtains my symbolic name.
 boolean isNull()
          Queries whether I am the Null Object of this enumeration.
 int toIStatusSeverity()
          Converts me to the Eclipse IStatus severity code.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

INFO

public static final ConstraintSeverity INFO
Indicates that failure of the constraint should only generate an informational message to the user.


WARNING

public static final ConstraintSeverity WARNING
Indicates that failure of the constraint constitutes a warning condition.


ERROR

public static final ConstraintSeverity ERROR
Indicates that failure of the constraint constitutes an error condition.


CANCEL

public static final ConstraintSeverity CANCEL
Indicates that failure of the constraint constitutes an error condition that should cancel the validation operation (no further constraints are evaluated).


NULL

public static final ConstraintSeverity NULL
This special value is a pointer-safe null value according to the Null Object pattern. It is not a valid severity for a constraint.

Method Detail

getInstance

public static ConstraintSeverity getInstance(String name)
Obtains the named instance.

Parameters:
name - the name to retrieve (not case-sensitive)
Returns:
the corresponding instance, or NULL if no matching instance exists

getAllInstances

public static final List getAllInstances()
Obtains all values of the enumeration.

Returns:
all values

getName

public final String getName()
Obtains my symbolic name.

Returns:
my name
See Also:
getInstance(java.lang.String)

getLocalizedName

public final String getLocalizedName()
Obtains my localized (user-friendly) name.

Returns:
a name suitable for display to the user
See Also:
getName()

isNull

public boolean isNull()
Queries whether I am the Null Object of this enumeration. In general, null pointers are never used with this type.

Returns:
whether I am the NULL instance

toIStatusSeverity

public int toIStatusSeverity()
Converts me to the Eclipse IStatus severity code.

Returns:
my corresponding Eclipse severity code

toString

public String toString()
Overrides:
toString in class Object

Copyright 2002, 2007 IBM Corporation and others.
All Rights Reserved.