com.softwareag.mdm.base.text
Class Severity

java.lang.Object
  extended bycom.softwareag.mdm.base.text.Severity

public final class Severity
extends Object

This enumeration class defines the severities that a user message may have.

See Also:
UserMessage

Field Summary
static Severity ERROR
           
static Severity FATAL
           
static Severity INFO
           
static Severity WARNING
           
 
Method Summary
 String getLabel()
           
 boolean isEqualOrMoreSevereThan(Severity anotherSeverity)
          Returns true if this severity is more severe than the one specified or the same.
 boolean isError()
           
 boolean isFatal()
           
 boolean isInfo()
           
 boolean isWarning()
           
static Severity parseFlag(String aFlag)
          Returns the severity instance corresponding to the flag specified.
 String toParsableString()
          Returns a flag identifying the severity.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FATAL

public static final Severity FATAL

ERROR

public static final Severity ERROR

WARNING

public static final Severity WARNING

INFO

public static final Severity INFO
Method Detail

parseFlag

public static Severity parseFlag(String aFlag)
                          throws IllegalArgumentException
Returns the severity instance corresponding to the flag specified. The flag should have been generated by method toParsableString().

Throws:
IllegalArgumentException - if aFlag has not the format expected or it is not recognized.

getLabel

public String getLabel()

toParsableString

public String toParsableString()
Returns a flag identifying the severity. The returned string is converted back to a Severity instance by method parseFlag(String).


toString

public String toString()

isFatal

public boolean isFatal()

isError

public boolean isError()

isWarning

public boolean isWarning()

isInfo

public boolean isInfo()

isEqualOrMoreSevereThan

public boolean isEqualOrMoreSevereThan(Severity anotherSeverity)
Returns true if this severity is more severe than the one specified or the same.

The following order is guaranteed:

FATAL > ERROR > WARNING > INFO



(report a bug)
webMethods MDM 4.2.8 [0558]
Copyright Software AG 2000-2007. All rights reserved.