org.eclipse.wst.validation
Class MessageSeveritySetting
java.lang.Object
org.eclipse.wst.validation.MessageSeveritySetting
-
public class MessageSeveritySetting
- extends java.lang.Object
Associate a message severity with a message category.
Provisional API: This class/interface is part of an interim API that is still under development and expected to
change significantly before reaching stability. It is being made available at this early stage to solicit feedback
from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
(repeatedly) as the API evolves.
Methods inherited from class java.lang.Object
|
equals, getClass, notify, notifyAll, wait, wait, wait
|
MessageSeveritySetting
public MessageSeveritySetting(java.lang.String id,
java.lang.String label,
MessageSeveritySetting.Severity defaultSeverity)
- Create an association between a label and a message severity.
-
Parameters:
-
id
- An id that is used to identify this particular setting. This must be
unique within the scope of this particular validator. -
label
- An end user string, that can describe either an individual message
or a message category. -
defaultSeverity
- The default severity for this label. If the end user doesn't change
anything this is what the severity will be.
hashCode
public int hashCode()
-
-
Overrides:
-
hashCode
in class java.lang.Object
-
getLabel
public java.lang.String getLabel()
-
getDefault
public
MessageSeveritySetting.Severity getDefault()
- Answer the default severity as defined by the validator owner.
-
getCurrent
public
MessageSeveritySetting.Severity getCurrent()
- Answer the current severity for the message. The end user may have changed this through a
preference dialog.
-
getId
public java.lang.String getId()
- The id that the validator owner assigned to the message.
-
setCurrent
public boolean setCurrent(
MessageSeveritySetting.Severity severity)
- Set the current message severity.
-
-
Parameters:
-
severity
-
-
Returns:
- true if the setting changed
toString
public java.lang.String toString()
-
-
Overrides:
-
toString
in class java.lang.Object
-
copy
public
MessageSeveritySetting copy()
- Answer a copy of this object.
-