com.plumtree.portaluiinfrastructure.statichelpers
Class GatewayHelpers

java.lang.Object
  extended by com.plumtree.portaluiinfrastructure.statichelpers.GatewayHelpers

public class GatewayHelpers
extends java.lang.Object

This class provides a set of static helpers for constucting valid gateway URLs. Gateway URLs follow a well-defined format to communicate information about the request to the gateway control. This section describes the format of the gateway URLs. For simplicity portal url is assumed to be http://machinename/portal/server.pt

The gateway URLs are identified by a special substring "gateway/PTARGS_" that should follow the portal URL. So, a general gateway URL looks like:

   http://machinename/portal/server.pt/gateway/PTARGS_1_2_3_4_5_6/http://remotemachine/url_to_gateway/somefile.html

where 1,2,3,4,5,6 are numeric arguments described below.

  1. The first argument in an integer that contains a bitmask of gateway flags and type of associated gadget content that is being requested.
  2. The second argument is a numeric id of the user requesting the page. This argument is not used by the gateway and is intended for PPC PTTracker tool that analyzes the logs from the webserver. If user id is not known you can set it to any value, but 0 is prefered.
  3. The third argument is a numeric id of the object that is being requested. For example, if you are requesting a page through gadget 201, then this argument should be set to 201.
  4. The fourth argument is a community id.
  5. The fifth arguemnt is a page id.
  6. The sixth argument is a resource type id. It defines what kind of object is identified by the object id provided in the third argument. Refer to Plumtree.idl to see what are numeric values for various resource types. Gateway supports the following resource types: Gadget, WebService, Card, DataSource.

Author:
daniilk

Field Summary
static int ADMINPLUGPAGE
           
static int ADMINPREFS
           
static int ADMINPREFS_POPUP
           
static java.lang.String CLOSEPOPUPANDREFRESHJAVASCRIPT
           
static java.lang.String CLOSEPOPUPJAVASCRIPT
           
static int COMMUNITYPREFS
           
static int COMMUNITYPREFS_POPUP
           
static java.lang.String DEFAULT_FRIENDLYGATEWAYURL_KEYWORD
           
static java.lang.String DEV_SUFFIX_PDA
           
static java.lang.String DEV_SUFFIX_WML
           
static int GADGETPREFS
           
static int GADGETPREFS_POPUP
           
static java.lang.String GATEWAY_ARG_DELIMITER
           
static java.lang.String GATEWAY_FRIENDLYURL_KEYWORD
          this variable is set in the static intializer for this class
static java.lang.String GATEWAY_HOSTED_MODE_HEADER
           
static java.lang.String GATEWAY_SPACE_NAME
           
static java.lang.String GATEWAY_URL_PREFIX
           
static java.lang.String GWARG_COMMUNITY_PREFIX
           
static java.lang.String GWARG_PAGE_PREFIX
           
static java.lang.String GWARG_PORTLET_PREFIX
           
static java.lang.String GWARG_PREFTYPE_PREFIX
           
static java.lang.String GWARG_USER_PREFIX
           
static java.lang.String GWARG_WEBSRV_PREFIX
           
static int HELP
           
static int HELP_POPUP
           
static java.lang.String LAST_VISITED_HOSTED_PAGE
           
static int NOFLAGS
           
static java.lang.String OPENCONFIG_ALLOW_EXTGWREDIRECTS
           
static java.lang.String OPENCONFIG_GATEWAY_COMPONENT
           
static int POPUPFLAG
           
static int POPUPREFRESHFLAG
           
static java.lang.String PORTLET_SAVED_ON_SESSION
           
static int PORTLETCONTENT
           
static java.lang.String PT_CLIENT_SIDE_HEADER_VALUE
           
static java.lang.String PT_PORTLET_REFRESH_HEADER_VALUE
           
static java.lang.String PT_REFERER_HEADER
           
static java.lang.String PT_REQUEST_TYPE_HEADER
           
static int REDIRECTGUEST
           
static int REFRESHFLAG
           
static int RETURNFLAG
           
static java.lang.String SPECIAL_HEADER_NAME
           
static java.lang.String UI_508
           
static java.lang.String UI_LOW
           
static java.lang.String UI_PDA
           
static java.lang.String UI_STD
           
static java.lang.String UI_WML
           
static java.lang.String URL_SEPARATOR
           
static int USERPLUGPAGE
           
 
Constructor Summary
GatewayHelpers()
           
 
Method Summary
static java.lang.String ConstructAdminPrefsLink(AActivitySpace asOwner)
          This function returns absolute URL to the admin prefs page and treats it as popup.
static java.lang.String ConstructAdminPrefsLink(AActivitySpace asOwner, boolean bPopup)
          This function returns absolute URL to the admin prefs page.
static java.lang.String ConstructCommunityPrefsLink(AActivitySpace asOwner, int iPortletID, int iCommunityID, boolean bPopup)
          This function returns absolute URL to the community prefs page.
static java.lang.String ConstructCommunityPrefsLink(AActivitySpace asOwner, int iPortletID, int iCommunityID, int iPageID, boolean bPopup)
          This function returns absolute URL to the community prefs page.
static java.lang.String ConstructFriendlyGatewayURL(java.lang.String appBaseUrl, int objId, int commId, int pageId, int prefType, int classId, int userId, java.lang.String gatewayPath)
          This method generates a gateway URL pointing to a resource specified by strURLToGateway parameter.
static java.lang.String ConstructGatewayURL(java.lang.String curReqUrl, int objId, int commId, int pageId, int prefType, int classId, int userId, java.lang.String gatewayPath)
          This method generates a gateway URL pointing to a resource specified by strURLToGateway parameter.
static java.lang.String ConstructGatewayURL(java.lang.String strCurrentRequestURL, int iPortletID, int iCommunityID, int iPageID, int iPrefType, int iClassID, java.lang.String strURLToGateway)
          This method generates a gateway URL pointing to a resource specified by strURLToGateway parameter.
static java.lang.String ConstructHelpLink(AActivitySpace asOwner, int iPortletID, int iCommunityID, int iPageID, boolean bPopup)
          This function returns absolute URL to the help page.
static java.lang.String ConstructPartialFriendlyGatewayURLKeyword(java.lang.String appBaseUrl, int prefType, int userId)
          Used by AppDataObject to creates a partial gateway url with just the preference type and user id to send to the server, which will complete out the second half of the gateway url.
static java.lang.String ConstructPartialGatewayURL(java.lang.String appBaseUrl, int prefType, int userId)
          Used by AppDataObject to creates a partial gateway url with just the preference type and user id to send to the server, which will complete out the second half of the gateway url.
static java.lang.String ConstructPortletPrefsLink(AActivitySpace asOwner, int iPortletID, boolean bPopup)
          This function returns absolute URL to the gadget prefs page.
static java.lang.String ConstructPortletPrefsLink(AActivitySpace asOwner, int iPortletID, int iPageID, boolean bPopup)
          This function returns absolute URL to the gadget prefs page.
static java.lang.String ConstructPortletUserCommunityPrefsLink(AActivitySpace asOwner, int iPortletID, int iCommunityID, boolean bPopup)
          This function returns absolute URL to the community user prefs page.
static java.lang.String ConstructPrefPageLink(AActivitySpace asOwner, int iPortletID, int iCommunityID, int iPageID, int iPrefType)
          This method constructs gateway URL that points to a specific associated resource (preference page, help page).
static java.lang.String ConstructPrefPageLink(AActivitySpace asOwner, int iPortletID, int iCommunityID, int iPageID, int iPrefType, int iClassID)
          This method constructs gateway URL that points to a specific associated resource (preference page, help page).
static java.lang.String ConstructRegularGatewayURL(java.lang.String strAppBaseURL, int objId, int commId, int pageId, int prefType, int classId, int userId, java.lang.String gatewayPath)
          This method generates a gateway URL pointing to a resource specified by strURLToGateway parameter.
static java.lang.String ConstructReturnURI(AActivitySpace asOwner, int iPageID, int iCommunityID, boolean bPopup, boolean bRefreshPopup)
          procedure: ConstructReturnURI purpose:
static java.lang.String ConstructTemplateAdminPrefsLink(AActivitySpace asOwner, boolean bPopup)
          This function returns absolute URL to the admin prefs page.
static java.lang.String ConvertToRegularGatewayURL(java.lang.String friendlyUrl, java.lang.String keyword)
          Converts a friendly gateway url to regular.
static java.lang.String CreateGatewayFriendlyURL(java.lang.String strURL)
          Helper function to encode
static java.lang.String GetFriendlyGatewayURLKeyword()
           
static int GetId(java.lang.String stringId)
          Return 0 if the excpected id is not numeric
static java.lang.String GetUIMode(IXPRequest xpRequest, AActivitySpace asOwner)
          This method is used to determine the current UI mode of the portal.
static boolean IsFriendlyGatewayURL(java.lang.String url, java.lang.String keyword)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPECIAL_HEADER_NAME

public static final java.lang.String SPECIAL_HEADER_NAME
See Also:
Constant Field Values

GATEWAY_URL_PREFIX

public static final java.lang.String GATEWAY_URL_PREFIX
See Also:
Constant Field Values

GATEWAY_FRIENDLYURL_KEYWORD

public static java.lang.String GATEWAY_FRIENDLYURL_KEYWORD
this variable is set in the static intializer for this class


GATEWAY_ARG_DELIMITER

public static final java.lang.String GATEWAY_ARG_DELIMITER
See Also:
Constant Field Values

PORTLET_SAVED_ON_SESSION

public static final java.lang.String PORTLET_SAVED_ON_SESSION
See Also:
Constant Field Values

LAST_VISITED_HOSTED_PAGE

public static final java.lang.String LAST_VISITED_HOSTED_PAGE
See Also:
Constant Field Values

GATEWAY_HOSTED_MODE_HEADER

public static final java.lang.String GATEWAY_HOSTED_MODE_HEADER
See Also:
Constant Field Values

GATEWAY_SPACE_NAME

public static final java.lang.String GATEWAY_SPACE_NAME
See Also:
Constant Field Values

NOFLAGS

public static final int NOFLAGS
See Also:
Constant Field Values

POPUPFLAG

public static final int POPUPFLAG
See Also:
Constant Field Values

RETURNFLAG

public static final int RETURNFLAG
See Also:
Constant Field Values

REDIRECTGUEST

public static final int REDIRECTGUEST
See Also:
Constant Field Values

REFRESHFLAG

public static final int REFRESHFLAG
See Also:
Constant Field Values

POPUPREFRESHFLAG

public static final int POPUPREFRESHFLAG
See Also:
Constant Field Values

ADMINPREFS_POPUP

public static final int ADMINPREFS_POPUP

ADMINPREFS

public static final int ADMINPREFS

GADGETPREFS

public static final int GADGETPREFS

GADGETPREFS_POPUP

public static final int GADGETPREFS_POPUP

COMMUNITYPREFS

public static final int COMMUNITYPREFS

COMMUNITYPREFS_POPUP

public static final int COMMUNITYPREFS_POPUP

HELP

public static final int HELP

HELP_POPUP

public static final int HELP_POPUP

USERPLUGPAGE

public static final int USERPLUGPAGE

ADMINPLUGPAGE

public static final int ADMINPLUGPAGE

PORTLETCONTENT

public static final int PORTLETCONTENT

PT_REQUEST_TYPE_HEADER

public static final java.lang.String PT_REQUEST_TYPE_HEADER
See Also:
Constant Field Values

PT_CLIENT_SIDE_HEADER_VALUE

public static final java.lang.String PT_CLIENT_SIDE_HEADER_VALUE
See Also:
Constant Field Values

PT_PORTLET_REFRESH_HEADER_VALUE

public static final java.lang.String PT_PORTLET_REFRESH_HEADER_VALUE
See Also:
Constant Field Values

PT_REFERER_HEADER

public static final java.lang.String PT_REFERER_HEADER
See Also:
Constant Field Values

CLOSEPOPUPJAVASCRIPT

public static final java.lang.String CLOSEPOPUPJAVASCRIPT
See Also:
Constant Field Values

CLOSEPOPUPANDREFRESHJAVASCRIPT

public static final java.lang.String CLOSEPOPUPANDREFRESHJAVASCRIPT
See Also:
Constant Field Values

UI_STD

public static final java.lang.String UI_STD
See Also:
Constant Field Values

UI_508

public static final java.lang.String UI_508
See Also:
Constant Field Values

UI_LOW

public static final java.lang.String UI_LOW
See Also:
Constant Field Values

UI_WML

public static final java.lang.String UI_WML
See Also:
Constant Field Values

UI_PDA

public static final java.lang.String UI_PDA
See Also:
Constant Field Values

DEV_SUFFIX_PDA

public static final java.lang.String DEV_SUFFIX_PDA
See Also:
Constant Field Values

DEV_SUFFIX_WML

public static final java.lang.String DEV_SUFFIX_WML
See Also:
Constant Field Values

DEFAULT_FRIENDLYGATEWAYURL_KEYWORD

public static final java.lang.String DEFAULT_FRIENDLYGATEWAYURL_KEYWORD
See Also:
Constant Field Values

URL_SEPARATOR

public static final java.lang.String URL_SEPARATOR
See Also:
Constant Field Values

GWARG_PORTLET_PREFIX

public static final java.lang.String GWARG_PORTLET_PREFIX

GWARG_WEBSRV_PREFIX

public static final java.lang.String GWARG_WEBSRV_PREFIX

GWARG_COMMUNITY_PREFIX

public static final java.lang.String GWARG_COMMUNITY_PREFIX

GWARG_PAGE_PREFIX

public static final java.lang.String GWARG_PAGE_PREFIX

GWARG_PREFTYPE_PREFIX

public static final java.lang.String GWARG_PREFTYPE_PREFIX

GWARG_USER_PREFIX

public static final java.lang.String GWARG_USER_PREFIX

OPENCONFIG_GATEWAY_COMPONENT

public static final java.lang.String OPENCONFIG_GATEWAY_COMPONENT
See Also:
Constant Field Values

OPENCONFIG_ALLOW_EXTGWREDIRECTS

public static final java.lang.String OPENCONFIG_ALLOW_EXTGWREDIRECTS
See Also:
Constant Field Values
Constructor Detail

GatewayHelpers

public GatewayHelpers()
Method Detail

GetUIMode

public static java.lang.String GetUIMode(IXPRequest xpRequest,
                                         AActivitySpace asOwner)
This method is used to determine the current UI mode of the portal. UI mode depends both on the user setting (Standard, 508, Low Bandwidth) and type of browser (PDA, Phone or full-featured browser like IE or Mozilla).

Parameters:
xpRequest - - current request object
asOwner - - current activity space
Returns:
This method returns one of the following string constants: UI_STD, UI_508, UI_LOW, UI_WML, UI_PDA

ConstructAdminPrefsLink

public static java.lang.String ConstructAdminPrefsLink(AActivitySpace asOwner,
                                                       boolean bPopup)
This function returns absolute URL to the admin prefs page.

Parameters:
bPopup - - boolean flag to indicate if the admin page will be displayed in a separate popup window or not. All this flag does is tells gateway to set Return-URI action to "close window".

ConstructTemplateAdminPrefsLink

public static java.lang.String ConstructTemplateAdminPrefsLink(AActivitySpace asOwner,
                                                               boolean bPopup)
This function returns absolute URL to the admin prefs page.

Parameters:
bPopup - - boolean flag to indicate if the admin page will be displayed in a separate popup window or not. All this flag does is tells gateway to set Return-URI action to "close window".

ConstructAdminPrefsLink

public static java.lang.String ConstructAdminPrefsLink(AActivitySpace asOwner)
This function returns absolute URL to the admin prefs page and treats it as popup.


ConstructCommunityPrefsLink

public static java.lang.String ConstructCommunityPrefsLink(AActivitySpace asOwner,
                                                           int iPortletID,
                                                           int iCommunityID,
                                                           boolean bPopup)
This function returns absolute URL to the community prefs page.

Parameters:
iPortletID - - ID of the portlet for which the gadget community preferences are set
iCommunityID - - ID of the community for which the gadget community preferences are set
bPopup - - boolean flag to indicate if the pref page will be displayed in a separate popup window or not. All this flag does is tells gateway to set Return-URI action to "close window".

ConstructCommunityPrefsLink

public static java.lang.String ConstructCommunityPrefsLink(AActivitySpace asOwner,
                                                           int iPortletID,
                                                           int iCommunityID,
                                                           int iPageID,
                                                           boolean bPopup)
This function returns absolute URL to the community prefs page.

Parameters:
iPortletID - - ID of the portlet for which the gadget community preferences are set
iCommunityID - - ID of the community for which the gadget community preferences are set
iPageID - - ID of the community page which the gadget community preferences are set
bPopup - - boolean flag to indicate if the pref page will be displayed in a separate popup window or not. All this flag does is tells gateway to set Return-URI action to "close window".

ConstructPortletPrefsLink

public static java.lang.String ConstructPortletPrefsLink(AActivitySpace asOwner,
                                                         int iPortletID,
                                                         boolean bPopup)
This function returns absolute URL to the gadget prefs page.

Parameters:
iPortletID - - ID of the portlet for which the gadget preferences are set
bPopup - - boolean flag to indicate if the pref page will be displayed in a separate popup window or not. All this flag does is tells gateway to set Return-URI action to "close window".

ConstructPortletPrefsLink

public static java.lang.String ConstructPortletPrefsLink(AActivitySpace asOwner,
                                                         int iPortletID,
                                                         int iPageID,
                                                         boolean bPopup)
This function returns absolute URL to the gadget prefs page.

Parameters:
iPortletID - - ID of the portlet for which the gadget preferences are set
iPageID - - ID of the community page which the gadget preferences are set
bPopup - - boolean flag to indicate if the pref page will be displayed in a separate popup window or not. All this flag does is tells gateway to set Return-URI action to "close window".

ConstructPortletUserCommunityPrefsLink

public static java.lang.String ConstructPortletUserCommunityPrefsLink(AActivitySpace asOwner,
                                                                      int iPortletID,
                                                                      int iCommunityID,
                                                                      boolean bPopup)
This function returns absolute URL to the community user prefs page.

Parameters:
iPortletID - - ID of the portlet for which the gadget community user preferences are set
iCommunityID - - ID of the community for which the gadget community user preferences are set
iPageID - - ID of the community page which the gadget community user preferences are set
bPopup - - boolean flag to indicate if the prefs page will be displayed in a separate popup window or not. All this flag does is tells gateway to set Return-URI action to "close window".

ConstructHelpLink

public static java.lang.String ConstructHelpLink(AActivitySpace asOwner,
                                                 int iPortletID,
                                                 int iCommunityID,
                                                 int iPageID,
                                                 boolean bPopup)
This function returns absolute URL to the help page.

Parameters:
iPortletID - - ID of the portlet for which the help should be displayed
iCommunityID - - ID of the community for which the help should be displayed
iPageID - - ID of the community page which the help should be displayed
bPopup - - boolean flag to indicate if the help page will be displayed in a separate popup window or not. All this flag does is tells gateway to set Return-URI action to "close window".

ConstructPrefPageLink

public static java.lang.String ConstructPrefPageLink(AActivitySpace asOwner,
                                                     int iPortletID,
                                                     int iCommunityID,
                                                     int iPageID,
                                                     int iPrefType)
This method constructs gateway URL that points to a specific associated resource (preference page, help page). If this method is called with iPrefType parameter set to 0, the result is a gateway prefix that should be followed by the actual absolute URL to the gatewayed resource.

Parameters:
asOwner - - current activity space object
iPortletID - - portlet id
iCommunityID - - community ID (0 if not applicable)
iPageID - - page ID (0 if not applicable)
iPrefType - - preference type
Returns:
string that is a gateway URL.

ConstructPrefPageLink

public static java.lang.String ConstructPrefPageLink(AActivitySpace asOwner,
                                                     int iPortletID,
                                                     int iCommunityID,
                                                     int iPageID,
                                                     int iPrefType,
                                                     int iClassID)
This method constructs gateway URL that points to a specific associated resource (preference page, help page). If this method is called with iPrefType parameter set to 0, the result is a gateway prefix that should be followed by the actual absolute URL to the gatewayed resource.

Parameters:
asOwner - - current activity space object
iPortletID - - portlet or web service id
iCommunityID - - community ID (0 if not applicable)
iPageID - - page ID (0 if not applicable)
iPrefType - - preference type
iClassID - - class id that describles iPortletID parameter.
Returns:
string that is a gateway URL.

ConstructGatewayURL

public static java.lang.String ConstructGatewayURL(java.lang.String strCurrentRequestURL,
                                                   int iPortletID,
                                                   int iCommunityID,
                                                   int iPageID,
                                                   int iPrefType,
                                                   int iClassID,
                                                   java.lang.String strURLToGateway)
This method generates a gateway URL pointing to a resource specified by strURLToGateway parameter.

Parameters:
strCurrentRequestURL - - the URL of the current request (normally, the result of AActivitySpace.GetCurrentRequestURL())
iPortletID - - numeric ID of the portlet object or webservice object
iCommunityID - - community ID (0 if not applicable)
iPageID - - page ID (0 if not applicable)
iPrefType - - preference type. For normal portlet click-throughs it should be 0.
iClassID - - class ID. This arguments tells whether second argument of this method is portlet ID or webservice ID.
strURLToGateway - - absolute URL to the resource that should be gatewayed (i.e. http://www.google.com)
Returns:
- a gateway URL string that points to the resource specified.

ConstructGatewayURL

public static java.lang.String ConstructGatewayURL(java.lang.String curReqUrl,
                                                   int objId,
                                                   int commId,
                                                   int pageId,
                                                   int prefType,
                                                   int classId,
                                                   int userId,
                                                   java.lang.String gatewayPath)
This method generates a gateway URL pointing to a resource specified by strURLToGateway parameter.

Parameters:
curReqUrl - - the URL of the current request (normally, the result of AActivitySpace.GetCurrentRequestURL())
objId - - numeric ID of the portlet object or webservice object
commId - - community ID (0 if not applicable)
pageId - - page ID (0 if not applicable)
prefType - - preference type. For normal portlet click-throughs it should be 0.
classId - - This arguments tells whether second argument of this method is portlet ID or webservice ID.
userId - - user id, or 0 not to use one
gatewayPath - - absolute URL to the resource that should be gatewayed (i.e. http://www.google.com)
Returns:
- a gateway URL string that points to the resource specified.

ConstructRegularGatewayURL

public static java.lang.String ConstructRegularGatewayURL(java.lang.String strAppBaseURL,
                                                          int objId,
                                                          int commId,
                                                          int pageId,
                                                          int prefType,
                                                          int classId,
                                                          int userId,
                                                          java.lang.String gatewayPath)
This method generates a gateway URL pointing to a resource specified by strURLToGateway parameter.

Parameters:
curReqUrl - - the URL of the current request (normally, the result of AActivitySpace.GetCurrentRequestURL())
objId - - numeric ID of the portlet object or webservice object
commId - - community ID (0 if not applicable)
pageId - - page ID (0 if not applicable)
prefType - - preference type. For normal portlet click-throughs it should be 0.
classId - - This arguments tells whether second argument of this method is portlet ID or webservice ID.
userId - - user id, or 0 not to use one
gatewayPath - - absolute URL to the resource that should be gatewayed (i.e. http://www.google.com)
Returns:
- a gateway URL string that points to the resource specified.

GetFriendlyGatewayURLKeyword

public static java.lang.String GetFriendlyGatewayURLKeyword()
Returns:
null if friendly gateway urls is disabled

ConstructFriendlyGatewayURL

public static java.lang.String ConstructFriendlyGatewayURL(java.lang.String appBaseUrl,
                                                           int objId,
                                                           int commId,
                                                           int pageId,
                                                           int prefType,
                                                           int classId,
                                                           int userId,
                                                           java.lang.String gatewayPath)
This method generates a gateway URL pointing to a resource specified by strURLToGateway parameter.

Parameters:
appBaseUrl- -
objId - - numeric ID of the portlet object or webservice object
commId - - community ID (0 if not applicable)
pageId - - page ID (0 if not applicable)
prefType - - preference type. For normal portlet click-throughs it should be 0.
classId - - This arguments tells whether second argument of this method is portlet ID or webservice ID.
userId - - user id, or 0 not to use one
gatewayPath - - absolute URL to the resource that should be gatewayed (i.e. http://www.google.com)
Returns:
- a gateway URL string that points to the resource specified.

ConstructPartialGatewayURL

public static java.lang.String ConstructPartialGatewayURL(java.lang.String appBaseUrl,
                                                          int prefType,
                                                          int userId)
Used by AppDataObject to creates a partial gateway url with just the preference type and user id to send to the server, which will complete out the second half of the gateway url.

Returns:

ConstructPartialFriendlyGatewayURLKeyword

public static java.lang.String ConstructPartialFriendlyGatewayURLKeyword(java.lang.String appBaseUrl,
                                                                         int prefType,
                                                                         int userId)
Used by AppDataObject to creates a partial gateway url with just the preference type and user id to send to the server, which will complete out the second half of the gateway url. This method creates a friendly gateway url

Parameters:
appBaseUrl -
prefType -
userId -
Returns:
null if friendly gateway url is disabled

ConstructReturnURI

public static java.lang.String ConstructReturnURI(AActivitySpace asOwner,
                                                  int iPageID,
                                                  int iCommunityID,
                                                  boolean bPopup,
                                                  boolean bRefreshPopup)
procedure: ConstructReturnURI purpose:

Parameters:
asOwner -
iPageID -
iCommunityID -
bPopup -
bRefreshPopup -
Returns:

CreateGatewayFriendlyURL

public static java.lang.String CreateGatewayFriendlyURL(java.lang.String strURL)
Helper function to encode

Parameters:
strURL -
Returns:

ConvertToRegularGatewayURL

public static java.lang.String ConvertToRegularGatewayURL(java.lang.String friendlyUrl,
                                                          java.lang.String keyword)
Converts a friendly gateway url to regular. Legend: {} = required, [] = optional, | = or, <> = value Friendly format: /gw/{pt|ws}[_p][_c][_u][_r]/[] Regular format: /gateway/PTARGS______/[]

Parameters:
friendlyUrl -
keyword -
Returns:

IsFriendlyGatewayURL

public static boolean IsFriendlyGatewayURL(java.lang.String url,
                                           java.lang.String keyword)
Parameters:
url -
keyword -
Returns:

GetId

public static int GetId(java.lang.String stringId)
Return 0 if the excpected id is not numeric

Parameters:
stringId -
Returns:



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.