|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.uiinfrastructure.statichelpers.ConfigHelper
public class ConfigHelper
This class contains helper methods to get variables from the configVarPack. This is also used to get data that is generated from the config var pack, along with some logic from other places, like the image server urls. These should only be retrieved from this static helper. NOTE DonH: if the base config varpack reloads, this will not currently get reloaded. Reloading wouldn't be threadsafe anyways.
Field Summary | |
---|---|
static java.lang.String |
GATEWAY_URL
JF- This is to be able to identify a gatway URL |
static java.lang.String |
HTTP_SCHEME
JF- HTTP Scheme |
static java.lang.String |
HTTPS_SCHEME
JF- HTTPS Scheme |
static java.lang.String |
JSCOMPONENT_JSDATEPICKER
|
static java.lang.String |
JSCOMPONENT_JSPORTALMENU
|
static java.lang.String |
JSCOMPONENT_JSPORTLET
|
static java.lang.String |
JSCOMPONENT_JSROBOHELPER
|
static java.lang.String |
JSCOMPONENT_JSUTIL
|
static java.lang.String |
JSCOMPONENT_JSXML
|
Constructor Summary | |
---|---|
ConfigHelper()
|
Method Summary | |
---|---|
static java.lang.String |
GetApplicationBaseURL(AActivitySpace asSpace)
JF- Returns the Application URL according to the URL Mapping. |
static java.lang.String |
GetApplicationBaseURL(java.lang.String _sNormalizedBaseURL)
JF- Returns the Application URL according to the URL Mapping. |
static java.lang.String |
GetApplicationBaseURL(java.lang.String _sNormalizedBaseURL,
boolean _bSecure)
JF- Returns the Application URL according to the URL Mapping and the security. |
static java.lang.String |
GetApplicationBaseURLToAS(java.lang.String _sNormalizedBaseURL,
java.lang.String _sASName,
boolean _bIsSubSpace)
JF- Returns the Application URL according to the URL Mapping and determines the security according to the space name in argument. |
static HTMLElementCollection |
GetCommonJSIncludes(java.lang.String _strComponentName,
java.lang.String strLangID,
boolean _bIsSecureImgSvr)
Deprecated. Use GetCommonJSIncludes(String _strComponentName, XPLocale locale, boolean _bIsSecureImgSvr) instead |
static HTMLElementCollection |
GetCommonJSIncludes(java.lang.String _strComponentName,
java.lang.String strLangID,
boolean _bIsSecureImgSvr,
java.lang.String strIncludeType)
Deprecated. GetCommonJSIncludes(String _strComponentName, XPLocale locale, boolean _bIsSecureImgSvr, String strIncludeType) |
static int |
GetConfigVariableAsInt(java.lang.String strSection,
java.lang.String strSubSection,
java.lang.String strAttribute,
AActivitySpace space)
Helper method to access an int variable from portalconfig.xml. |
static int |
GetConfigVariableAsInt(java.lang.String strSection,
java.lang.String strSubSection,
java.lang.String strAttribute,
Application application)
Helper method to access an int variable from portalconfig.xml. |
static java.lang.String |
GetConfigVariableAsString(java.lang.String strSection,
java.lang.String strSubSection,
java.lang.String strAttribute,
AActivitySpace owner)
Helper method to access a String variable from portalconfig.xml. |
static java.lang.String |
GetConfigVariableAsString(java.lang.String strSection,
java.lang.String strSubSection,
java.lang.String strAttribute,
IApplication app)
Helper method to access a String variable from portalconfig.xml. |
static java.lang.Object[] |
GetConfigVariables(java.lang.String strSection,
java.lang.String strSubSection,
java.lang.String strAttribute,
AActivitySpace space)
Helper method to access a String variable from portalconfig.xml. |
static java.lang.Object[] |
GetConfigVariables(java.lang.String strSection,
java.lang.String strSubSection,
java.lang.String strAttribute,
IApplication application)
Helper method to access a String variable from portalconfig.xml. |
static java.lang.String |
GetFullAdminSiteURL()
Returns full URL to the admin site without any question mark. |
static java.lang.String |
GetHTMLDocType()
This method returns the document type specification for use with the HTMLPage objects created for each DisplayPage. |
static java.lang.String |
GetHTTPEntryPoint()
JF- Retuns the value of the HTTP Entry point from x_config.xml E.g.: server.pt |
static java.lang.String |
GetImageServerBaseURL(AActivitySpace asOwner)
This method used to return the Image Server Base URL. |
static java.lang.String |
GetImageServerBaseURL(boolean bSecure)
This method used to return the Image Server Base URL. |
static int |
GetImageserverConnectTimeout()
This method returns the imageserver connection timeout integer in seconds |
static java.lang.String |
GetImageServerRootURL(AActivitySpace asOwner)
This method used to return the Image Server Root URL. |
static java.lang.String |
GetImageServerRootURL(boolean bSecure)
This method used to return the Image Server Base URL. |
static boolean |
GetIsDotNet()
Returns whether or not the current platform is .NET. |
static boolean |
GetIsJava()
Returns whether or not the current platform is Java. |
static boolean |
GetIsSpaceSecure(boolean _bIsConnectionSecure)
Returns the security of the Activty Space. |
static java.lang.String |
GetJSIncluderComponentPath(java.lang.String strJSComponentName,
java.lang.String strImageServerURL)
|
static java.lang.String |
GetJSIncluderComponentVersion(java.lang.String strJSComponentName)
Deprecated. No use anymore, always uses LATEST Always returns "window.". |
static HTMLElementCollection |
GetJSIncluderJSComponentInclude(java.lang.String strJSComponentName,
AActivitySpace owner)
HTMLElement with a script blocks including the javascript files for the given jscomponent. |
static HTMLElementCollection |
GetJSIncluderJSComponentInclude(java.lang.String strJSComponentName,
boolean bEnableDebug,
AActivitySpace owner,
XPLocale locale)
HTMLElement with a script blocks including the javascript files for the given jscomponent. |
static java.lang.String |
GetJSIncluderVersionPrefix(java.lang.String strJSComponentName)
|
static java.lang.String |
GetMainApplicationName()
This method returns the main application name |
static java.lang.String |
GetMainServerApplicationURL(boolean _bIsSecure)
JF- Returns the Main server URL from x_config.xml |
static java.lang.String |
GetNormalizedBaseURL(java.lang.String _sURL)
DLH- Helper method to return the normalized base URL for use in determining the correct application base url. |
static boolean |
GetPerformanceCommentsEnabled()
Returns whether or not the performance metrics comments displayed in the HTML source at the end of each page are enabled. |
static boolean |
GetPerformanceStacktracesEnabled()
Returns whether or not the performance metrics stacktraces displayed in the HTML source at the end of each page are enabled. |
static java.lang.String |
GetPortalImageServerBaseURL(AActivitySpace asOwner)
This method used to return the Portal Image Server Base URL. |
static java.lang.String |
GetPortalImageServerBaseURL(boolean bSecure)
This method used to return the Portal Image Server Base URL. |
static java.lang.String |
GetPortalImageServerConnectionURL(AActivitySpace asOwner)
This method returns the Image Server Connection URL. |
static java.lang.String |
GetPortalImageServerHelpURL(AActivitySpace asOwner)
This method used to return the Portal Image Server Help URL. |
static java.lang.String |
GetPortalImageServerHelpURL(boolean bSecure)
This method used to return the Portal Image Server Help URL. |
static java.lang.String |
GetPortalImageServerImagesURL(AActivitySpace asOwner)
This method used to return the Portal Image Server Images URL. |
static java.lang.String |
GetPortalImageServerImagesURL(boolean bSecure)
This method used to return the Portal Image Server Images URL. |
static java.lang.String |
GetPortalImageServerJavaScriptURL(AActivitySpace asOwner)
This method used to return the Portal Image Server JavaScript URL. |
static java.lang.String |
GetPortalImageServerJavaScriptURL(boolean bSecure)
This method used to return the Portal Image Server JavaScript URL. |
static XPResourceManager |
GetResourceManager()
|
static int |
GetSecurityMode()
Returns the security mode value from portalconfig.xml. |
static java.lang.String |
GetSharedImageServerBaseURL(AActivitySpace asOwner)
This method used to return the Shared Image Server Base URL. |
static java.lang.String |
GetSharedImageServerBaseURL(boolean bSecure)
This method used to return the Shared Image Server Base URL. |
static java.lang.String |
GetSharedImageServerImagesURL(AActivitySpace asOwner)
This method used to return the Shared Image Server Images URL. |
static java.lang.String |
GetSharedImageServerImagesURL(boolean bSecure)
This method used to return the Shared Image Server Images URL. |
static java.lang.String |
GetSharedImageServerJavaScriptURL(AActivitySpace asOwner)
This method used to return the Shared Image Server JavaScript URL. |
static java.lang.String |
GetSharedImageServerJavaScriptURL(boolean bSecure)
This method used to return the Shared Image Server JavaScript URL. |
static java.lang.String |
GetSharedImageServerStylesURL(AActivitySpace asOwner)
This method used to return the Shared Image Server Styles URL. |
static java.lang.String |
GetSharedImageServerStylesURL(boolean bSecure)
This method used to return the Shared Image Server Styles URL. |
static java.lang.String |
GetStyleSheetsBaseURL(AActivitySpace asOwner)
Returns the base URL to the style sheets on the image server. |
static java.lang.String |
GetStyleSheetsBaseURL(boolean bSecure)
Returns the base URL to the style sheets on the image server. |
static IClassTypeManager |
GetTypeDescrManager()
This method returns the class type description manager. |
static boolean |
IsGoingToSubSpace(Redirect _myRedirect)
Helper method to know whether the Redirect is going to a sub space of the current space of no. |
static boolean |
IsInitialized()
Whether or not the config helper has been initialized properly. |
static boolean |
IsLoginTokenSecure(java.lang.String strCurrentRequestURL)
JF- Helper method to figure out if the login cookie should be secure or not. |
static boolean |
IsSpaceSecured(java.lang.String _sASName)
Returns true if this AS shoudl be accessed through HTTPS. |
static ReturnValue |
StaticInit(java.lang.String strApplicationName,
ConfigVarPack vpConfig,
ImgSvrURLHelper ptImageServerHelper)
Static init method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String HTTP_SCHEME
public static final java.lang.String HTTPS_SCHEME
public static final java.lang.String GATEWAY_URL
public static final java.lang.String JSCOMPONENT_JSXML
public static final java.lang.String JSCOMPONENT_JSPORTLET
public static final java.lang.String JSCOMPONENT_JSUTIL
public static final java.lang.String JSCOMPONENT_JSDATEPICKER
public static final java.lang.String JSCOMPONENT_JSPORTALMENU
public static final java.lang.String JSCOMPONENT_JSROBOHELPER
Constructor Detail |
---|
public ConfigHelper()
Method Detail |
---|
public static ReturnValue StaticInit(java.lang.String strApplicationName, ConfigVarPack vpConfig, ImgSvrURLHelper ptImageServerHelper)
String
- the main application nameConfigVarPack
- ImgSvrURLHelper
-
public static boolean IsInitialized()
public static final java.lang.String GetApplicationBaseURL(java.lang.String _sNormalizedBaseURL, boolean _bSecure)
_sNormalizedBaseURL
- the normalized base URL from the current request._bSecure
- HTTP or HTTPS
public static final java.lang.String GetApplicationBaseURL(AActivitySpace asSpace)
AActivitySpace
- the current activity space.
public static final java.lang.String GetApplicationBaseURL(java.lang.String _sNormalizedBaseURL)
_sNormalizedBaseURL
- Normalized Base URL from the AActivity Space
(or ConfigHelper.GetNormalizedBaseURL).
public static final java.lang.String GetApplicationBaseURLToAS(java.lang.String _sNormalizedBaseURL, java.lang.String _sASName, boolean _bIsSubSpace)
_sNormalizedBaseURL
- Normalized Base URL from the AActivity Space.
(or ConfigHelper.GetNormalizedBaseURL)._sASName
- Name of the destination Activity Space_bIsSubSpace
- Is the target AS a sub space?
public static final java.lang.String GetMainServerApplicationURL(boolean _bIsSecure)
_bIsSecure
- HTTP or HTTPS
public static final java.lang.String GetHTTPEntryPoint()
public static final boolean GetPerformanceCommentsEnabled()
public static final boolean GetPerformanceStacktracesEnabled()
public static final boolean GetIsSpaceSecure(boolean _bIsConnectionSecure)
_bIsConnectionSecure
-
public static final boolean IsGoingToSubSpace(Redirect _myRedirect)
_myRedirect
-
public static final java.lang.String GetNormalizedBaseURL(java.lang.String _sURL)
_sURL
-
public static final int GetImageserverConnectTimeout()
public static final java.lang.String GetMainApplicationName()
public static final java.lang.String GetHTMLDocType()
public static final java.lang.String GetImageServerRootURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetImageServerRootURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final java.lang.String GetImageServerBaseURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetImageServerBaseURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final java.lang.String GetSharedImageServerBaseURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetSharedImageServerBaseURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final java.lang.String GetSharedImageServerImagesURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetSharedImageServerImagesURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final java.lang.String GetSharedImageServerJavaScriptURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetSharedImageServerJavaScriptURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final java.lang.String GetSharedImageServerStylesURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetSharedImageServerStylesURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final java.lang.String GetStyleSheetsBaseURL(AActivitySpace asOwner)
AActivitySpace
- current AS
public static final java.lang.String GetStyleSheetsBaseURL(boolean bSecure)
bSecure
- security of the URL
public static final java.lang.String GetPortalImageServerBaseURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetPortalImageServerConnectionURL(AActivitySpace asOwner)
public static final java.lang.String GetPortalImageServerBaseURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final java.lang.String GetPortalImageServerImagesURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetPortalImageServerImagesURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final java.lang.String GetPortalImageServerJavaScriptURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetPortalImageServerJavaScriptURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final java.lang.String GetPortalImageServerHelpURL(boolean bSecure)
boolean
- true implies secure
public static final java.lang.String GetPortalImageServerHelpURL(AActivitySpace asOwner)
AActivitySpace
- the space that this image is in.
public static final HTMLElementCollection GetCommonJSIncludes(java.lang.String _strComponentName, java.lang.String strLangID, boolean _bIsSecureImgSvr)
_strComponentName
- strLang
- _bIsSecureImgSvr
-
public static final HTMLElementCollection GetCommonJSIncludes(java.lang.String _strComponentName, java.lang.String strLangID, boolean _bIsSecureImgSvr, java.lang.String strIncludeType)
_strComponentName
- locale
- _bIsSecureImgSvr
- strIncludeType
-
public static java.lang.String GetJSIncluderComponentVersion(java.lang.String strJSComponentName)
strComponentName
- Name of the jscomponent with . Example: "jsutil", "jsxml"
public static java.lang.String GetJSIncluderVersionPrefix(java.lang.String strJSComponentName)
strJSComponentName
- JSComponent name included through JSIncluder Example: " jsxml" or "jsutil"
public static java.lang.String GetJSIncluderComponentPath(java.lang.String strJSComponentName, java.lang.String strImageServerURL)
public static HTMLElementCollection GetJSIncluderJSComponentInclude(java.lang.String strJSComponentName, AActivitySpace owner)
strJSComponentName
- JSComponent name. For example "jsxml" or "jsutil", the common components have constants defined in ConfigHelper.owner
- Current activityspace
public static HTMLElementCollection GetJSIncluderJSComponentInclude(java.lang.String strJSComponentName, boolean bEnableDebug, AActivitySpace owner, XPLocale locale)
strJSComponentName
- JSComponent name. For example "jsxml" or "jsutil", the common components have constants defined in ConfigHelper.owner
- Current activityspace
public static int GetConfigVariableAsInt(java.lang.String strSection, java.lang.String strSubSection, java.lang.String strAttribute, AActivitySpace space)
strSection
- strSectionstrSubSection
- strSubSectionstrAttribute
- strAttributespace
- the current space
public static int GetConfigVariableAsInt(java.lang.String strSection, java.lang.String strSubSection, java.lang.String strAttribute, Application application)
strSection
- strSectionstrSubSection
- strSubSectionstrAttribute
- strAttributespace
- the current space
public static java.lang.String GetConfigVariableAsString(java.lang.String strSection, java.lang.String strSubSection, java.lang.String strAttribute, AActivitySpace owner)
strSection
- strSubSection
- strAttribute
- owner
- Current Activityspace
String
with the requested variable value, or null
if the variable is not found, or cannot be retrieved.public static java.lang.String GetConfigVariableAsString(java.lang.String strSection, java.lang.String strSubSection, java.lang.String strAttribute, IApplication app)
strSection
- strSubSection
- strAttribute
- application
- the current IApplication
String
with the requested variable value, or null
if the variable is not found, or cannot be retrieved.public static java.lang.Object[] GetConfigVariables(java.lang.String strSection, java.lang.String strSubSection, java.lang.String strAttribute, AActivitySpace space)
strSection
- strSectionstrSubSection
- strSubSectionstrAttribute
- strAttributespace
- the current space
public static java.lang.Object[] GetConfigVariables(java.lang.String strSection, java.lang.String strSubSection, java.lang.String strAttribute, IApplication application)
strSection
- strSectionstrSubSection
- strSubSectionstrAttribute
- strAttributespace
- the current space
public static final java.lang.String GetFullAdminSiteURL()
public static final XPResourceManager GetResourceManager()
public static final int GetSecurityMode()
public static final IClassTypeManager GetTypeDescrManager()
public static final boolean IsSpaceSecured(java.lang.String _sASName)
_sASName
-
public static boolean IsLoginTokenSecure(java.lang.String strCurrentRequestURL)
public static final boolean GetIsDotNet()
public static final boolean GetIsJava()
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |