|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.portal.portlet.apiconvert.APIConverterFactory
public class APIConverterFactory
Factory class which is used tp wrap Jetspeed API objects with Java Portlet API interfaces. Some methods on the returned objects are not supported, even though they are part of the interface, because the functionality cannot be mapped to the Jetspeed API. This means that the implementation of the returned objects is not fully compliant to the Java portlet specification. See the documentation of the individual methods for incompatibilities
This functionality should not be used in portlet code but only in the implementation of extended APIs for portlets, such as portlet services. It helps portlet service providers to write portlet services that should be available to both portlets written to the IBM portet API and portlets written to the Java portlet API, so they can maintain compatibility to existing portlets when extending support to the Java Portlet API. Those services can have a single implementation for javax API objects only. The interface for IBM portlets can then be implemented by wrapping Jetspeed API objects and calling the method for javax API objects.Coding example:
public void doSomething(javax.portlet.RenderRequest request, ...) { ... implementation code written to the Java Portlet API ... } public void doSomething(org.apache.jetspeed.portlet.PortletRequest request, ...) { doSomething(APIConverterFactory.getInstance().getRenderRequest(request), ...); }When using this approach, you must make sure that the actual implementation code that works on the javax API objects uses only those methods that are also supported by the wrappers and not declared as incompatible.
Method Summary | |
---|---|
javax.portlet.ActionRequest |
getActionRequest(org.apache.jetspeed.portlet.PortletRequest jetspeedRequest)
Returns a wrapper that converts a Jetspeed portlet request to a javax action request. |
javax.portlet.ActionResponse |
getActionResponse(org.apache.jetspeed.portlet.PortletResponse jetspeedResponse,
org.apache.jetspeed.portlet.PortletRequest jetspeedRequest)
Returns a wrapper that converts a Jetspeed portlet response to a javax portlet response. |
static APIConverterFactory |
getInstance()
Returns an instance of this factory |
javax.portlet.PortletContext |
getPortletContext(org.apache.jetspeed.portlet.PortletContext jetspeeedContext)
Returns a wrapper that converts a Jetspeed portlet context to a javax portlet context. |
javax.portlet.PortletRequestDispatcher |
getPortletRequestDispatcher(org.apache.jetspeed.portlet.PortletContext jetspeeedContext,
java.lang.String path)
Returns a wrapper that converts a Jetspeed portlet context to a javax portlet request dispatcher. |
javax.portlet.PortletSession |
getPortletSession(org.apache.jetspeed.portlet.PortletSession jetspeeedSession,
org.apache.jetspeed.portlet.PortletContext jetspeedContext)
Returns a wrapper that converts a Jetspeed portlet session to a javax portlet session. |
javax.portlet.RenderRequest |
getRenderRequest(org.apache.jetspeed.portlet.PortletRequest jetspeedRequest)
Returns a wrapper that converts a Jetspeed portlet request to a javax render request. |
javax.portlet.RenderResponse |
getRenderResponse(org.apache.jetspeed.portlet.PortletResponse jetspeedResponse)
Returns a wrapper that converts a Jetspeed portlet response to a javax render response. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static APIConverterFactory getInstance()
public javax.portlet.RenderRequest getRenderRequest(org.apache.jetspeed.portlet.PortletRequest jetspeedRequest)
The following methods on the returned object are not supported or are not compatible with the JSR 168 standard:
jetspeedRequest
- the Jetspeed request
public javax.portlet.ActionRequest getActionRequest(org.apache.jetspeed.portlet.PortletRequest jetspeedRequest)
The following methods on the returned object are not supported or are not compatible with the JSR 168 standard:
jetspeedRequest
- the Jetspeed requestpublic javax.portlet.RenderResponse getRenderResponse(org.apache.jetspeed.portlet.PortletResponse jetspeedResponse)
The following methods on the returned object are not supported or are not compatible with the JSR 168 standard:
jetspeedResponse
- the Jetspeed responsepublic javax.portlet.ActionResponse getActionResponse(org.apache.jetspeed.portlet.PortletResponse jetspeedResponse, org.apache.jetspeed.portlet.PortletRequest jetspeedRequest)
The following methods on the returned object are not supported or are not compatible with the JSR 168 standard:
jetspeedResponse
- the Jetspeed responsejetspeedRequest
- the Jetspeed request, may be null (only needed for setWindowState)public javax.portlet.PortletSession getPortletSession(org.apache.jetspeed.portlet.PortletSession jetspeeedSession, org.apache.jetspeed.portlet.PortletContext jetspeedContext)
The following methods on the returned object are not supported or are not compatible with the JSR 168 standard:
jetspeedSession
- the Jetspeed sessionjetspeedContext
- the Jetspeed context, may be null (only needed for getPortletContext)public javax.portlet.PortletContext getPortletContext(org.apache.jetspeed.portlet.PortletContext jetspeeedContext)
The following methods on the returned object are not supported or are not compatible with the JSR 168 standard:
jetspeedContext
- the Jetspeed contextpublic javax.portlet.PortletRequestDispatcher getPortletRequestDispatcher(org.apache.jetspeed.portlet.PortletContext jetspeeedContext, java.lang.String path)
jetspeedContext
- the Jetspeed context
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |