Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.web.jcr.rest.client
Class Status

    java.lang.Object
      org.modeshape.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.

Constructor Summary
`Status(Status.Severity severity, String message, Throwable exception)`

Method Summary
`Throwable` | `getException()`
`String` | `getMessage()`
`Status.Severity` | `getSeverity()`
`boolean` | `isError()`
`boolean` | `isInfo()`
`boolean` | `isOk()`
`boolean` | `isUnknown()`
`boolean` | `isWarning()`
`String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### 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`

Constructor Detail

### 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`

Method Detail

### 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()`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2011 JBoss, a division of Red Hat. All Rights Reserved.