com.plumtree.taskapi.portalui
Class TaskAPIUIPortalConfig

java.lang.Object
  extended by com.plumtree.taskapi.portalui.TaskAPIUIPortalConfig

public class TaskAPIUIPortalConfig
extends java.lang.Object

TaskAPI functions related to Portal Configuration, includes values in portalconfig.xml


Constructor Summary
TaskAPIUIPortalConfig()
           
 
Method Summary
static java.lang.String GetApplicationBaseURL(AActivitySpace owner)
          Returns the Application URL according to the URL Mapping.
static java.lang.String GetApplicationBaseURLForFriendlyURL(AActivitySpace owner)
          Same as TaskAPIUIPortalConfig.GetApplicationBaseURL but without the trailing question mark.
static java.lang.String GetApplicationBaseURLToAS(java.lang.String strNormalizedBaseURL, java.lang.String strASName, boolean bIsSubSpace)
          Returns the Application URL according to the URL Mapping and determines the security according to the space name in argument.
static java.lang.String GetImageServerBaseURL(AActivitySpace owner)
          This method returns the Image Server Base URL.
static java.lang.String GetMainApplicationName()
          This method returns the main application name.
static int[] GetNavSettingsValueAsIntArray(java.lang.String strKey, AActivitySpace owner)
          Gets a Navigation settings from portalconfig.xml (what used to be NavigationSettings.xml in 5.x) which has a comma separated integer values.
static java.lang.String GetNavSettingsValueAsString(java.lang.String strKey, AActivitySpace owner)
          Gets a Navigation specific settings from portalconfig.xml (what used to be NavigationSettings.xml in 5.x) as a String value.
static java.lang.String[] GetNavSettingsValueAsStringArray(java.lang.String strKey, AActivitySpace owner)
          Gets a Navigation settings from portalconfig.xml (what used to be NavigationSettings.xml in 5.x) which has a comma separated strings value.
static int GetNavSettingValueAsInt(java.lang.String strKey, AActivitySpace owner)
          Gets a Navigation settings from portalconfig.xml (what used to be NavigationSettings.xml in 5.x) as an integer value.
static java.lang.String GetPortalImageServerHelpURL(AActivitySpace owner)
          This method returns the Portal Image Server Help URL.
static java.lang.String GetPortalImageServerJavaScriptURL(AActivitySpace owner)
          This method returns the Portal Image Server JavaScript URL.
static int GetPTConfigVariableAsInt(java.lang.String strSection, java.lang.String strSubSection, java.lang.String strAttribute, AActivitySpace owner)
          This method to access an integer variable from portalconfig.xml.
static java.lang.String GetPTConfigVariableAsString(java.lang.String strSection, java.lang.String strSubSection, java.lang.String strAttribute, AActivitySpace owner)
          This method to access a String variable from portalconfig.xml.
static java.lang.Object[] GetPTConfigVariables(java.lang.String strSection, java.lang.String strSubSection, java.lang.String strAttribute, AActivitySpace owner)
          This method to access a variable with multiple values from portalconfig.xml.
static int GetSecurityMode()
          Returns the security mode value as defined in portalconfig.xml.
static java.lang.String GetStyleSheetsBaseURL(AActivitySpace owner)
          Returns the base URL to the style sheets on the image server.
static IPTURL GetURLForCurrentPageHelp(AActivitySpace owner)
          Gets the URL to the Help Page for the current page.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TaskAPIUIPortalConfig

public TaskAPIUIPortalConfig()
Method Detail

GetApplicationBaseURL

public static final java.lang.String GetApplicationBaseURL(AActivitySpace owner)
Returns the Application URL according to the URL Mapping. Warning: In mode 1, it returns the non secure URL by default.

Parameters:
AActivitySpace - the current activity space.
Returns:
String with the Application Base URL

GetApplicationBaseURLForFriendlyURL

public static final java.lang.String GetApplicationBaseURLForFriendlyURL(AActivitySpace owner)
Same as TaskAPIUIPortalConfig.GetApplicationBaseURL but without the trailing question mark.

Parameters:
AActivitySpace - the current activity space.
Returns:
String with the Application Base URL and no trailing question mark

GetApplicationBaseURLToAS

public static final java.lang.String GetApplicationBaseURLToAS(java.lang.String strNormalizedBaseURL,
                                                               java.lang.String strASName,
                                                               boolean bIsSubSpace)
Returns the Application URL according to the URL Mapping and determines the security according to the space name in argument.

Parameters:
strNormalizedBaseURL - Normalized Base URL from the AActivity Space. (or ConfigHelper.GetNormalizedBaseURL).
strASName - Name of the destination Activity Space.
bIsSubSpace - Whether the target Activityspace a sub space or not?
Returns:
String with the Application Base URL.

GetPTConfigVariableAsInt

public static int GetPTConfigVariableAsInt(java.lang.String strSection,
                                           java.lang.String strSubSection,
                                           java.lang.String strAttribute,
                                           AActivitySpace owner)
This method to access an integer variable from portalconfig.xml.

Parameters:
strSection - One of the Section constants defined in ConfigConstants.
strSubSection - One of the Subsection constants defined in ConfigConstants.
strAttribute - One of the Attributes constants defined in ConfigConstants.
owner - current Activityspace.
Returns:
The requested attribute value as int
Throws:
XPException - If the requested variable is not found or cannot be retrieved.
See Also:
ConfigConstants

GetPTConfigVariableAsString

public static java.lang.String GetPTConfigVariableAsString(java.lang.String strSection,
                                                           java.lang.String strSubSection,
                                                           java.lang.String strAttribute,
                                                           AActivitySpace owner)
This method to access a String variable from portalconfig.xml.

Parameters:
strSection - One of the Section constants defined in ConfigConstants.
strSubSection - One of the Subsection constants defined in ConfigConstants.
strAttribute - One of the Attributes constants defined in ConfigConstants.
owner - current Activityspace.
Returns:
String with the requested variable value, or null if the variable is not found, or cannot be retrieved.
See Also:
ConfigConstants

GetPTConfigVariables

public static java.lang.Object[] GetPTConfigVariables(java.lang.String strSection,
                                                      java.lang.String strSubSection,
                                                      java.lang.String strAttribute,
                                                      AActivitySpace owner)
This method to access a variable with multiple values from portalconfig.xml.

Parameters:
strSection - One of the Section constants defined in ConfigConstants.
strSubSection - One of the Subsection constants defined in ConfigConstants.
strAttribute - One of the Attributes constants defined in ConfigConstants.
owner - current Activityspace.
Returns:
Object Array with values of the requested attribute, or null if the attribute was not found or could not be retrieved.

GetMainApplicationName

public static final java.lang.String GetMainApplicationName()
This method returns the main application name.

Returns:
String with the main Portal Application name.

GetImageServerBaseURL

public static final java.lang.String GetImageServerBaseURL(AActivitySpace owner)
This method returns the Image Server Base URL.

Parameters:
AActivitySpace - Current Activityspace.
Returns:
String with the image server base URL.

GetPortalImageServerJavaScriptURL

public static final java.lang.String GetPortalImageServerJavaScriptURL(AActivitySpace owner)
This method returns the Portal Image Server JavaScript URL.

Parameters:
AActivitySpace - Current Activityspace.
Returns:
String with the Portal image server JavaScript URL.

GetStyleSheetsBaseURL

public static final java.lang.String GetStyleSheetsBaseURL(AActivitySpace owner)
Returns the base URL to the style sheets on the image server.

Parameters:
AActivitySpace - Current Activityspace.
Returns:
String with the URL to the style sheets on the image server

GetPortalImageServerHelpURL

public static final java.lang.String GetPortalImageServerHelpURL(AActivitySpace owner)
This method returns the Portal Image Server Help URL.

Parameters:
AActivitySpace - Current Activityspace.
Returns:
String with the the Portal image server Help URL.

GetSecurityMode

public static final int GetSecurityMode()
Returns the security mode value as defined in portalconfig.xml.

Returns:
integer with the current Portal Security mode.

GetNavSettingValueAsInt

public static int GetNavSettingValueAsInt(java.lang.String strKey,
                                          AActivitySpace owner)
Gets a Navigation settings from portalconfig.xml (what used to be NavigationSettings.xml in 5.x) as an integer value. Navigation Settings are defined in 'portal:Navigation' the component and with the type defined in the PTNavSettingsVarPack.PORTAL_NAVIGATION_COMPONENT_TYPE constant.

Parameters:
strKey - Navigation setting attribute.
owner - Current Activityspace.
Returns:
integer with the attribute value or, -1 if the key was not found or not an integer value.

GetNavSettingsValueAsString

public static java.lang.String GetNavSettingsValueAsString(java.lang.String strKey,
                                                           AActivitySpace owner)
Gets a Navigation specific settings from portalconfig.xml (what used to be NavigationSettings.xml in 5.x) as a String value. Navigation Settings are defined in 'portal:Navigation' the component and with the type defined in the PTNavSettingsVarPack.PORTAL_NAVIGATION_COMPONENT_TYPE constant.

Parameters:
strKey - Navigation setting attribute.
owner - Current Activityspace.
Returns:
String with the attribute value, or null if the attribute was not found.

GetNavSettingsValueAsStringArray

public static java.lang.String[] GetNavSettingsValueAsStringArray(java.lang.String strKey,
                                                                  AActivitySpace owner)
Gets a Navigation settings from portalconfig.xml (what used to be NavigationSettings.xml in 5.x) which has a comma separated strings value. Example:. Navigation Settings are defined in 'portal:Navigation' the component and with the type defined in the PTNavSettingsVarPack.PORTAL_NAVIGATION_COMPONENT_TYPE constant.

Parameters:
strKey - Key to a name/value pair in NavigationSettings.xml with a comma separated string values.
owner - Current Activityspace.
Returns:
Array of Strings with the comman separated values, or null if the attribute was not found, or the comma separated values were in an invalid format.

GetNavSettingsValueAsIntArray

public static int[] GetNavSettingsValueAsIntArray(java.lang.String strKey,
                                                  AActivitySpace owner)
Gets a Navigation settings from portalconfig.xml (what used to be NavigationSettings.xml in 5.x) which has a comma separated integer values. Example:. Navigation Settings are defined in 'portal:Navigation' the component and with the type defined in the PTNavSettingsVarPack.PORTAL_NAVIGATION_COMPONENT_TYPE constant.

Parameters:
strKey - Key to a name/value pair in NavigationSettings.xml with a comma separated integer values.
owner - Current Activityspace.
Returns:
Array of ints with the comman separated values, or null if the attribute was not found, or the comma separated values were in an invalid format.

GetURLForCurrentPageHelp

public static IPTURL GetURLForCurrentPageHelp(AActivitySpace owner)
Gets the URL to the Help Page for the current page.

Parameters:
owner - Current Activityspace.
Returns:
IPTURL with URL to the Help Page for the current page. In standard display mode the url is just '#', instead a javascript call to open help in a pop-up is used. Get the javascript call with the PTURLConstants.KEY_JAVASCRIPT_ACTION. In 508 and low-bandwidth mode, a regular URL is used.



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