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

public class TLcdOGCServiceException extends Exception
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 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_SEQUENCE
      The 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_SEQUENCE
      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.
      Since:
      2024.0
      See Also:
    • NOT_AUTHORIZED

      public static final int NOT_AUTHORIZED
      The user is not authorized to access a resource.
      Since:
      2017.0
      See Also:
    • AUTHENTICATION_REQUIRED

      public static final int AUTHENTICATION_REQUIRED
      The user needs to be authenticated to access a resource.
      Since:
      2017.0
      See Also:
    • UNKNOWN_REQUEST_STR

      public static final String UNKNOWN_REQUEST_STR
      See Also:
    • REQUEST_XML_ERROR_STR

      public static final String REQUEST_XML_ERROR_STR
      See Also:
    • INVALID_REQUEST_STR

      public static final String INVALID_REQUEST_STR
      See Also:
    • CONFIG_ERROR_STR

      public static final String CONFIG_ERROR_STR
      See Also:
    • NOT_AUTHORIZED_STR

      public static final String NOT_AUTHORIZED_STR
      The user is not authorized to access a resource.
      Since:
      2017.0
      See Also:
    • AUTHENTICATION_REQUIRED_STR

      public static final String 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 a TLcdOWSException and added to the list of exceptions. This list can be retrieved through getExceptions().

      Parameters:
      aCode - the exception's error code.
    • TLcdOGCServiceException

      public TLcdOGCServiceException(String aMessage, int aCode)
      Constructor with an error message and code.

      The given exception information is converted to a TLcdOWSException and added to the list of exceptions. This list can be retrieved through getExceptions().

      Parameters:
      aMessage - the error message
      aCode - the exception's error code.
    • TLcdOGCServiceException

      public TLcdOGCServiceException(String aMessage, int aCode, String aLocator)
      Constructor with an error message, code and locator.

      The given exception information is converted to a TLcdOWSException and added to the list of exceptions. This list can be retrieved through getExceptions().

      Parameters:
      aMessage - the error message
      aCode - 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 a TLcdOWSException and added to the list of exceptions. This list can be retrieved through getExceptions().

      Parameters:
      aMessage - the error message
      aCode - the exception's error code.
      aLocator - the location of the error in the client request
      aServiceVersion - 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

      public void addException(String aMessage, int aCode, String aLocator)
      Adds an exception with the given message, code and locator.

      This exception is converted to a TLcdOWSException, and can be retrieved through getExceptions().

      Parameters:
      aMessage - the optional error message.
      aCode - the mandatory exception's error code.
      aLocator - the location of the error in the client request, or null if this information is not available.
    • addException

      public void addException(TLcdOWSException aException)
      Adds the given OWS exception.
      Parameters:
      aException - the exception to be added.
    • getExceptions

      public List<TLcdOWSException> getExceptions()
      Returns a list of exceptions.
      Returns:
      a list of exceptions.
    • getMessage

      public String getMessage()
      Returns the error message of the first exception, if initialized.
      Overrides:
      getMessage in class Throwable
      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

      public String getLocator()
      Returns the locator of the first exception, if initialized.
      Returns:
      the locator of the first exception, if initialized; null otherwise.
    • getServiceName

      public String getServiceName()
      Returns the service name generated this exception.
      Returns:
      the service name generated this exception, or null if no service name is available.
    • getServiceVersion

      public String 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

      public String getCodeAsAString(int aCode)
      Returns a string describing the given error code.
      Parameters:
      aCode - the exception's error code
      Returns:
      a string describing the given error code.
    • getMimeType

      public String 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.