Search in sources :

Example 1 with RequestOperator

use of org.n52.iceland.request.operator.RequestOperator in project arctic-sea by 52North.

the class GenericServiceOperator method receiveRequest.

/**
 * {@inheritDoc}
 *
 * @throws OperationNotSupportedException if no matching
 *                                        {@link RequestOperator} could be
 *                                        found or if the operator returned
 *                                        a {@code null}-response.
 */
@Override
public OwsServiceResponse receiveRequest(OwsServiceRequest request) throws OwsExceptionReport {
    String operationName = request.getOperationName();
    RequestOperator operator = this.requestOperatorRepository.getRequestOperator(this.key, operationName);
    if (operator == null) {
        throw new OperationNotSupportedException(operationName);
    }
    OwsServiceResponse response = operator.receiveRequest(request);
    if (response == null) {
        throw new OperationNotSupportedException(operationName);
    }
    return response;
}
Also used : OperationNotSupportedException(org.n52.shetland.ogc.ows.exception.OperationNotSupportedException) RequestOperator(org.n52.iceland.request.operator.RequestOperator) OwsServiceResponse(org.n52.shetland.ogc.ows.service.OwsServiceResponse)

Aggregations

RequestOperator (org.n52.iceland.request.operator.RequestOperator)1 OperationNotSupportedException (org.n52.shetland.ogc.ows.exception.OperationNotSupportedException)1 OwsServiceResponse (org.n52.shetland.ogc.ows.service.OwsServiceResponse)1