Class OwsExceptionReport
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.n52.shetland.ogc.ows.exception.OwsExceptionReport
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CodedException,CompositeOwsException
public abstract class OwsExceptionReport extends Exception
Implementation of the OWS service exception. The exception codes are defined according the OGC Web Service Common Specification 1.1.0- Since:
- 1.0.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OwsExceptionReport()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract List<? extends CodedException>getExceptions()StringgetMessage()StringgetNamespace()HTTPStatusgetStatus()StringgetVersion()Get service versionbooleanhasStatus()OwsExceptionReportsetStatus(HTTPStatus status)Sets the HTTP response code for thisOwsExceptionReport.OwsExceptionReportsetVersion(String version)Set service version-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Method Detail
-
getExceptions
public abstract List<? extends CodedException> getExceptions()
- Returns:
- Returns the ExceptionTypes of this exception
-
setVersion
public final OwsExceptionReport setVersion(String version)
Set service version- Parameters:
version- the version to set- Returns:
- this
-
getVersion
public final String getVersion()
Get service version- Returns:
- service version
-
getNamespace
public String getNamespace()
-
getMessage
public String getMessage()
- Overrides:
getMessagein classThrowable
-
getStatus
public final HTTPStatus getStatus()
- Returns:
- the HTTP response code of this
OwsExceptionReportor
getExceptions().get(0).getStatus()if it is not set andgetExceptions().get(0) != this.
-
hasStatus
public final boolean hasStatus()
- Returns:
- true, if a HTTP response code for this
OwsExceptionReportor any sub exception is available
-
setStatus
public final OwsExceptionReport setStatus(HTTPStatus status)
Sets the HTTP response code for thisOwsExceptionReport.- Parameters:
status- the code- Returns:
- this (for method chaining)
-
-