| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ibm.portal.struts.common.PortletApiUtils
public abstract class PortletApiUtils
This class provides the APIs for allowing an application to interact with a portal container. The APIs are generic and not specific to the portal container. The utility methods can be used to support classes like tags without creating tight dependencies on the portal container.
Field Summary | |
---|---|
static int | RETURN_URL
Deprecated. |
protected static boolean | s_namescopeForm
Indicator of whether or not to namescope the form name. |
protected static boolean | s_namescopeInputName
Indicator of whether or not to namescope the name attribute of the input element. |
static int | STANDARD_URL
Deprecated. |
Constructor Summary | |
---|---|
PortletApiUtils()
Constructor for PortletApiUtils. |
Method Summary | |
---|---|
abstract void | addDefaultPortletAction(java.lang.Object portletURI)
Adds a portlet action to the given PortletURI. |
abstract void | addDefaultPortletAction(java.lang.Object portletURI,
java.lang.String key)
Adds a portlet action to the given PortletURI using the given key. |
abstract java.lang.String | addModulePrefix(java.lang.String path,
HttpServletRequest request)
Adds the module prefix to the path. |
abstract void | addParameter(java.lang.Object portletURI,
java.lang.String key,
java.lang.String value)
Adds the parameter to the given PortletURI. |
abstract void | addStrutsActionUrlAsParameter(java.lang.Object portletURI,
java.lang.String actionUrl)
Adds the Struts action URL as a parameter to the given PortletURI using the value returned by getStrutsActionParameterName as the parameter name. |
abstract void | createCommand(java.lang.String path,
HttpServletRequest request)
Creates the IViewCommand object for the path for the specified mode prefix. |
abstract void | createCommand(java.lang.String path,
HttpServletRequest request,
HttpServletResponse response)
Creates the IViewCommand object for the path for the specified mode prefix. |
abstract void | createCommand(java.lang.String path,
HttpServletRequest request,
HttpServletResponse response,
java.lang.String commandPrefix)
Creates the IViewCommand object for the path for the specified mode prefix. |
java.lang.Object | createPortletURI(java.lang.Object response)
Creates a Portlet URI from the given response. |
abstract java.lang.Object | createPortletURI(java.lang.Object response,
int urlType)
Deprecated. |
abstract java.lang.Object | createPortletURI(java.lang.Object response,
PortletURIAttributes uriAttributes)
Creates a PortletURI for the given response. |
abstract java.lang.Object | createPortletURIWithStrutsURL(HttpServletRequest request,
java.lang.String actionUrl,
PortletURIAttributes uriAttributes)
Creates the requested type of PortletURI for the given response and URL. |
java.lang.Object | createPortletURIWithStrutsURL(java.lang.Object response,
java.lang.String actionUrl)
Deprecated. |
abstract java.lang.Object | createPortletURIWithStrutsURL(java.lang.Object response,
java.lang.String actionUrl,
int urlType)
Deprecated. |
abstract java.lang.Object | createStrutsPortletURL(HttpServletRequest request,
HttpServletResponse response,
java.lang.String actionUrl,
PortletURIAttributes uriAttributes)
Creates the requested type of PortletURI for the given response and URL. |
abstract java.lang.String | encodeAction(java.lang.String actionURL,
HttpServletRequest request)
Encodes the Struts action URL so that it can be added as a paramter to the portlet URL. |
abstract java.lang.String | encodeNamespace(java.lang.String name,
HttpServletRequest request)
Returns the namescoped name. |
abstract java.lang.String | encodeURL(java.lang.String path,
HttpServletRequest request)
Returns the fully qualified URL from the path. |
abstract void | forward(java.lang.String uri)
Processes a forward. |
abstract void | forward(java.lang.String uri,
HttpServletRequest request)
Processes a forward. |
abstract java.lang.String | getActionMappingURL(java.lang.String action,
PageContext pageContext)
Return the form action converted into a server-relative URL. |
java.lang.String | getDefaultPortletActionName()
Returns the name of the portlet action for a Struts PortletURI. |
abstract java.lang.String | getEncodedBeanName(java.lang.String beanName,
HttpServletRequest request)
Returns the encoded bean name with the first character upper-cased if isFormNamescoped returns true. |
abstract java.lang.Object | getHttpServletRequest(java.lang.Object request)
Gets the HttpServletRequest as an object from the given request object. |
abstract java.lang.Object | getHttpServletResponse(java.lang.Object response)
Gets the HttpServletResponse as an object from the given response object. |
java.lang.String | getParameterName(java.lang.String key)
Returns the parameter name stored under the specified key. |
abstract java.lang.Object | getPortletRequest(HttpServletRequest request)
Gets the PortletRequest as an object from the given request object. |
abstract java.lang.Object | getPortletResponse(HttpServletRequest request)
Gets the PortletResponse as an object from the given request. |
abstract java.lang.Object | getPortletResponse(HttpServletResponse response,
HttpServletRequest request)
Gets the PortletResponse as an object from the given request. |
java.lang.String | getStrutsActionParameterName()
Returns the name of the parameter used to pass the Struts action. |
static PortletApiUtils | getUtilsInstance()
Gets the singleton instance of the PortletApiUtils implementation. |
abstract void | includeTile(java.lang.String path,
PageContext pageContext)
Includes the path as a tile. |
static boolean | isFormNamescoped()
Returns whether or not namescoping of forms is enabled. |
void | setDefaultPortletActionName(java.lang.String name)
Sets the name of the portlet action for a Struts PortletURI. |
static void | setNamescopeForm(boolean value)
Turns namescoping of forms on or off, default is on. |
void | setParameterName(java.lang.String key,
java.lang.String name)
Sets the parameter name for the specified key. |
void | setStrutsActionParameterName(java.lang.String name)
Sets the name used to store the Struts action as a parameter in the Portlet URL. |
static void | setUtilsInstance(PortletApiUtils implementation)
Sets the singleton instance of the PortletApiUtils implementation. |
int | typeOfURL(java.lang.String urlType)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static boolean s_namescopeForm
protected static boolean s_namescopeInputName
public static final int STANDARD_URL
public static final int RETURN_URL
Constructor Detail |
---|
public PortletApiUtils()
Method Detail |
---|
public static PortletApiUtils getUtilsInstance()
null
if none has been setpublic static void setUtilsInstance(PortletApiUtils implementation)
public java.lang.String getDefaultPortletActionName()
public void setDefaultPortletActionName(java.lang.String name)
public java.lang.String getStrutsActionParameterName()
public void setStrutsActionParameterName(java.lang.String name)
public java.lang.String getParameterName(java.lang.String key)
null
if not setpublic void setParameterName(java.lang.String key, java.lang.String name)
public abstract java.lang.Object getPortletResponse(HttpServletRequest request)
null
public abstract java.lang.Object getPortletResponse(HttpServletResponse response, HttpServletRequest request)
null
public abstract java.lang.Object getPortletRequest(HttpServletRequest request)
null
public abstract java.lang.Object getHttpServletRequest(java.lang.Object request)
null
public abstract java.lang.Object getHttpServletResponse(java.lang.Object response)
null
public java.lang.Object createPortletURI(java.lang.Object response)
null
public abstract java.lang.Object createPortletURI(java.lang.Object response, int urlType)
null
public abstract java.lang.Object createPortletURI(java.lang.Object response, PortletURIAttributes uriAttributes)
null
public java.lang.Object createPortletURIWithStrutsURL(java.lang.Object response, java.lang.String actionUrl)
null
public abstract java.lang.Object createPortletURIWithStrutsURL(java.lang.Object response, java.lang.String actionUrl, int urlType)
null
public abstract java.lang.Object createPortletURIWithStrutsURL(HttpServletRequest request, java.lang.String actionUrl, PortletURIAttributes uriAttributes)
null
, if the response object cannot be found.
The PortletURI should be casted to the
appropriate PortletURI class of the current portal container.
null
public abstract java.lang.Object createStrutsPortletURL(HttpServletRequest request, HttpServletResponse response, java.lang.String actionUrl, PortletURIAttributes uriAttributes)
null
, if the response object cannot be found.
The Portlet URI should be casted to the
appropriate PortletURI class of the current portal container.
null
public int typeOfURL(java.lang.String urlType)
public abstract void addDefaultPortletAction(java.lang.Object portletURI)
public abstract void addDefaultPortletAction(java.lang.Object portletURI, java.lang.String key)
public abstract void addStrutsActionUrlAsParameter(java.lang.Object portletURI, java.lang.String actionUrl)
public abstract void addParameter(java.lang.Object portletURI, java.lang.String key, java.lang.String value)
public abstract void forward(java.lang.String uri) throws ServletException
public abstract void forward(java.lang.String uri, HttpServletRequest request) throws ServletException
public abstract java.lang.String encodeURL(java.lang.String path, HttpServletRequest request)
public abstract java.lang.String encodeNamespace(java.lang.String name, HttpServletRequest request)
public abstract java.lang.String addModulePrefix(java.lang.String path, HttpServletRequest request)
public abstract java.lang.String getEncodedBeanName(java.lang.String beanName, HttpServletRequest request)
public static void setNamescopeForm(boolean value)
public static boolean isFormNamescoped()
public abstract void createCommand(java.lang.String path, HttpServletRequest request, HttpServletResponse response, java.lang.String commandPrefix) throws ServletException
public abstract void createCommand(java.lang.String path, HttpServletRequest request, HttpServletResponse response) throws ServletException
public abstract void createCommand(java.lang.String path, HttpServletRequest request) throws ServletException
public abstract void includeTile(java.lang.String path, PageContext pageContext) throws ServletException
public abstract java.lang.String encodeAction(java.lang.String actionURL, HttpServletRequest request)
public abstract java.lang.String getActionMappingURL(java.lang.String action, PageContext pageContext)
| |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |