📄 settingsbean.java
字号:
// $Id: SettingsBean.java,v 1.13 2003/11/03 14:51:38 shuber Exp $//// ____.// __/\ ______| |__/\. _______// __ .____| | \ | +----+ \// _______| /--| | | - \ _ | : - \_________// \\______: :---| : : | : | \________>// |__\---\_____________:______: :____|____:_____\// /_____|//// . . . i n j a h i a w e t r u s t . . .////// SettingsBean//// 05.11.2000 EV added in jahia.// 19.12.2000 AK add getJspContext method.// 27.03.2001 AK clean and add javadoc infos.//// 27.07.2001 SB added getJahiaLdapDiskPathpackage org.jahia.settings;public class SettingsBean{ // this is the famous build number... private int buildNumber; // this is the list of jahia.properties server disk path and context path values... private String server; private String serverHomeDiskPath; private String jahiaWebAppsDiskPath; private String jahiaTemplatesDiskPath; private String jahiaEnginesDiskPath; private String jahiaFilesDiskPath; private String jahiaEtcDiskPath; private String jahiaVarDiskPath; private String jahiaFilesBigTextDiskPath; private String jahiaFilesTemplatesDiskPath; private String jahiaLdapDiskPath; private String jahiaNewTemplatesDiskPath; private String jahiaSharedComponentsDiskPath; private String jahiaSharedTemplatesDiskPath; private String jahiaOutputCacheConfigDiskPath; private String jahiaCoreHttpPath; private String jahiaEnginesHttpPath; private String jahiaTemplatesHttpPath; private String jspContext; private String templatesContext; private String enginesContext; private String javascriptContext; private String jahiaJavaScriptHttpPath; private String componentsDiskPath; private String jahiaWebAppsDeployerBaseURL; // this is the list of jahia.properties autodeployer values... private int jahiaWebAppsAutoDeploy; private int jahiaTemplatesAutoDeploy; // this is the list of jahia.properties mail settings values... private String mailServer; private String mailAdministrator; private String mailFrom; private int mailParanoia; // Characters encoding private boolean utf8Encoding; // activation / deactivation of output cache private boolean outputCacheActivated; private long outputCacheDefaultExpirationDelay; // activation / deactivation of site ID in URL private boolean siteIDInURL; // activation / deactivation of application dispatcher debug mode. private boolean appDebugModeOn; // Flag that indicates whether applications can inherit from Jahia session // attributes. private boolean appInheritJahiaSessionAttributes; /** * Default constructor. * * @param jSettings The JahiaPrivateSettings object, previously instanciated. */ public SettingsBean( JahiaPrivateSettings jSettings ) { this.buildNumber = jSettings.buildNumber; this.server = jSettings.server; this.serverHomeDiskPath = jSettings.serverHomeDiskPath; this.jahiaWebAppsDiskPath = jSettings.jahiaWebAppsDiskPath; this.jahiaTemplatesDiskPath = jSettings.jahiaTemplatesDiskPath; this.jahiaEnginesDiskPath = jSettings.jahiaEnginesDiskPath; this.jahiaFilesDiskPath = jSettings.jahiaFilesDiskPath; this.jahiaEtcDiskPath = jSettings.jahiaEtcDiskPath; this.jahiaVarDiskPath = jSettings.jahiaVarDiskPath; this.jahiaFilesBigTextDiskPath = jSettings.jahiaFilesBigTextDiskPath; this.jahiaFilesTemplatesDiskPath = jSettings.jahiaFilesTemplatesDiskPath; this.jahiaLdapDiskPath = jSettings.jahiaLdapDiskPath; this.jahiaNewTemplatesDiskPath = jSettings.jahiaNewTemplatesDiskPath; this.jahiaSharedComponentsDiskPath = jSettings.jahiaSharedComponentsDiskPath; this.jahiaSharedTemplatesDiskPath = jSettings.jahiaSharedTemplatesDiskPath; this.jahiaOutputCacheConfigDiskPath = jSettings.jahiaOutputCacheConfigDiskPath; this.jahiaCoreHttpPath = jSettings.jahiaCoreHttpPath; this.jahiaEnginesHttpPath = jSettings.jahiaEnginesHttpPath; this.jahiaTemplatesHttpPath = jSettings.jahiaTemplatesHttpPath; this.jahiaWebAppsAutoDeploy = jSettings.jahiaWebAppsAutoDeploy; this.jahiaTemplatesAutoDeploy = jSettings.jahiaTemplatesAutoDeploy; this.jahiaJavaScriptHttpPath = jSettings.jahiaJavaScriptHttpPath; this.componentsDiskPath = jSettings.componentsDiskPath; this.mailServer = jSettings.mail_server; this.mailAdministrator = jSettings.mail_administrator; this.mailFrom = jSettings.mail_from; this.mailParanoia = jSettings.mail_paranoia; this.jspContext = jSettings.jspContext; this.templatesContext = jSettings.templatesContext; this.enginesContext = jSettings.enginesContext; this.javascriptContext = jSettings.javascriptContext; this.utf8Encoding = jSettings.isUtf8Encoding(); this.outputCacheActivated = jSettings.isOutputCacheActivated(); this.outputCacheDefaultExpirationDelay = jSettings.getOutputCacheDefaultExpirationDelay(); this.siteIDInURL = jSettings.isSiteIDInURL(); this.appDebugModeOn = jSettings.isAppDebugModeOn(); this.appInheritJahiaSessionAttributes = jSettings.isAppInheritingJahiaSessionAttributes(); this.jahiaWebAppsDeployerBaseURL = jSettings.getJahiaWebAppsDeployerBaseURL(); } // end constructor //-------------------------------------------------------------------------- /** * Does Jahia use the Unicode Transformation Format to encode output Strings * * @return True if UTF-8 encoding, false otherwise */ public boolean isUtf8Encoding() { return this.utf8Encoding; } /** * Used to get the build number. * * @return The build number. */ public int getBuildNumber() { return buildNumber; } // end getBuildNumber /** * Used to get the server name (tomcat, orion, etc). * * @return The server name. */ public String getServer() { return server; } // end getServer /** * Used to get the server home filesystem disk path. * * @return The server home filesystem disk path. */ public String getServerHomeDiskPath() { return serverHomeDiskPath; } // end getServerHomeDiskPath /** * Used to get the web apps disk path. * * @return The web apps disk path. */ public String getJahiaWebAppsDiskPath() { return jahiaWebAppsDiskPath; } // end getJahiaWebAppsDiskPath /** * Used to get the templates disk path. * * @return The templates disk path. */ public String getJahiaTemplatesDiskPath() { return jahiaTemplatesDiskPath; } // end getJahiaTemplatesDiskPath /** * Used to get the engines disk path. * * @return The engines disk path. */ public String getJahiaEnginesDiskPath() { return jahiaEnginesDiskPath; } // end getJahiaEnginesDiskPath /** * Used to get the jahiafiles disk path. * @author Eric Vassalli * * @return The jahiafiles disk path. */ /** @todo removed by Serge Huber because of disk reorganisation */ /* public String getJahiaFilesDiskPath() { return jahiaFilesDiskPath; } // end getJahiaFilesDiskPath */ /** * Used to get the jahiafiles /etc disk path. * * @return The jahiafiles /etc disk path. */ public String getJahiaEtcDiskPath() { return jahiaEtcDiskPath; } /** * Used to get the jahiafiles /var disk path. * * @return The jahiafiles /var disk path. */ public String getJahiaVarDiskPath() { return jahiaVarDiskPath; } /** * Used to get the data jahiafiles disk path. * * @return The data jahiafiles disk path. */ public String getJahiaFilesDataDiskPath() { return jahiaFilesBigTextDiskPath; } // end getJahiaFilesDataDiskPath /** * Used to get the templates jahiafiles disk path. * * @return The templates jahiafiles disk path. */ public String getJahiaFilesTemplatesDiskPath() { return jahiaFilesTemplatesDiskPath; } // end getJahiaFilesTemplatesDiskPath /** * Used to get the Ldap configuration directory disk path. * * @return The Ldap configuration disk path. */ public String getJahiaLdapDiskPath() { return jahiaLdapDiskPath; } // end getJahiaLdapDiskPath /** * Returns the disk path to the output cache configuration directory * @return a String containing the disk path to the output cache configuration * directory */ public String getJahiaOutputCacheConfigDiskPath() { return jahiaOutputCacheConfigDiskPath; } /** * Used to get the new templates disk path. * * @return The new templates disk path. */ public String getJahiaNewTemplatesDiskPath() { return jahiaNewTemplatesDiskPath; } // end getJahiaNewTemplatesDiskPath /** * Used to get the shared components disk path. * * @return The shared components disk path. */ public String getJahiaSharedComponentsDiskPath() { return jahiaSharedComponentsDiskPath; } /** * Used to get the shared templates disk path. * * @return The shared templates disk path. */ public String getJahiaSharedTemplatesDiskPath() { return jahiaSharedTemplatesDiskPath; } /** * Used to get the components disk path. * * @return The components disk path. */ public String getComponentsDiskPath() { return componentsDiskPath; } // end getComponentsDiskPath /** * Used to get the core http path. * * @return The core http path. */ public String getJahiaCoreHttpPath() { return jahiaCoreHttpPath; } // end getJahiaCoreHttpPath /** * Used to get the templates http path. * * @return The templates http path. */ public String getJahiaTemplatesHttpPath() { return jahiaTemplatesHttpPath; } // end getJahiaTemplatesHttpPath /** * Used to get the engines http path. * * @return The engines http path. */ public String getJahiaEnginesHttpPath() { return jahiaEnginesHttpPath; } // end getJahiaEnginesHttpPath /** * Used to get the javascript http path. * * @return The javascript http path. */ public String getJsHttpPath() { return jahiaJavaScriptHttpPath; } // end getJsHttpPath /** * Used to get the jsp context. * * @return The jsp context. */ public String getJspContext() { return jspContext; } // end getJspContext /** * Used to get the templates context. * * @return The templates context. */ public String getTemplatesContext() { return templatesContext; } // end getTemplatesContext /** * Used to get the engines context. * * @return The engines context. */ public String getEnginesContext() { return enginesContext; } // end getEnginesContext( /** * Used to get the javascript context. * * @return The javascript context. */ public String getJavascriptContext() { return javascriptContext; } // end getJavascriptContext( /** * Used to get the mail server. * * @return The mail server. */ public String getErrorMailServer() { return mailServer; } // end getErrorMailServer /** * Used to get the mail of the administrator. * * @return The mail of the administrator. */ public String getErrorMailAdmin() { return mailAdministrator; } // end getErrorMailAdmin /** * Used to get the mail of the expeditor. * * @return The mail of the expeditor. */ public String getErrorMailFrom() { return mailFrom; } // end getErrorMailFrom /** * Used to get the mail paranoia settings. * * @return The mail paranoia settings. */ public int getErrorMailParanoia() { return mailParanoia; } // end getErrorMailParanoia /** * Used to get the webapps autodeployer flag. * * @return The webapps autodeployer flag. */ public int getJahiaWebAppsAutoDeploy() { return jahiaWebAppsAutoDeploy; } // end getJahiaWebAppsAutoDeploy /** * Used to get the templates autodeployer flag. * * @return The templates autodeployer flag. */ public int getJahiaTemplatesAutoDeploy() { return jahiaTemplatesAutoDeploy; } // end getJahiaTemplatesAutoDeploy public boolean isOutputCacheActivated() { return outputCacheActivated; } /** * @return the default output cache time expiration delay, in milliseconds, * or -1 if the cache entries should never expire. */ public long getOutputCacheDefaultExpirationDelay () { return outputCacheDefaultExpirationDelay; } public boolean isSiteIDInURL () { return siteIDInURL; } public boolean isAppDebugModeOn() { return appDebugModeOn; } public boolean isAppInheritingJahiaSessionAttributes() { return appInheritJahiaSessionAttributes; } public String getJahiaWebAppsDeployerBaseURL() { return jahiaWebAppsDeployerBaseURL; }} // end SettingsBean
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -