/** * Sets the reference that the client should follow for redirections or * resource creations. * * @param locationUri * The URI to set. * @deprecated Use the setLocationRef() method instead. */ @Deprecated public void setRedirectRef(String locationUri) { setLocationRef(locationUri); }
/** * Sets the reference that the client should follow for redirections or * resource creations. * * @param locationRef * The reference to set. * @deprecated Use the setLocationRef() method instead. */ @Deprecated public void setRedirectRef(Reference locationRef) { setLocationRef(locationRef); }
/** * Sets the reference that the client should follow for redirections or * resource creations. * * @param locationRef * The reference to set. */ @Override public void setLocationRef(Reference locationRef) { getWrappedResponse().setLocationRef(locationRef); }
/** * Sets the reference that the client should follow for redirections or * resource creations. * * @param locationUri * The URI to set. */ @Override public void setLocationRef(String locationUri) { getWrappedResponse().setLocationRef(locationUri); }
/** * Permanently redirects the client to a target URI. The client is expected * to reuse the same method for the new request. * * @param targetRef * The target URI reference. */ public void redirectPermanent(Reference targetRef) { setLocationRef(targetRef); setStatus(Status.REDIRECTION_PERMANENT); }
/** * Temporarily redirects the client to a target URI. The client is expected * to reuse the same method for the new request. * * @param targetRef * The target reference. */ public void redirectTemporary(Reference targetRef) { setLocationRef(targetRef); setStatus(Status.REDIRECTION_TEMPORARY); }
/** * Redirects the client to a different URI that SHOULD be retrieved using a * GET method on that resource. This method exists primarily to allow the * output of a POST-activated script to redirect the user agent to a * selected resource. The new URI is not a substitute reference for the * originally requested resource. * * @param targetRef * The target reference. */ public void redirectSeeOther(Reference targetRef) { setLocationRef(targetRef); setStatus(Status.REDIRECTION_SEE_OTHER); }
/** * Temporarily redirects the client to a target URI. The client is expected * to reuse the same method for the new request.<br> * <br> * If you pass a relative target URI, it will be resolved with the current * base reference of the request's resource reference (see * {@link Request#getResourceRef()} and {@link Reference#getBaseRef()}. * * @param targetUri * The target URI. */ public void redirectTemporary(String targetUri) { setLocationRef(targetUri); setStatus(Status.REDIRECTION_TEMPORARY); }
/** * Permanently redirects the client to a target URI. The client is expected * to reuse the same method for the new request.<br> * <br> * If you pass a relative target URI, it will be resolved with the current * base reference of the request's resource reference (see * {@link Request#getResourceRef()} and {@link Reference#getBaseRef()}. * * @param targetUri * The target URI. */ public void redirectPermanent(String targetUri) { setLocationRef(targetUri); setStatus(Status.REDIRECTION_PERMANENT); }
/** * Redirects the client to a different URI that SHOULD be retrieved using a * GET method on that resource. This method exists primarily to allow the * output of a POST-activated script to redirect the user agent to a * selected resource. The new URI is not a substitute reference for the * originally requested resource.<br> * <br> * If you pass a relative target URI, it will be resolved with the current * base reference of the request's resource reference (see * {@link Request#getResourceRef()} and {@link Reference#getBaseRef()}. * * @param targetUri * The target URI. */ public void redirectSeeOther(String targetUri) { setLocationRef(targetUri); setStatus(Status.REDIRECTION_SEE_OTHER); }
getLogger().log(Level.INFO, "Redirecting client to found location: " + targetRef); response.setLocationRef(targetRef); response.setStatus(Status.REDIRECTION_FOUND); break; getLogger().log(Level.INFO, "Redirecting client to another location: " + targetRef); response.setLocationRef(targetRef); response.setStatus(Status.REDIRECTION_SEE_OTHER); break;
response.setLocationRef(baseRef.toString() + remainingPart);
/** * Sets the reference that the client should follow for redirections or * resource creations. If you pass a relative location URI, it will be * resolved with the current base reference of the request's resource * reference (see {@link Request#getResourceRef()} and * {@link Reference#getBaseRef()}. * * @param locationUri * The URI to set. */ public void setLocationRef(String locationUri) { Reference baseRef = null; if (getRequest().getResourceRef() != null) { if (getRequest().getResourceRef().getBaseRef() != null) { baseRef = getRequest().getResourceRef().getBaseRef(); } else { baseRef = getRequest().getResourceRef(); } } setLocationRef(new Reference(baseRef, locationUri).getTargetRef()); }
file.getRepositoryItemUid().getPath()); response.setLocationRef(fileReference);
file.getRepositoryItemUid().getPath() ); response.setLocationRef( fileReference );