Tabnine Logo
InvalidParameterValueException.withMessage
Code IndexAdd Tabnine to your IDE (free)

How to use
withMessage
method
in
org.n52.shetland.ogc.ows.exception.InvalidParameterValueException

Best Java code snippets using org.n52.shetland.ogc.ows.exception.InvalidParameterValueException.withMessage (Showing top 11 results out of 315)

origin: 52North/SOS

protected void checkReservedCharacter(String value, String parameterName) throws OwsExceptionReport {
  if (value != null && value.contains(",")) {
    throw new InvalidParameterValueException(parameterName, value)
        .withMessage("The value '%s' contains the reserved parameter ','", value);
  }
}
origin: org.n52.arctic-sea/shetland

public InvalidParameterValueException(final String parameterName, final String value) {
  super(OwsExceptionCode.InvalidParameterValue);
  withMessage("The value '%s' of the parameter '%s' is invalid", value, parameterName).at(parameterName);
  setStatus(HTTPStatus.BAD_REQUEST);
}
origin: org.n52.shetland/shetland

public InvalidParameterValueException(final String parameterName, final String value) {
  super(OwsExceptionCode.InvalidParameterValue);
  withMessage("The value '%s' of the parameter '%s' is invalid", value, parameterName).at(parameterName);
  setStatus(HTTPStatus.BAD_REQUEST);
}
origin: org.n52.iceland/iceland

  private OwsExceptionReport toOwsExceptionReport(Throwable ex) {
    if (ex instanceof OwsExceptionReport) {
      return (OwsExceptionReport) ex;
    }

    Throwable cause = ex.getCause();

    if (cause instanceof OwsExceptionReport) {
      return (OwsExceptionReport) cause;
    }

    if (ex instanceof CompositeException) {
      return toOwsExceptionReport((CompositeException) ex);
    }

    if (cause instanceof CompositeException) {
      return toOwsExceptionReport((CompositeException) cause);
    }

    String location = null;
    if (ex instanceof LocationHintException) {
      location = ((LocationHintException) ex).getLocation().orElse(null);
    } else if (cause instanceof LocationHintException) {
      location = ((LocationHintException) cause).getLocation().orElse(null);
    }

    return new InvalidParameterValueException().withMessage(ex.getMessage()).causedBy(ex).at(location);
  }
}
origin: org.n52.iceland/iceland

if (service.isPresent()) {
  throw new InvalidParameterValueException(OWSConstants.GetCapabilitiesParams.service, service.get())
      .withMessage("The service '%s' is not supported.", service);
} else {
  throw new MissingParameterValueException(OWSConstants.GetCapabilitiesParams.service)
    .withMessage("No decoder found for incoming message " +
           "based on derived decoder key: %s\nMessage: %s", key, xmlString);
origin: 52North/SOS

protected void checkTemporalFilter(TemporalFilter temporalFilter) throws CodedException {
  if (temporalFilter.getTime() instanceof TimePeriod) {
    TimePeriod tp = (TimePeriod) temporalFilter.getTime();
    if (tp.isEmpty()) {
      throw new InvalidParameterValueException(SosConstants.Filter.TimePeriod, tp.toString())
          .withMessage("Begin/end time is missing!");
    }
    if (tp.getStart().isEqual(tp.getEnd())) {
      throw new InvalidParameterValueException(SosConstants.Filter.TimePeriod, tp.toString()).withMessage(
          "It is not allowed that begin and end time are equal! Begin '%s' == End '%s'", tp.getStart(),
          tp.getEnd());
    }
    if (tp.getStart().isAfter(tp.getEnd())) {
      throw new InvalidParameterValueException(SosConstants.Filter.TimePeriod, tp.toString()).withMessage(
          "It is not allowed that begin time is after end time! Begin '%s' > End '%s'", tp.getStart(),
          tp.getEnd());
    }
  }
}
origin: org.n52.iceland/iceland

/**
 * Parse and decode the incoming EXI encoded {@link InputStream}
 *
 * @param request
 *            {@link HttpServletRequest} with EXI encoded
 *            {@link InputStream}
 * @return {@link OwsServiceRequest} from EXI encoded {@link InputStream}
 * @throws OwsExceptionReport
 *             If an error occurs during parsing
 */
protected OwsServiceRequest parseRequest(HttpServletRequest request)
    throws OwsExceptionReport {
  XmlObject doc = decode(request);
  if (LOGGER.isDebugEnabled()) {
    LOGGER.debug("EXI-REQUEST: {}", doc.xmlText());
  }
  Decoder<OwsServiceRequest, XmlObject> decoder = getDecoder(CodingHelper.getDecoderKey(doc));
  try {
    return decoder.decode(doc).setRequestContext(getRequestContext(request));
  } catch (OwsDecodingException ex) {
    throw ex.getCause();
  } catch (DecodingException ex) {
    throw new InvalidParameterValueException().withMessage(ex.getMessage()).causedBy(ex)
        .at(ex.getLocation().orElse(null));
  }
}
origin: org.n52.sensorweb.sos/hibernate-common

offerings.add(dataset.getOffering());
if (!daos.dataset().checkObservationType(dataset, observationType, session)) {
  throw new InvalidParameterValueException().withMessage(
      "The requested observationType (%s) is invalid for procedure = %s, observedProperty = %s and offering = %s! The valid observationType is '%s'!",
      observationType, observation.getDataset().getProcedure().getIdentifier(),
origin: 52North/SOS

offerings.add(dataset.getOffering());
if (!daos.dataset().checkObservationType(dataset, observationType, session)) {
  throw new InvalidParameterValueException().withMessage(
      "The requested observationType (%s) is invalid for procedure = %s, observedProperty = %s and offering = %s! The valid observationType is '%s'!",
      observationType, observation.getDataset().getProcedure().getIdentifier(),
origin: org.n52.sensorweb.sos/core-v20

      request.getService(), request.getVersion())
  .contains(request.getResponseFormat())) {
throw new InvalidParameterValueException().withMessage(
    "The requested resultType {} is not valid for the responseFormat {}!",
    request.getResultModel(), request.getResponseFormat());
origin: 52North/SOS

      request.getService(), request.getVersion())
  .contains(request.getResponseFormat())) {
throw new InvalidParameterValueException().withMessage(
    "The requested resultType {} is not valid for the responseFormat {}!",
    request.getResultModel(), request.getResponseFormat());
org.n52.shetland.ogc.ows.exceptionInvalidParameterValueExceptionwithMessage

Popular methods of InvalidParameterValueException

  • <init>
  • at
  • causedBy
  • setStatus

Popular in Java

  • Making http post requests using okhttp
  • setRequestProperty (URLConnection)
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • Menu (java.awt)
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now