public void writeError(ODataServerError error) { try { writeHeader(HttpHeader.CONTENT_TYPE, this.responseContentType.toContentTypeString()); writeContent(this.serializer.error(error).getContent(), error.getStatusCode(), true); } catch (SerializerException e) { writeServerError(true); } } }
@Override public void readServiceDocument(ServiceDocumentRequest request, ServiceDocumentResponse response) throws ODataApplicationException, ODataLibraryException { response.writeServiceDocument(request.getODataRequest().getRawBaseUri()); }
public static ServiceDocumentResponse getInstace(ServiceRequest request, ODataResponse respose, ContentType responseContentType) throws ContentNegotiatorException, SerializerException { return new ServiceDocumentResponse(request.getServiceMetaData(), respose, request.getSerializer(), responseContentType, request.getPreferences()); }
@Override public void readServiceDocument(ServiceDocumentRequest request, ServiceDocumentResponse response) throws ODataLibraryException, ODataApplicationException { selectProcessor(ServiceDocumentProcessor.class).readServiceDocument(request.getODataRequest(), response.getODataResponse(), request.getUriInfo(), request.getResponseContentType()); }
public void visit(ServiceDocumentResponse response) throws ODataLibraryException, ODataApplicationException { response.writeServerError(true); }
@Override public void execute(ServiceHandler handler, ODataResponse response) throws ODataLibraryException, ODataApplicationException { // check for valid HTTP Verb assertHttpMethod(response); handler.readServiceDocument(this, ServiceDocumentResponse.getInstace(this, response, getResponseContentType())); } }
@Override public void readServiceDocument(ServiceDocumentRequest request, ServiceDocumentResponse response) throws ODataLibraryException, ODataApplicationException { response.writeServiceDocument(request.getODataRequest().getRawBaseUri()); }
public static ServiceDocumentResponse getInstace(ServiceRequest request, ODataResponse respose, ContentType responseContentType) throws ContentNegotiatorException, SerializerException { return new ServiceDocumentResponse(request.getServiceMetaData(), respose, request.getSerializer(), responseContentType, request.getPreferences()); }
@Override public void readServiceDocument(ServiceDocumentRequest request, ServiceDocumentResponse response) throws ODataLibraryException, ODataApplicationException { selectProcessor(ServiceDocumentProcessor.class).readServiceDocument(request.getODataRequest(), response.getODataResponse(), request.getUriInfo(), request.getResponseContentType()); }
public void visit(ServiceDocumentResponse response) throws ODataLibraryException, ODataApplicationException { response.writeServerError(true); }
@Override public void execute(ServiceHandler handler, ODataResponse response) throws ODataLibraryException, ODataApplicationException { // check for valid HTTP Verb assertHttpMethod(response); handler.readServiceDocument(this, ServiceDocumentResponse.getInstace(this, response, getResponseContentType())); } }
public void writeError(ODataServerError error) { try { writeHeader(HttpHeader.CONTENT_TYPE, this.responseContentType.toContentTypeString()); writeContent(this.serializer.error(error).getContent(), error.getStatusCode(), true); } catch (SerializerException e) { writeServerError(true); } } }