org.jboss.portal.portlet.impl.spi
Class AbstractPortletInvocationContext

java.lang.Object
  extended by org.jboss.portal.portlet.impl.spi.AbstractPortletInvocationContext
All Implemented Interfaces:
PortletInvocationContext
Direct Known Subclasses:
ControllerPortletInvocationContext

public abstract class AbstractPortletInvocationContext
extends java.lang.Object
implements PortletInvocationContext

An abstract implementation that relies on the a request and response provided by the client (i.e the portal).

Version:
$Revision: 5064 $
Author:
Julien Viet

Field Summary
protected  org.jboss.portal.common.util.MarkupInfo markupInfo
          .
 
Constructor Summary
protected AbstractPortletInvocationContext(org.jboss.portal.common.util.MarkupInfo markupInfo)
           
 
Method Summary
 java.lang.String encodeResourceURL(java.lang.String url)
          Validate the url and then delegate the encoding of the url to the client response.
abstract  javax.servlet.http.HttpServletRequest getClientRequest()
          Return the client request.
abstract  javax.servlet.http.HttpServletResponse getClientResponse()
          Return the client response.
 org.jboss.portal.common.util.MarkupInfo getMarkupInfo()
          todo : move me to client content // see if it is still needed with CC/PP Return information about the underlying http wire this invocation is performed.
 void renderURL(java.io.Writer writer, ContainerURL containerURL, URLFormat format)
          Delegates the URL rendition to the method PortletInvocationContext.renderURL(org.jboss.portal.portlet.ContainerURL,org.jboss.portal.portlet.URLFormat) and then invoke the Writer.write(String) method with the returned result.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jboss.portal.portlet.spi.PortletInvocationContext
renderURL
 

Field Detail

markupInfo

protected final org.jboss.portal.common.util.MarkupInfo markupInfo
.

Constructor Detail

AbstractPortletInvocationContext

protected AbstractPortletInvocationContext(org.jboss.portal.common.util.MarkupInfo markupInfo)
Method Detail

getClientRequest

public abstract javax.servlet.http.HttpServletRequest getClientRequest()
                                                                throws java.lang.IllegalStateException
Return the client request.

Returns:
the client request
Throws:
java.lang.IllegalStateException - if the client response is not available

getClientResponse

public abstract javax.servlet.http.HttpServletResponse getClientResponse()
                                                                  throws java.lang.IllegalStateException
Return the client response.

Returns:
the client response
Throws:
java.lang.IllegalStateException - if the client response is not available

encodeResourceURL

public java.lang.String encodeResourceURL(java.lang.String url)
                                   throws java.lang.IllegalArgumentException
Validate the url and then delegate the encoding of the url to the client response.

Specified by:
encodeResourceURL in interface PortletInvocationContext
Parameters:
url - the url to be encoded
Returns:
the encoded url
Throws:
java.lang.IllegalArgumentException - if the url is not valid or null

getMarkupInfo

public org.jboss.portal.common.util.MarkupInfo getMarkupInfo()
Description copied from interface: PortletInvocationContext
todo : move me to client content // see if it is still needed with CC/PP Return information about the underlying http wire this invocation is performed.

Specified by:
getMarkupInfo in interface PortletInvocationContext
Returns:
the stream info

renderURL

public void renderURL(java.io.Writer writer,
                      ContainerURL containerURL,
                      URLFormat format)
               throws java.io.IOException
Delegates the URL rendition to the method PortletInvocationContext.renderURL(org.jboss.portal.portlet.ContainerURL,org.jboss.portal.portlet.URLFormat) and then invoke the Writer.write(String) method with the returned result.

Specified by:
renderURL in interface PortletInvocationContext
Parameters:
writer - the writer
containerURL - the portlet url
format - the url format
Throws:
java.io.IOException - any IOException thrown by the writer
See Also:
PortletInvocationContext.renderURL(org.jboss.portal.portlet.ContainerURL, org.jboss.portal.portlet.URLFormat)


Copyright © 2008. All Rights Reserved.