public OperationNotSupportedException(final String operation) { super(OwsExceptionCode.OperationNotSupported); at(operation).withMessage("The requested operation '%s' is not supported by this service!", operation); } }
protected void handleHibernateException(HibernateException he) throws OwsExceptionReport { HTTPStatus status = HTTPStatus.INTERNAL_SERVER_ERROR; throw new NoApplicableCodeException().causedBy(he).withMessage("Error while deleting result templates!") .setStatus(status); }
public MissingParameterValueException(final String parameter) { super(OwsExceptionCode.MissingParameterValue); at(parameter).withMessage("The value for the parameter '%s' is missing in the request!", parameter); setStatus(HTTPStatus.BAD_REQUEST); }
private static OwsExceptionReport duplicateOutput(OwsCode id) { return new InvalidParameterValueException().at(OUTPUT).withMessage("Duplicate output definition for output %s", id); }
public static Session getSession(Object connection) throws OwsExceptionReport { if (connection == null) { throw new NoApplicableCodeException().withMessage("The parameter connection is null!"); } if (!(connection instanceof Session)) { throw new NoApplicableCodeException().withMessage("The parameter connection is not an Hibernate Session!"); } return (Session) connection; } }
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); }
/** * @return <tt>true</tt>, if a HTTP response code for this * {@code OwsExceptionReport} or any sub exception is available */ public final boolean hasStatus() { return getStatus() != null; }
public void throwIfNotEmpty() throws CompositeOwsException { if (hasExceptions()) { throw this; } }
public MissingParameterValueException() { super(OwsExceptionCode.MissingParameterValue); setStatus(HTTPStatus.BAD_REQUEST); } }
@SuppressWarnings("ThrowableResultIgnored") public VersionNegotiationFailedException() { super(OwsExceptionCode.VersionNegotiationFailed); setStatus(HTTPStatus.BAD_REQUEST); } }
public InvalidUpdateSequenceException() { super(OwsExceptionCode.InvalidUpdateSequence); setStatus(HTTPStatus.BAD_REQUEST); } }
public OptionNotSupportedException() { super(OwsExceptionCode.OptionNotSupported); setStatus(HTTPStatus.BAD_REQUEST); } }
protected void handleHibernateException(HibernateException he) throws OwsExceptionReport { HTTPStatus status = HTTPStatus.INTERNAL_SERVER_ERROR; String exceptionMsg = "Error while inserting new featureOfInterest!"; throw new NoApplicableCodeException().causedBy(he).withMessage(exceptionMsg).setStatus(status); }
public MissingParameterValueException(final String parameter) { super(OwsExceptionCode.MissingParameterValue); at(parameter).withMessage("The value for the parameter '%s' is missing in the request!", parameter); setStatus(HTTPStatus.BAD_REQUEST); }
public OperationNotSupportedException(final String operation) { super(OwsExceptionCode.OperationNotSupported); at(operation).withMessage("The requested operation '%s' is not supported by this service!", operation); } }
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); }
/** * @return <tt>true</tt>, if a HTTP response code for this * {@code OwsExceptionReport} or any sub exception is available */ public final boolean hasStatus() { return getStatus() != null; }
public MissingParameterValueException() { super(OwsExceptionCode.MissingParameterValue); setStatus(HTTPStatus.BAD_REQUEST); } }
protected void handleHibernateException(HibernateException he) throws OwsExceptionReport { HTTPStatus status = HTTPStatus.INTERNAL_SERVER_ERROR; String exceptionMsg = "Error while inserting new featureOfInterest!"; throw new NoApplicableCodeException().causedBy(he).withMessage(exceptionMsg).setStatus(status); }
protected void handleHibernateException(HibernateException he) throws OwsExceptionReport { HTTPStatus status = HTTPStatus.INTERNAL_SERVER_ERROR; throw new NoApplicableCodeException().causedBy(he).withMessage("Error while deleting result templates!") .setStatus(status); }