|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.faces.bridge.container.PortletContainerCompatImpl
com.liferay.faces.bridge.container.PortletContainerImpl
public class PortletContainerImpl
| Constructor Summary | |
|---|---|
PortletContainerImpl(javax.portlet.PortletRequest portletRequest,
BridgeConfig bridgeConfig)
|
|
| Method Summary | |
|---|---|
void |
afterPhase(javax.faces.event.PhaseEvent phaseEvent)
|
void |
beforePhase(javax.faces.event.PhaseEvent event)
|
protected void |
copyRequestParameters(String fromURL,
javax.portlet.BaseURL toURL)
Copies any query paramters present in the specified "from" URL to the specified "to" URL. |
protected javax.portlet.PortletURL |
createActionURL(javax.portlet.MimeResponse mimeResponse)
|
javax.portlet.PortletURL |
createActionURL(String fromURL)
Creates a portlet action URL and copies query parameters that might be present in the specified URL. |
javax.portlet.ResourceURL |
createPartialActionURL(String fromURL)
Creates a portlet resource URL that is suitable for partial requests (Ajax). |
javax.portlet.PortletURL |
createRedirectURL(String fromURL,
Map<String,List<String>> parameters)
Note that this default method implementation doesn't help when a |
protected javax.portlet.PortletURL |
createRenderURL(javax.portlet.MimeResponse mimeResponse)
|
javax.portlet.PortletURL |
createRenderURL(String fromURL)
Creates a portlet render URL and copies query parameters that might be present in the specified URL. |
protected javax.portlet.ResourceURL |
createResourceURL(javax.portlet.MimeResponse mimeResponse)
|
javax.portlet.ResourceURL |
createResourceURL(String fromURL)
Creates a portlet resource URL and copies the javax.faces.resource value and query parameters that might be present in the specified URL. |
String |
fixRequestParameterValue(String value)
This method provides the portlet conainer with an opportunity to fix/correct/massage the specified request parameter value. |
protected boolean |
getContextParamAbleToSetHttpStatusCode(boolean defaultValue)
|
String[] |
getHeader(String name)
Returns the value of the header with the specified name from the underlying HttpServletRequest. |
long |
getHttpServletRequestDateHeader(String name)
Returns the value of the specified header name from the HttpServletRequest that is wrapped by the current PortletRequest. |
javax.faces.event.PhaseId |
getPhaseId()
|
String |
getRequestParameter(String name)
This is a convenience method that gets the specified request parameter value. |
String[] |
getRequestParameterValues(String name)
This is a convenience method that gets the specified request parameter values. |
String |
getRequestQueryString()
Gets the query string part of the URL requested by the user-agent (browser) by getting the attribute named "javax.servlet.forward.query_string" from the request. |
String |
getRequestURL()
Returns the URL requested by the user-agent (browser). |
String |
getResponseNamespace()
Returns the response namespace. |
boolean |
isAbleToAddScriptResourceToHead()
Determines whether or not the portlet container has the ability (standard or vendor-specific) to add <script src=".." /> resource to the <head>...</head> section of the rendered portal page. |
boolean |
isAbleToAddScriptTextToHead()
Determines whether or not the portlet container has the ability (standard or vendor-specific) to add <script> text to the <head>...</head> section of the rendered portal page. |
boolean |
isAbleToAddStyleSheetResourceToHead()
Determines whether or not the portlet container has the ability (standard or vendor-specific) to add stylesheet <link> tags to the <head>...</head> section of the rendered portal page. |
boolean |
isAbleToForwardOnDispatch()
Determines whether or not the portlet container has the ability to issue a forward when a dispatch occurs. |
boolean |
isAbleToSetHttpStatusCode()
Determines whether or not the portlet container has the ability to support the Portlet 2.0 standard mechanism of setting the ResourceResponse.HTTP_STATUS_CODE property on the ResourceResponse. |
boolean |
isAbleToSetResourceResponseBufferSize()
Determines whether or not the portlet container has the ability to set the buffer size on its javax.portlet.ResourceResponse implementation. |
protected boolean |
isMarkupHeadElementSupported()
Determines whether or not the portlet container supports the standard Portlet 2.0 mechanism for adding resources to the ... section of the rendered portal page. |
boolean |
isNamespacedParameters()
Determines whether or not the portlet container requires parameters to be namespaced. |
boolean |
isPostRedirectGetSupported()
Flag indicating whether or not the portlet container supports/implements the POST-REDIRECT-GET design pattern, meaning that the ACTION_PHASE originates from an HTTP POST request, and the RENDER_PHASE is a subsequent HTTP GET request. |
void |
maintainRenderParameters(javax.portlet.EventRequest eventRequest,
javax.portlet.EventResponse eventResponse)
FACES-1453: Since EventResponse.setRenderParameters(EventRequest) would end up clobbering existing
public/private render parameters, it is necessary to iterate through all of them and only maintain the ones that
don't already exist in StateAwareResponse.getRenderParameterMap(). |
protected List<RequestParameter> |
parseRequestParameters(String url)
Parses the specified URL and returns a list of query parameters that are found. |
void |
redirect(String url)
Delegates to the underlying ActionResponse to perform a redirect to the specified URL. |
void |
setMimeResponseContentType(javax.portlet.MimeResponse mimeResponse,
String contentType)
Layer of abstraction over the MimeResponse.setContentType(String) method. |
| Methods inherited from class com.liferay.faces.bridge.container.PortletContainerCompatImpl |
|---|
getHeadResponseWriter, isJSF2PartialRequest, redirectJSF2PartialResponse |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PortletContainerImpl(javax.portlet.PortletRequest portletRequest,
BridgeConfig bridgeConfig)
| Method Detail |
|---|
public void afterPhase(javax.faces.event.PhaseEvent phaseEvent)
public void beforePhase(javax.faces.event.PhaseEvent event)
public javax.portlet.PortletURL createActionURL(String fromURL)
throws MalformedURLException
PortletContainer
fromURL - The URL to copy from.
MalformedURLException
public javax.portlet.ResourceURL createPartialActionURL(String fromURL)
throws MalformedURLException
PortletContainer
fromURL - The URL to copy from.
MalformedURLException
public javax.portlet.PortletURL createRedirectURL(String fromURL,
Map<String,List<String>> parameters)
throws MalformedURLException
fromURL - The URL to copy from.
MalformedURLException
public javax.portlet.PortletURL createRenderURL(String fromURL)
throws MalformedURLException
PortletContainer
fromURL - The URL to copy from.
MalformedURLException
public javax.portlet.ResourceURL createResourceURL(String fromURL)
throws MalformedURLException
PortletContainer
fromURL - The URL to copy from. Example expected value:
/portlet-context-path/*\/javax.faces.resource/jsf.js?ln=javax.faces
MalformedURLExceptionpublic String fixRequestParameterValue(String value)
PortletContainer
value - The request parameter value that needs to be fixed.
public void maintainRenderParameters(javax.portlet.EventRequest eventRequest,
javax.portlet.EventResponse eventResponse)
EventResponse.setRenderParameters(EventRequest) would end up clobbering existing
public/private render parameters, it is necessary to iterate through all of them and only maintain the ones that
don't already exist in StateAwareResponse.getRenderParameterMap().
public void redirect(String url)
throws IOException
PortletContainer
IOException
protected void copyRequestParameters(String fromURL,
javax.portlet.BaseURL toURL)
throws MalformedURLException
fromURL - The String-based URL to copy query parameters from.toURL - The portlet-based URL to copy query parameters to.
MalformedURLExceptionprotected javax.portlet.PortletURL createActionURL(javax.portlet.MimeResponse mimeResponse)
protected javax.portlet.PortletURL createRenderURL(javax.portlet.MimeResponse mimeResponse)
protected javax.portlet.ResourceURL createResourceURL(javax.portlet.MimeResponse mimeResponse)
protected List<RequestParameter> parseRequestParameters(String url)
throws MalformedURLException
url - The URL to parse.
MalformedURLExceptionprotected boolean getContextParamAbleToSetHttpStatusCode(boolean defaultValue)
public boolean isAbleToAddScriptResourceToHead()
PortletContainer
public boolean isAbleToAddScriptTextToHead()
PortletContainer
public boolean isAbleToAddStyleSheetResourceToHead()
PortletContainer
public boolean isPostRedirectGetSupported()
PortletContainer
true if the POST-REDIRECT-GET design pattern is supported, otherwise false.protected boolean isMarkupHeadElementSupported()
public boolean isAbleToSetHttpStatusCode()
PortletContainerResourceResponse.HTTP_STATUS_CODE property on the ResourceResponse.
public boolean isAbleToSetResourceResponseBufferSize()
PortletContainer
public boolean isAbleToForwardOnDispatch()
PortletContainer
true if able, otherwise false.public String[] getHeader(String name)
PortletContainer
public long getHttpServletRequestDateHeader(String name)
PortletContainer
public void setMimeResponseContentType(javax.portlet.MimeResponse mimeResponse,
String contentType)
PortletContainerMimeResponse.setContentType(String) method.
contentType - The contentType that is to be set on the specified MimeResponse.public javax.faces.event.PhaseId getPhaseId()
public String getRequestParameter(String name)
PortletContainerPortletContainer.getRequestParameter(String) method before returning a value.
name - The request parameter name.
public String[] getRequestParameterValues(String name)
PortletContainerPortletContainer.getRequestParameter(String) method before returning a
value.
name - The request parameter name.
public String getRequestQueryString()
PortletContainer
public String getRequestURL()
PortletContainer
public String getResponseNamespace()
PortletContainer
public boolean isNamespacedParameters()
PortletContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||