/** * Returns the reference that the client should follow for redirections or * resource creations. * * @return The redirection reference. */ @Override public Reference getLocationRef() { return getWrappedResponse().getLocationRef(); }
/** * Returns the reference that the client should follow for redirections or * resource creations. * * @return The redirection reference. * @see Response#getLocationRef() */ public Reference getLocationRef() { return getResponse() == null ? null : getResponse().getLocationRef(); }
if (response.getLocationRef() != null) { request = new Request(Method.GET, response.getLocationRef()); setupAuth(request); setupCookies(request);
Reference newTargetRef = response.getLocationRef();
/** * Rewrite the location of the response, and the Location of the entity, if * any. * * @param request * The request to handle. * @param response * The response to update. */ public void rewriteLocation(Request request, Response response) { if (response.getLocationRef() != null) { Reference locationRef = response.getLocationRef(); String newLocation = getLocation(locationRef, request); if (newLocation != null) { response.setLocationRef(newLocation); } } if (response.getEntity() != null && response.getEntity().getLocationRef() != null) { Reference locationRef = response.getEntity().getLocationRef(); String newLocation = getLocation(locationRef, request); if (newLocation != null) { response.getEntity().setLocationRef(newLocation); } } }
/** * Posts a member to the collection resulting in the creation of a new * resource. * * @param member * The member representation to post. * @return The reference of the new resource. * @throws Exception */ public Reference postMember(Representation member) throws Exception { final Request request = new Request(Method.POST, getHref(), member); final Response response = getWorkspace().getService() .getClientDispatcher().handle(request); if (response.getStatus().equals(Status.SUCCESS_CREATED)) { return response.getLocationRef(); } throw new Exception( "Couldn't post the member representation. Status returned: " + response.getStatus()); }
/** * Posts a member to the collection resulting in the creation of a new * resource. * * @param member * The member representation to post. * @return The reference of the new resource. * @throws Exception */ public Reference postMember(Representation member) throws Exception { final Request request = new Request(Method.POST, getHref(), member); final Response response = getWorkspace().getService() .getClientDispatcher().handle(request); if (response.getStatus().equals(Status.SUCCESS_CREATED)) { return response.getLocationRef(); } throw new Exception( "Couldn't post the member representation. Status returned: " + response.getStatus()); }
if (response.getLocationRef() != null) { Template rt = new Template(targetTemplate); rt.setLogger(getLogger()); int matched = rt.parse(response.getLocationRef() .toString(), request);
default: if (variableName.startsWith("R")) { return getReferenceContent(variableName.substring(1), this.response.getLocationRef());
&& (response.getLocationRef() != null)) { boolean doRedirection = false;
} else if (response.getStatus().isRedirection()) Reference redirectedTo = response.getLocationRef(); return invokeQuery( redirectedTo, queryRequest, resourceHandler, processingErrorHandler ); } else
if (response.getLocationRef() != null) { addHeader(HEADER_LOCATION, response.getLocationRef().getTargetRef().toString(), headers);