Package com.luciad.ogc.common
Class TLcdOGCServiceException
java.lang.Object
java.lang.Throwable
java.lang.Exception
com.luciad.ogc.common.TLcdOGCServiceException
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
TLcdCSWServiceException
,TLcdWCSServiceException
,TLcdWFSServiceException
Base class for OGC service exceptions.
This class can hold multiple TLcdOWSException
instances,
that each represent a subset or part of this service exception.
At least one TLcdOWSException
is required, initialized through one of the constructors.
Additional exceptions can be added through addException(com.luciad.ogc.ows.model.TLcdOWSException)
and addException(String, int, String)
. The list of exceptions can be retrieved through
getExceptions()
.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The user needs to be authenticated to access a resource.static final String
The user needs to be authenticated to access a resource.static final int
static final String
static final int
The user has specified an Update Sequence value equal to the current Update Sequence value defined in the server's capabilities.static final int
static final String
static final int
The user has specified an invalid Update Sequence value; for example, a value that is newer than the current Update Sequence value defined in the server's capabilities.static final int
The user is not authorized to access a resource.static final String
The user is not authorized to access a resource.static final int
static final String
static final int
static final String
-
Constructor Summary
ConstructorDescriptionTLcdOGCServiceException
(int aCode) Constructor with an error code.TLcdOGCServiceException
(TLcdOWSException aException, String aServiceVersion, String aServiceName) Constructor with an OWS exception.TLcdOGCServiceException
(String aMessage, int aCode) Constructor with an error message and code.TLcdOGCServiceException
(String aMessage, int aCode, String aLocator) Constructor with an error message, code and locator.TLcdOGCServiceException
(String aMessage, int aCode, String aLocator, String aServiceVersion, String aServiceName) Constructor with an error message, code, locator and service information. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addException
(TLcdOWSException aException) Adds the given OWS exception.void
addException
(String aMessage, int aCode, String aLocator) Adds an exception with the given message, code and locator.int
getCode()
Returns the error code of the first exception.getCodeAsAString
(int aCode) Returns a string describing the given error code.Returns a list of exceptions.Returns the locator of the first exception, if initialized.Returns the error message of the first exception, if initialized.Returns the MIME type to be set when sending exception reports to a client.Returns the service name generated this exception.Returns the version of the service that generated this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Field Details
-
UNKNOWN_REQUEST
public static final int UNKNOWN_REQUEST- See Also:
-
REQUEST_XML_ERROR
public static final int REQUEST_XML_ERROR- See Also:
-
INVALID_REQUEST
public static final int INVALID_REQUEST- See Also:
-
CONFIG_ERROR
public static final int CONFIG_ERROR- See Also:
-
CURRENT_UPDATE_SEQUENCE
public static final int CURRENT_UPDATE_SEQUENCEThe user has specified an Update Sequence value equal to the current Update Sequence value defined in the server's capabilities.- Since:
- 2024.0
- See Also:
-
INVALID_UPDATE_SEQUENCE
public static final int INVALID_UPDATE_SEQUENCEThe user has specified an invalid Update Sequence value; for example, a value that is newer than the current Update Sequence value defined in the server's capabilities.- Since:
- 2024.0
- See Also:
-
NOT_AUTHORIZED
public static final int NOT_AUTHORIZEDThe user is not authorized to access a resource.- Since:
- 2017.0
- See Also:
-
AUTHENTICATION_REQUIRED
public static final int AUTHENTICATION_REQUIREDThe user needs to be authenticated to access a resource.- Since:
- 2017.0
- See Also:
-
UNKNOWN_REQUEST_STR
- See Also:
-
REQUEST_XML_ERROR_STR
- See Also:
-
INVALID_REQUEST_STR
- See Also:
-
CONFIG_ERROR_STR
- See Also:
-
NOT_AUTHORIZED_STR
The user is not authorized to access a resource.- Since:
- 2017.0
- See Also:
-
AUTHENTICATION_REQUIRED_STR
The user needs to be authenticated to access a resource.- Since:
- 2017.0
- See Also:
-
-
Constructor Details
-
TLcdOGCServiceException
public TLcdOGCServiceException(int aCode) Constructor with an error code. The given exception information is converted to aTLcdOWSException
and added to the list of exceptions. This list can be retrieved throughgetExceptions()
.- Parameters:
aCode
- the exception's error code.
-
TLcdOGCServiceException
Constructor with an error message and code. The given exception information is converted to aTLcdOWSException
and added to the list of exceptions. This list can be retrieved throughgetExceptions()
.- Parameters:
aMessage
- the error messageaCode
- the exception's error code.
-
TLcdOGCServiceException
Constructor with an error message, code and locator. The given exception information is converted to aTLcdOWSException
and added to the list of exceptions. This list can be retrieved throughgetExceptions()
.- Parameters:
aMessage
- the error messageaCode
- the exception's error code.aLocator
- the location of the error in the client request
-
TLcdOGCServiceException
public TLcdOGCServiceException(String aMessage, int aCode, String aLocator, String aServiceVersion, String aServiceName) Constructor with an error message, code, locator and service information. The given exception information is converted to aTLcdOWSException
and added to the list of exceptions. This list can be retrieved throughgetExceptions()
.- Parameters:
aMessage
- the error messageaCode
- the exception's error code.aLocator
- the location of the error in the client requestaServiceVersion
- the version of the service that generated the exception.aServiceName
- the name of the service that generated the exception.
-
TLcdOGCServiceException
public TLcdOGCServiceException(TLcdOWSException aException, String aServiceVersion, String aServiceName) Constructor with an OWS exception.- Parameters:
aException
- an OWS exception.aServiceVersion
- the version of the service that generated the exception.aServiceName
- the name of the service that generated the exception.
-
-
Method Details
-
addException
Adds an exception with the given message, code and locator. This exception is converted to aTLcdOWSException
, and can be retrieved throughgetExceptions()
.- Parameters:
aMessage
- the optional error message.aCode
- the mandatory exception's error code.aLocator
- the location of the error in the client request, ornull
if this information is not available.
-
addException
Adds the given OWS exception.- Parameters:
aException
- the exception to be added.
-
getExceptions
Returns a list of exceptions.- Returns:
- a list of exceptions.
-
getMessage
Returns the error message of the first exception, if initialized.- Overrides:
getMessage
in classThrowable
- Returns:
- the error message of the first exception, if initialized;
null
otherwise.
-
getCode
public int getCode()Returns the error code of the first exception.- Returns:
- the exception's error code.
-
getLocator
Returns the locator of the first exception, if initialized.- Returns:
- the locator of the first exception, if initialized;
null
otherwise.
-
getServiceName
Returns the service name generated this exception.- Returns:
- the service name generated this exception,
or
null
if no service name is available.
-
getServiceVersion
Returns the version of the service that generated this exception.- Returns:
- the version of the service that generated this exception,
or
null
if no version information is available.
-
getCodeAsAString
Returns a string describing the given error code.- Parameters:
aCode
- the exception's error code- Returns:
- a string describing the given error code.
-
getMimeType
Returns the MIME type to be set when sending exception reports to a client.- Returns:
- the MIME type to be set when sending exception reports to a client.
-