IStatus.Severity
CANCEL, ERROR, OK, PROP_CREATOR, PROP_FIELD_I18N_KEY, PROP_FIELD_ID, PROP_JAVAX_CONSTRAINT, PROP_JAVAX_LEAF_BEAN, PROP_JAVAX_PROPERTY_PATH, PROP_UI_APPLICATION_ID
Constructor and Description |
---|
Status()
Instantiates a new status.
|
Modifier and Type | Method and Description |
---|---|
boolean |
containsProperty(String key)
Returns true, if a property exists.
|
static IStatus |
createCancelStatus()
Creates an CANCEL status.
|
static IStatus |
createErrorStatus()
Creates an ERROR status.
|
static IStatus |
createErrorStatus(Exception e)
Creates an ERROR status.
|
static IStatus |
createOKStatus()
Creates an OK status.
|
static IStatus |
createStatus(String code,
Class<?> clazz,
IStatus.Severity severity,
Exception exception)
Creates the status.
|
static IStatus |
createStatus(String code,
Class<?> clazz,
IStatus.Severity severity,
String message)
Creates a status for the given parameters.
|
static IStatus |
createStatus(String code,
Class<?> clazz,
IStatus.Severity severity,
String message,
Exception exception)
Creates the status.
|
String |
getBundleSymblicName()
Returns symbolic name of the bundle that has created the status.
|
String |
getCode()
Returns the status code.
|
Exception |
getException()
Returns the exception of the status.
|
String |
getId()
Returns the id of the status.
|
String |
getMessage()
Returns the message of the status.
|
Object |
getProperty(String key)
Returns the value of the property.
|
IStatus.Severity |
getSeverity()
Returns the severity of the status.
|
boolean |
isCancel()
Returns true, if the status is
IStatus.Severity.CANCEL . |
boolean |
isError()
Returns true, if the status is
IStatus.Severity.ERROR . |
boolean |
isInfo()
Returns true, if the status is
IStatus.Severity.INFO . |
boolean |
isOK()
Returns true, if the status is
IStatus.Severity.OK or
IStatus.Severity.INFO . |
boolean |
isWarning()
Returns true, if the status is
IStatus.Severity.WARNING . |
void |
putProperty(String key,
Object value)
Puts a property into the status.
|
public Status()
public static IStatus createOKStatus()
public static IStatus createCancelStatus()
public static IStatus createErrorStatus()
public static IStatus createErrorStatus(Exception e)
e
- - the exceptionpublic static IStatus createStatus(String code, Class<?> clazz, IStatus.Severity severity, String message)
code
- - the unique message code (is unique in a bundle)clazz
- - the class that is contained in the bundle, that specifies
the codeseverity
- - the serverity of the statusmessage
- - the message of the statuspublic static IStatus createStatus(String code, Class<?> clazz, IStatus.Severity severity, String message, Exception exception)
code
- - the unique message code (is unique in a bundle)clazz
- - the class that is contained in the bundle, that specifies
the codeseverity
- - the serverity of the statusmessage
- - the message of the statusexception
- - the thrown exceptionpublic static IStatus createStatus(String code, Class<?> clazz, IStatus.Severity severity, Exception exception)
code
- - the unique message code (is unique in a bundle)clazz
- - the class that is contained in the bundle, that specifies
the codeseverity
- - the serverity of the statusexception
- - the thrown exceptionpublic String getId()
IStatus
{bundleSymbolicName}.{code}
. So every bundle may specify its own codes.public String getCode()
IStatus
public String getBundleSymblicName()
IStatus
getBundleSymblicName
in interface IStatus
public IStatus.Severity getSeverity()
IStatus
getSeverity
in interface IStatus
public String getMessage()
IStatus
null
.getMessage
in interface IStatus
public Exception getException()
IStatus
null
.getException
in interface IStatus
public boolean isOK()
IStatus
IStatus.Severity.OK
or
IStatus.Severity.INFO
.public boolean isInfo()
IStatus
IStatus.Severity.INFO
.public boolean isWarning()
IStatus
IStatus.Severity.WARNING
.public boolean isError()
IStatus
IStatus.Severity.ERROR
.public boolean isCancel()
IStatus
IStatus.Severity.CANCEL
. May be used to
detect a "veto" for a process.public void putProperty(String key, Object value)
IStatus
putProperty
in interface IStatus
key
- the keyvalue
- the valuepublic boolean containsProperty(String key)
IStatus
containsProperty
in interface IStatus
key
- the keypublic Object getProperty(String key)
IStatus
getProperty
in interface IStatus
key
- the keyCopyright © 2013-2016 Loetz GmbH&Co.KG - Heidelberg - Germany, Eclipse OSBP Project, OS.bee