@Override public String doPostEntity(Map<String, String> requestProperties, URL url, String body, MediaType contentType, MediaType acceptType) throws ODataClientException { return sendRequest(getRequestHeaders(requestProperties, body.length(), contentType, acceptType), url, body, ODataRequest.Method.POST.name()); }
boolean isGET = result.getRequestContext().getRequest().getMethod().equals(ODataRequest.Method.GET);
ODataRequest.Builder builder = new ODataRequest.Builder(); builder.setMethod(ODataRequest.Method.valueOf(servletRequest.getMethod()));
boolean isGET = result.getRequestContext().getRequest().getMethod().equals(ODataRequest.Method.GET);
ODataRequest.Builder builder = new ODataRequest.Builder(); builder.setMethod(ODataRequest.Method.valueOf(servletRequest.getMethod()));
protected boolean isDeleteMethod(ODataRequest.Method method) { return ODataRequest.Method.DELETE.equals(method); }
protected boolean isDeleteMethod(ODataRequest.Method method) { return ODataRequest.Method.DELETE.equals(method); }
/** * This method specifies requested method is PATCH or not. * * @param method is ODataRequest.Method * @return true if requested method is PATCH */ protected boolean isPatchMethod(ODataRequest.Method method) { return ODataRequest.Method.PATCH.equals(method); }
private int getNumberOfChangeSetsInResult(List<ProcessorResult> result) { int changeSets = 0; for (ProcessorResult processorResult : result) { if (!processorResult.getRequestContext().getRequest().getMethod().equals(ODataRequest.Method.GET)) { changeSets++; } } return changeSets; }
@Override public void doDeleteEntity(Map<String, String> requestProperties, URL url) throws ODataClientException { sendRequest(getRequestHeaders(requestProperties, 0, ATOM_XML, ATOM_XML), url, "", ODataRequest.Method.DELETE.name()); }
private void doWireLogging(ODataRequest request) throws UnsupportedEncodingException { if (LOG.isTraceEnabled()) { LOG.trace("RAW REQUEST LOGGING"); LOG.trace("{} request for URL: {}", request.getMethod().name(), request.getUri()); for (Map.Entry<String, String> headerEntry : request.getHeaders().entrySet()) { LOG.trace("Header: {} value: {}", headerEntry.getKey(), headerEntry.getValue()); } LOG.trace("BODY: {}", request.getBodyText(UTF_8.name())); } } }
/** * This method specifies requested method is PUT or not. * * @param method is ODataRequest.Method * @return true if requested method is PUT */ protected boolean isPutMethod(ODataRequest.Method method) { return ODataRequest.Method.PUT.equals(method); }
@Override public String doPutEntity(Map<String, String> requestProperties, URL url, String body, MediaType type) throws ODataClientException { return sendRequest(getRequestHeaders(requestProperties, body.length(), type, type), url, body, ODataRequest.Method.PUT.name()); }
@Override public void doDeleteEntity(Map<String, String> requestProperties, URL urlToCall) throws ODataClientException { sendRequest(populateRequestProperties(requestProperties, 0, ATOM_XML, ATOM_XML), urlToCall, "", ODataRequest.Method.DELETE.name()); }
@Override public String doPutEntity(Map<String, String> requestProperties, URL urlToCall, String body, MediaType type) throws ODataClientException { return sendRequest(populateRequestProperties(requestProperties, body.length(), type, type), urlToCall, body, ODataRequest.Method.PUT.name()); }
/** * This method specifies requested method is PUT or not. * * @param method is ODataRequest.Method * @return true if requested method is PUT */ protected boolean isPutMethod(ODataRequest.Method method) { return ODataRequest.Method.PUT.equals(method); }
/** * This method specifies requested method is PATCH or not. * * @param method is ODataRequest.Method * @return true if requested method is PATCH */ protected boolean isPatchMethod(ODataRequest.Method method) { return ODataRequest.Method.PATCH.equals(method); }
/** * This method specifies requested method is POST or not. * * @param method is ODataRequest.Method * @return true if requested method is POST */ protected boolean isPostMethod(ODataRequest.Method method) { return ODataRequest.Method.POST.equals(method); }
/** * This method specifies requested method is POST or not. * * @param method is ODataRequest.Method * @return true if requested method is POST */ protected boolean isPostMethod(ODataRequest.Method method) { return ODataRequest.Method.POST.equals(method); }
/** * Check if the parser is being used in the context of a 'write operation'. * * @return {@code true} if it is used in the context of a 'write operation', {@code false} otherwise. */ protected boolean isWriteOperation() { return !GET.equals(request.getMethod()); }