001
014
015 package com.liferay.portlet;
016
017 import javax.portlet.ActionResponse;
018 import javax.portlet.PortletRequest;
019
020
023 public class ActionResponseImpl
024 extends StateAwareResponseImpl implements ActionResponse {
025
026 public String getLifecycle() {
027 return PortletRequest.ACTION_PHASE;
028 }
029
030 public void sendRedirect(String location) {
031 if ((location == null) ||
032 (!location.startsWith("/") && (location.indexOf(":
033 (!location.startsWith("wsrp_rewrite?")))) {
034
035 throw new IllegalArgumentException(
036 location + " is not a valid redirect");
037 }
038
039
040
041
042 if (location.startsWith("wsrp_rewrite?")) {
043 location = "http:
044 }
045
046 if (isCalledSetRenderParameter()) {
047 throw new IllegalStateException(
048 "Set render parameter has already been called");
049 }
050
051 setRedirectLocation(location);
052 }
053
054 public void sendRedirect(String location, String renderUrlParamName) {
055 }
056
057 }