org.jboss.dna.web.jcr.rest.client
Class Status
java.lang.Object
org.jboss.dna.web.jcr.rest.client.Status
@Immutable
public final class Status
- extends Object
The Status class is an outcome that provides an outcome or result of an operation.
|
Nested Class Summary |
static class |
Status.Severity
The status severity levels. |
|
Field Summary |
static Status |
OK_STATUS
A status with an OK severity and no message and no exception. |
OK_STATUS
public static final Status OK_STATUS
- A status with an OK severity and no message and no exception.
- See Also:
Status.Severity.OK
Status
public Status(Status.Severity severity,
String message,
Throwable exception)
- Parameters:
severity - the status severity (if null it will be converted to Status.Severity.UNKNOWN.message - the status message (if null it will be returned as an empty string)exception - the status exception or null
getException
public Throwable getException()
- Returns:
- the status exception (may be
null)
getMessage
public String getMessage()
- Returns:
- the status message (never
null but can be empty)
getSeverity
public Status.Severity getSeverity()
- Returns:
- severity the status severity (never
null)
isError
public boolean isError()
- Returns:
true if the status has a severity of error.
isInfo
public boolean isInfo()
- Returns:
true if the status has a severity of info.
isOk
public boolean isOk()
- Returns:
true if the status has a severity of OK.
isUnknown
public boolean isUnknown()
- Returns:
true if the status has a severity of unknown.
isWarning
public boolean isWarning()
- Returns:
true if the status has a severity of warning.
toString
public String toString()
-
- Overrides:
toString in class Object
- See Also:
Object.toString()
Copyright © 2008-2010 JBoss, a division of Red Hat. All Rights Reserved.