Class PortalContext
- java.lang.Object
-
- lumis.portal.PortalContext
-
public class PortalContext extends java.lang.Object
Portal Context. Contains global portal configuration information- Since:
- 4.0.0
- Version:
- $Revision: 24030 $ $Date: 2020-08-14 13:52:18 -0300 (Fri, 14 Aug 2020) $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PortalContext.RelativePath
Deprecated.Since 4.1.0, replaced byPortalFilePath
.static class
PortalContext.RelativePathType
Deprecated.Since 4.1.0, replaced byPortalBaseFolder
.
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_LOADING_HTML_MESSAGE
static int
MODE_ADMIN
Deprecated.Since 6.0.0 due changes in the portal presentation.static int
MODE_USER
Deprecated.Since 6.0.0 due changes in the portal presentation.static java.lang.String
SHARED_FOLDER_NAME
Shared folder name.
-
Constructor Summary
Constructors Constructor Description PortalContext()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static org.w3c.dom.Node
getApplicationServerConfig()
static BuildConfig
getBuildConfig()
static int
getCacheDefaultCapacity()
Returns the default capacity for portal's caches.static java.lang.String
getCacheOverflowType()
Returns the overflow type for portal's caches.static int
getClockTickInterval()
static org.w3c.dom.Node
getClusterConfig()
static java.lang.String
getConfigPath(java.lang.String relativePath)
static org.w3c.dom.Node
getCookieConfig()
Get Node of all cookies options, if wasn't set at lumispotalconfig.xml, will get the default cookies options.static java.lang.String
getDataPath(java.lang.String relativePath)
Deprecated.since 8.0.0 usefilesystem API
to perform filesystem operations in portal known files.static java.util.Locale
getDefaultLocale()
Deprecated.since 8.1.0 replaced byILocalizationManager.getDefaultLocale()
static PageDocType
getDefaultPageDocType()
static java.lang.String
getDefinitionPath(java.lang.String relativePath)
Deprecated.since 8.0.0 usefilesystem API
to perform filesystem operations in portal known files.static org.w3c.dom.Node
getDeviceDetectionNode()
Returns the Device Detection node that was defined on lumisPortalConfig.static org.w3c.dom.Node
getEncryptionConfig()
static java.lang.String
getErrorPage()
static int
getExecutorMaxThreads()
Returns the maximum number of threads to be kept alive byIExecutorManager
.static int
getExecutorMinThreads()
Returns the minimum number of threads to be kept alive byIExecutorManager
.static java.lang.String
getFFMPEGExecutablePath()
Returns the absolute file path of the FFMPEG customized by the user.static java.util.regex.Pattern
getFileUploadDeniedExtensionsPattern()
Returns the pattern for matching file extensions whose upload are to be denied.static java.lang.String
getFrameworkUrl()
Deprecated.Since 6.2.0, replaced byIWebsite.getMainNonSecureBaseURL()
due to the inclusion of multiple websites.static HtmlGenerationConfig
getHtmlGenerationConfig()
Returns the configuration for the html generation.static java.lang.String
getHttpAuthenticator()
Returns the configuredIHttpAuthenticator
class name.static java.lang.String
getInterfaceTitleBarStyle()
static java.lang.Integer
getLayoutFilePollIntervalSecs()
Returns the polling interval for changes in a layout file, in seconds.static java.lang.String
getLoadingHtmlMessage()
static java.lang.String
getLocalDataPath(java.lang.String relativePath)
Returns the local data path.static int
getLockDefaultDeadlineMinutes()
static java.lang.String
getLoginValidator()
static int
getMajorVersion()
Returns the major version of the portal.static long
getMaxFileUploadSize()
Returns the maximum size for file uploads.static int
getMinorVersion()
Returns the minor version of the portal.static java.lang.String
getNonSSLConnectorPort()
Deprecated.Since 6.2.0, replaced byIWebsite.getMainNonSecureBaseURL()
due to the inclusion of multiple websites.static java.lang.String
getPortalInfo()
Returns the name and version of the portal.static java.lang.String
getRealPath(java.lang.String relativePath)
Deprecated.Since 6.2.0, replaced byIWebsite.getWebRootBaseFolder()
due to the inclusion of multiple websites, and consequently, multiple web roots.static java.lang.String
getRootPath()
Deprecated.Since 6.2.0, replaced byIWebsite.getWebRootBaseFolder()
due to the inclusion of multiple websites, and consequently, multiple web roots.static java.lang.String
getSecurityAlias()
static java.lang.String
getServerId()
Returns the server id of the current server.static ServiceContainer
getServiceContainer()
Returns the service container associated with this portal application.static int
getSessionTimeout()
Returns the maximum amount of time (in minutes) a session can be inactive before it expires.static java.lang.String
getSimpleVersion()
Returns a simplified version of product's version (in the form <major>.<minor>.<release>).static java.lang.String
getSSLConnectorPort()
Deprecated.Since 6.2.0, replaced byIWebsite.getMainSecureBaseURL()
due to the inclusion of multiple websites.static int
getTransactionLogAbandonedTimeout()
Returns the timeout for the logging of long-lived transactions.static java.lang.String
getWebAppRelativePath(java.lang.String absolutePath)
Deprecated.Since 6.2.0, replaced byIPortalBaseFolder.getRelativePath(String)
in website'sweb root base folder
, due to the inclusion of multiple websites, and consequently, multiple web roots.static java.lang.String
getWebInfPath(java.lang.String relativePath)
Deprecated.Data is not stored in WEB-INF anymore, so this method should not be used.static boolean
isCacheStandardMembershipBulkLoadEnabled()
Returns whether the bulk load for the standard membership cache is enabled.static boolean
isCacheUserSegmentationMembershipBulkLoadEnabled()
Returns whether the bulk load for the user segmentation membership cache is enabled.static boolean
isClockEnabled()
static boolean
isSupportMultiLanguage()
static void
setSupportMultiLanguage(boolean supportMultiLanguage)
-
-
-
Field Detail
-
SHARED_FOLDER_NAME
public static final java.lang.String SHARED_FOLDER_NAME
Shared folder name.- Since:
- 8.0.0
- See Also:
- Constant Field Values
-
MODE_USER
@Deprecated public static final int MODE_USER
Deprecated.Since 6.0.0 due changes in the portal presentation.- See Also:
PortalModes
-
MODE_ADMIN
@Deprecated public static final int MODE_ADMIN
Deprecated.Since 6.0.0 due changes in the portal presentation.- See Also:
PortalModes
-
DEFAULT_LOADING_HTML_MESSAGE
public static final java.lang.String DEFAULT_LOADING_HTML_MESSAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultLocale
@Deprecated public static java.util.Locale getDefaultLocale()
Deprecated.since 8.1.0 replaced byILocalizationManager.getDefaultLocale()
- Returns:
- Returns the defaultLanguageId.
-
getServerId
public static java.lang.String getServerId()
Returns the server id of the current server.- Returns:
- the server id of the current server.
- Since:
- 4.1.0
-
getFrameworkUrl
@Deprecated public static java.lang.String getFrameworkUrl()
Deprecated.Since 6.2.0, replaced byIWebsite.getMainNonSecureBaseURL()
due to the inclusion of multiple websites.For best compatibility, this method resolves based on the default website's main non-secure URL. If there is no default website, it will throw an
IllegalStateException
.- Returns:
- Returns the frameworkUrl.
-
getErrorPage
public static java.lang.String getErrorPage()
-
getLoginValidator
public static java.lang.String getLoginValidator()
-
getHttpAuthenticator
public static java.lang.String getHttpAuthenticator()
Returns the configuredIHttpAuthenticator
class name.- Returns:
- the httpAuthenticator class name, or null if none was configured.
- Since:
- 4.0.10
-
getRootPath
@Deprecated public static java.lang.String getRootPath()
Deprecated.Since 6.2.0, replaced byIWebsite.getWebRootBaseFolder()
due to the inclusion of multiple websites, and consequently, multiple web roots.For best compatibility, this method resolves based on the default website's web root folder. If there is no default website, it will throw an
IllegalStateException
.- Returns:
- Returns the rootPath.
-
getMaxFileUploadSize
public static long getMaxFileUploadSize()
Returns the maximum size for file uploads.- Returns:
- the maximum size for file uploads in bytes, or -1 if there is no limit for file upload size.
-
getFileUploadDeniedExtensionsPattern
public static java.util.regex.Pattern getFileUploadDeniedExtensionsPattern()
Returns the pattern for matching file extensions whose upload are to be denied.- Returns:
- the pattern.
- Since:
- 4.2.0
-
getRealPath
@Deprecated public static java.lang.String getRealPath(java.lang.String relativePath)
Deprecated.Since 6.2.0, replaced byIWebsite.getWebRootBaseFolder()
due to the inclusion of multiple websites, and consequently, multiple web roots.For best compatibility, this method resolves based on the default website's web root folder. If there is no default website, it will throw an
IllegalStateException
.
-
getWebAppRelativePath
@Deprecated public static java.lang.String getWebAppRelativePath(java.lang.String absolutePath)
Deprecated.Since 6.2.0, replaced byIPortalBaseFolder.getRelativePath(String)
in website'sweb root base folder
, due to the inclusion of multiple websites, and consequently, multiple web roots.For best compatibility, this method resolves based on the default website's web root folder. If there is no default website, it will throw an
IllegalStateException
.
-
getDataPath
@Deprecated public static java.lang.String getDataPath(java.lang.String relativePath)
Deprecated.since 8.0.0 usefilesystem API
to perform filesystem operations in portal known files.
-
getLocalDataPath
public static java.lang.String getLocalDataPath(java.lang.String relativePath)
Returns the local data path.- Parameters:
relativePath
- the relative local data path.- Returns:
- the local data path.
- Since:
- 8.0.0
-
getConfigPath
public static java.lang.String getConfigPath(java.lang.String relativePath)
-
getDefinitionPath
@Deprecated public static java.lang.String getDefinitionPath(java.lang.String relativePath)
Deprecated.since 8.0.0 usefilesystem API
to perform filesystem operations in portal known files.
-
getWebInfPath
@Deprecated public static java.lang.String getWebInfPath(java.lang.String relativePath)
Deprecated.Data is not stored in WEB-INF anymore, so this method should not be used. Instead usegetDefinitionPath(String)
,getConfigPath(String)
, orgetDataPath(String)
.
-
getBuildConfig
public static BuildConfig getBuildConfig() throws PortalException
- Throws:
PortalException
-
getMajorVersion
public static int getMajorVersion() throws PortalException
Returns the major version of the portal.- Returns:
- the major version
- Throws:
PortalException
- See Also:
getMinorVersion()
-
getMinorVersion
public static int getMinorVersion() throws PortalException
Returns the minor version of the portal.- Returns:
- the minor version
- Throws:
PortalException
- See Also:
getMajorVersion()
-
getPortalInfo
public static java.lang.String getPortalInfo()
Returns the name and version of the portal.The form of the returned string is
portalname/versionnumber
.- Returns:
- the name and version of the portal.
- Since:
- 5.5.0.
-
getServiceContainer
public static ServiceContainer getServiceContainer()
Returns the service container associated with this portal application. Used by the presentation manager.- Returns:
- Service Container for the portal application
-
isClockEnabled
public static boolean isClockEnabled()
- Returns:
- Returns the clockEnabled.
-
getClockTickInterval
public static int getClockTickInterval()
- Returns:
- Returns the clockTickInterval.
-
getNonSSLConnectorPort
@Deprecated public static java.lang.String getNonSSLConnectorPort()
Deprecated.Since 6.2.0, replaced byIWebsite.getMainNonSecureBaseURL()
due to the inclusion of multiple websites.For best compatibility, this method resolves based on the default website's main non-secure URL. If there is no default website, it will throw an
IllegalStateException
.- Returns:
- Returns the port for http request.
-
getSSLConnectorPort
@Deprecated public static java.lang.String getSSLConnectorPort()
Deprecated.Since 6.2.0, replaced byIWebsite.getMainSecureBaseURL()
due to the inclusion of multiple websites.For best compatibility, this method resolves based on the default website's main non-secure URL. If there is no default website, it will throw an
IllegalStateException
.- Returns:
- Returns the port for https request.
-
getLockDefaultDeadlineMinutes
public static int getLockDefaultDeadlineMinutes()
- Returns:
- Returns the default lock deadline (in minutes)
-
isSupportMultiLanguage
public static boolean isSupportMultiLanguage()
-
setSupportMultiLanguage
public static void setSupportMultiLanguage(boolean supportMultiLanguage)
-
getHtmlGenerationConfig
public static HtmlGenerationConfig getHtmlGenerationConfig()
Returns the configuration for the html generation.- Returns:
- the configuration for the html generation.
- Since:
- 4.1.0
-
getClusterConfig
public static org.w3c.dom.Node getClusterConfig()
-
getApplicationServerConfig
public static org.w3c.dom.Node getApplicationServerConfig()
-
getEncryptionConfig
public static org.w3c.dom.Node getEncryptionConfig()
-
getSessionTimeout
public static int getSessionTimeout()
Returns the maximum amount of time (in minutes) a session can be inactive before it expires.- Returns:
-
getSecurityAlias
public static java.lang.String getSecurityAlias()
-
getInterfaceTitleBarStyle
public static java.lang.String getInterfaceTitleBarStyle()
-
getCacheDefaultCapacity
public static int getCacheDefaultCapacity()
Returns the default capacity for portal's caches.- Returns:
- the default capacity for portal's caches.
- Since:
- 4.0.11
- See Also:
ICacheManager
-
getCacheOverflowType
public static java.lang.String getCacheOverflowType()
Returns the overflow type for portal's caches.- Returns:
- the overflow type for portal's caches.
- Since:
- 4.0.11
-
isCacheStandardMembershipBulkLoadEnabled
public static boolean isCacheStandardMembershipBulkLoadEnabled()
Returns whether the bulk load for the standard membership cache is enabled.- Returns:
true
if enabled orfalse
if disabled.- Since:
- 10.1.1
-
isCacheUserSegmentationMembershipBulkLoadEnabled
public static boolean isCacheUserSegmentationMembershipBulkLoadEnabled()
Returns whether the bulk load for the user segmentation membership cache is enabled.- Returns:
true
if enabled orfalse
if disabled.- Since:
- 12.0.0
-
getDefaultPageDocType
public static PageDocType getDefaultPageDocType()
-
getLoadingHtmlMessage
public static java.lang.String getLoadingHtmlMessage()
-
getExecutorMinThreads
public static int getExecutorMinThreads()
Returns the minimum number of threads to be kept alive byIExecutorManager
.- Returns:
- the minimum number of threads.
- Since:
- 4.1.0
-
getExecutorMaxThreads
public static int getExecutorMaxThreads()
Returns the maximum number of threads to be kept alive byIExecutorManager
.- Returns:
- the maximum number of threads.
- Since:
- 4.1.0
-
getLayoutFilePollIntervalSecs
public static java.lang.Integer getLayoutFilePollIntervalSecs()
Returns the polling interval for changes in a layout file, in seconds.- Returns:
- a positive value indicates the polling interval in seconds;
a non-positive value indicates that polling is disabled;
null
indicates that the default for the current development mode is to be used. - Since:
- 5.6.0
-
getDeviceDetectionNode
public static org.w3c.dom.Node getDeviceDetectionNode()
Returns the Device Detection node that was defined on lumisPortalConfig. If the node wasn't defined on lumisPortalConfig the result will be null.- Returns:
- node contained the deviceDetection definition.
- Since:
- 6.0.0
-
getTransactionLogAbandonedTimeout
public static int getTransactionLogAbandonedTimeout()
Returns the timeout for the logging of long-lived transactions.If a transaction is not disposed within the specified timeout period after its creation, a warning level message is sent to the portal log. The value is in seconds. A non-positive value disables this logging feature. Default value is 600 seconds.
- Returns:
- the timeout in seconds, or a non-positive value if the logging is disabled.
- Since:
- 6.2.0
-
getFFMPEGExecutablePath
public static java.lang.String getFFMPEGExecutablePath()
Returns the absolute file path of the FFMPEG customized by the user.- Returns:
- the absolute file path of the FFMPEG customized by the user.
- Since:
- 7.0.0
-
getCookieConfig
public static org.w3c.dom.Node getCookieConfig()
Get Node of all cookies options, if wasn't set at lumispotalconfig.xml, will get the default cookies options. Default:- Returns:
- a node of all portal cookies options
- Since:
- 7.0.2
-
getSimpleVersion
public static java.lang.String getSimpleVersion() throws PortalException
Returns a simplified version of product's version (in the form <major>.<minor>.<release>).- Returns:
- a simplified version of product's version (in the form <major>.<minor>.<release>).
- Throws:
PortalException
- Since:
- 10.0.0
-
-