| java.lang.Object org.jaffa.presentation.portlet.HistoryNav
HistoryNav | public class HistoryNav (Code) | | This is a helper class for marshalling the HistoryNavList into XML and vice versa.
author: GautamJ |
Method Summary | |
public static void | addFormKeyToHistoryNav(HttpServletRequest request, FormKey fk) This will add the input FormKey to the historyNav. | public static List | decode(String historyNavXml) This will unmarshal the input XML into a List of FormKey objects.
Parameters: historyNavXml - The XML representation of the historyNavList. | public static String | encode(List historyNavList) This will marhsal the input List into XML. | public static List | initializeHistoryNav(HttpServletRequest request) This will initialze a List with the 'jaffa_home' link and set the 'historyNav' attribute on the input request stream with the new List. | public static List | initializeHistoryNav(HttpServletRequest request, String finalUrl) This will initialze a List with the 'jaffa_home' link and set the 'historyNav' attribute on the input request stream with the new List.
It will also add a link for the finalUrl, the title for which should be passed in as the value for the paramter "desktopName" or "title", within the finalUrl.
Parameters: request - The request stream Parameters: finalUrl - The final Url encoded in UTF-8 format. throws: UnsupportedEncodingException - if the UTF-8 format is not supported. | public static List | obtainHistoryNav(HttpServletRequest request) This will search the request stream for the attribute 'historyNav'. |
HISTORY_NAV_PARAMETER | final public static String HISTORY_NAV_PARAMETER(Code) | | Constant to denote the 'historyNav' parameter.
|
addFormKeyToHistoryNav | public static void addFormKeyToHistoryNav(HttpServletRequest request, FormKey fk)(Code) | | This will add the input FormKey to the historyNav.
If the historyNav didn't exist, then one will be initialized.
If the input FormKey already existed on the historyNav, then all subsequent FormKeys will be removed from the list.
Also, all the subsequent components will be closed.
Parameters: request - The request stream. Parameters: fk - The FormKey to add. |
decode | public static List decode(String historyNavXml)(Code) | | This will unmarshal the input XML into a List of FormKey objects.
Parameters: historyNavXml - The XML representation of the historyNavList. The List of FormKey objects. |
encode | public static String encode(List historyNavList)(Code) | | This will marhsal the input List into XML. The List is assumed to contain FormKey objects.
Parameters: historyNavList - The List of FormKey objects. The XML representation of the historyNavList. |
initializeHistoryNav | public static List initializeHistoryNav(HttpServletRequest request)(Code) | | This will initialze a List with the 'jaffa_home' link and set the 'historyNav' attribute on the input request stream with the new List.
Parameters: request - The request stream the newly initialized List. |
initializeHistoryNav | public static List initializeHistoryNav(HttpServletRequest request, String finalUrl) throws UnsupportedEncodingException(Code) | | This will initialze a List with the 'jaffa_home' link and set the 'historyNav' attribute on the input request stream with the new List.
It will also add a link for the finalUrl, the title for which should be passed in as the value for the paramter "desktopName" or "title", within the finalUrl.
Parameters: request - The request stream Parameters: finalUrl - The final Url encoded in UTF-8 format. throws: UnsupportedEncodingException - if the UTF-8 format is not supported. should never happen. the newly initialized List. |
obtainHistoryNav | public static List obtainHistoryNav(HttpServletRequest request)(Code) | | This will search the request stream for the attribute 'historyNav'. If not found, it'll search for the parameter 'historyNav'.
This parameter is expected to be in XML format and will be decoded into a List
Parameters: request - The request stream. The List containing the links for the HistoryNav. |
|
|