1 16 17 package org.springframework.web.portlet.util; 18 19 import java.util.Enumeration ; 20 import java.util.Locale ; 21 import java.util.Map ; 22 import java.security.Principal ; 23 24 import javax.portlet.PortalContext; 25 import javax.portlet.PortletMode; 26 import javax.portlet.PortletPreferences; 27 import javax.portlet.PortletRequest; 28 import javax.portlet.PortletSession; 29 import javax.portlet.WindowState; 30 31 import org.springframework.util.Assert; 32 33 44 public class PortletRequestWrapper implements PortletRequest { 45 46 47 private final PortletRequest portletRequest; 48 49 50 55 public PortletRequestWrapper(PortletRequest request) { 56 Assert.notNull(request, "Request is required"); 57 this.portletRequest = request; 58 } 59 60 61 public boolean isWindowStateAllowed(WindowState state) { 62 return this.portletRequest.isWindowStateAllowed(state); 63 } 64 65 public boolean isPortletModeAllowed(PortletMode mode) { 66 return this.portletRequest.isPortletModeAllowed(mode); 67 } 68 69 public PortletMode getPortletMode() { 70 return this.portletRequest.getPortletMode(); 71 } 72 73 public WindowState getWindowState() { 74 return this.portletRequest.getWindowState(); 75 } 76 77 public PortletPreferences getPreferences() { 78 return this.portletRequest.getPreferences(); 79 } 80 81 public PortletSession getPortletSession() { 82 return this.portletRequest.getPortletSession(); 83 } 84 85 public PortletSession getPortletSession(boolean create) { 86 return this.portletRequest.getPortletSession(create); 87 } 88 89 public String getProperty(String name) { 90 return this.portletRequest.getProperty(name); 91 } 92 93 public Enumeration getProperties(String name) { 94 return this.portletRequest.getProperties(name); 95 } 96 97 public Enumeration getPropertyNames() { 98 return this.portletRequest.getPropertyNames(); 99 } 100 101 public PortalContext getPortalContext() { 102 return this.portletRequest.getPortalContext(); 103 } 104 105 public String getAuthType() { 106 return this.portletRequest.getAuthType(); 107 } 108 109 public String getContextPath() { 110 return this.portletRequest.getContextPath(); 111 } 112 113 public String getRemoteUser() { 114 return this.portletRequest.getRemoteUser(); 115 } 116 117 public Principal getUserPrincipal() { 118 return this.portletRequest.getUserPrincipal(); 119 } 120 121 public boolean isUserInRole(String role) { 122 return this.portletRequest.isUserInRole(role); 123 } 124 125 public Object getAttribute(String name) { 126 return this.portletRequest.getAttribute(name); 127 } 128 129 public Enumeration getAttributeNames() { 130 return this.portletRequest.getAttributeNames(); 131 } 132 133 public String getParameter(String name) { 134 return this.portletRequest.getParameter(name); 135 } 136 137 public Enumeration getParameterNames() { 138 return this.portletRequest.getParameterNames(); 139 } 140 141 public String [] getParameterValues(String name) { 142 return this.portletRequest.getParameterValues(name); 143 } 144 145 public Map getParameterMap() { 146 return this.portletRequest.getParameterMap(); 147 } 148 149 public boolean isSecure() { 150 return this.portletRequest.isSecure(); 151 } 152 153 public void setAttribute(String name, Object value) { 154 this.portletRequest.setAttribute(name, value); 155 } 156 157 public void removeAttribute(String name) { 158 this.portletRequest.removeAttribute(name); 159 } 160 161 public String getRequestedSessionId() { 162 return this.portletRequest.getRequestedSessionId(); 163 } 164 165 public boolean isRequestedSessionIdValid() { 166 return this.portletRequest.isRequestedSessionIdValid(); 167 } 168 169 public String getResponseContentType() { 170 return this.portletRequest.getResponseContentType(); 171 } 172 173 public Enumeration getResponseContentTypes() { 174 return this.portletRequest.getResponseContentTypes(); 175 } 176 177 public Locale getLocale() { 178 return this.portletRequest.getLocale(); 179 } 180 181 public Enumeration getLocales() { 182 return this.portletRequest.getLocales(); 183 } 184 185 public String getScheme() { 186 return this.portletRequest.getScheme(); 187 } 188 189 public String getServerName() { 190 return this.portletRequest.getServerName(); 191 } 192 193 public int getServerPort() { 194 return this.portletRequest.getServerPort(); 195 } 196 197 } 198 | Popular Tags |