Package org.javlo.config
Class StaticConfig
- java.lang.Object
-
- java.util.Observable
-
- org.javlo.config.StaticConfig
-
public class StaticConfig extends Observable
-
-
Field Summary
Fields Modifier and Type Field Description static List<String>
BASIC_MODULES
static String
DEMO_SITE
Boolean
internetAccess
protected static Logger
logger
static String
MAILING_PLATFORM
static String
OPEN_PLATFORM
static String
SMTP_HOST_PARAM
static String
SMTP_PASSWORD_PARAM
static String
SMTP_PORT_PARAM
static String
SMTP_USER_PARAM
static String
WEB_PLATFORM
static String
WEBAPP_CONFIG_FILE
static String
WEBAPP_CONFIG_INSTALL
static String
ZONE_DATE_TIME
-
Method Summary
-
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
-
-
-
-
Field Detail
-
ZONE_DATE_TIME
public static String ZONE_DATE_TIME
-
WEB_PLATFORM
public static String WEB_PLATFORM
-
MAILING_PLATFORM
public static String MAILING_PLATFORM
-
OPEN_PLATFORM
public static String OPEN_PLATFORM
-
logger
protected static Logger logger
-
WEBAPP_CONFIG_FILE
public static final String WEBAPP_CONFIG_FILE
- See Also:
- Constant Field Values
-
WEBAPP_CONFIG_INSTALL
public static final String WEBAPP_CONFIG_INSTALL
- See Also:
- Constant Field Values
-
SMTP_HOST_PARAM
public static final String SMTP_HOST_PARAM
- See Also:
- Constant Field Values
-
SMTP_PORT_PARAM
public static final String SMTP_PORT_PARAM
- See Also:
- Constant Field Values
-
SMTP_USER_PARAM
public static final String SMTP_USER_PARAM
- See Also:
- Constant Field Values
-
SMTP_PASSWORD_PARAM
public static final String SMTP_PASSWORD_PARAM
- See Also:
- Constant Field Values
-
DEMO_SITE
public static final String DEMO_SITE
- See Also:
- Constant Field Values
-
internetAccess
public Boolean internetAccess
-
-
Method Detail
-
getInstance
public static StaticConfig getInstance(javax.servlet.http.HttpSession session)
-
getInstance
public static StaticConfig getInstance(javax.servlet.ServletContext application)
-
getJavloHome
public static String getJavloHome()
-
getSourceRevision
public String getSourceRevision()
-
getBuildTime
public String getBuildTime()
-
getAbstractComponentLogLevel
public Level getAbstractComponentLogLevel()
-
isTimeTracker
public boolean isTimeTracker()
-
isPageTrash
public boolean isPageTrash()
-
getAccessLogLevel
public Level getAccessLogLevel()
-
getAdminUserFactory
public AdminUserFactory getAdminUserFactory(GlobalContext globalContext, javax.servlet.http.HttpSession session) throws SecurityException, NoSuchMethodException, ClassNotFoundException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
-
getAdminUserFactoryClassName
public String getAdminUserFactoryClassName()
-
getAllComponentLogLevel
public Level getAllComponentLogLevel()
-
getAllDataFolder
public String getAllDataFolder()
return the folder of data context.- Returns:
- the folder of data context.
-
getExternalComponentFolder
public String getExternalComponentFolder()
-
getAllLogLevel
public Level getAllLogLevel()
-
getAllProperties
public String getAllProperties() throws IOException
- Throws:
IOException
-
getBackupFolder
public String getBackupFolder()
-
getCacheFolder
public String getCacheFolder()
-
getCacheLinkedPage
public int getCacheLinkedPage()
cache between two update for linked page (in second)- Returns:
- a time in second.
-
getCacheMaxSize
public int getCacheMaxSize()
define the max size of the main cache- Returns:
-
getCacheMaxTime
public int getCacheMaxTime()
return the max time in cache for item- Returns:
-
isPDFCache
public boolean isPDFCache()
-
getContextFolder
public String getContextFolder()
-
getCSVFolder
public String getCSVFolder()
-
getDBDriver
public String getDBDriver()
-
getDBLogin
public String getDBLogin()
-
getDBPassword
public String getDBPassword()
-
getDBInternalLogin
public String getDBInternalLogin()
-
getDBInternalPassword
public String getDBInternalPassword()
-
getDBResourceName
public String getDBResourceName()
-
getDBURL
public String getDBURL()
-
getDefaultContext
public String getDefaultContext()
-
getMasterContext
public String getMasterContext()
-
getInstanceName
public String getInstanceName()
-
getDefaultImage
public String getDefaultImage()
-
getDefaultProxyHost
public String getDefaultProxyHost()
-
getDefaultProxyPort
public int getDefaultProxyPort()
-
getDefaultReport
public String getDefaultReport()
-
getDefaultSender
public String getDefaultSender()
-
getDefaultSubject
public String getDefaultSubject()
-
getMailTemplateParent
public String getMailTemplateParent()
-
getDevices
public Map<String,String> getDevices()
config the device. device config strucure : device.[device code].[config] sample : device.phone = iphone device.phone = htc device.phone.pointer-device = false- Returns:
-
getEditTemplate
public String[] getEditTemplate()
-
getEnv
public String getEnv()
-
isProd
public boolean isProd()
-
isImageShortURL
public boolean isImageShortURL()
-
isImageAsService
public boolean isImageAsService()
-
isImageMetaEdition
public boolean isImageMetaEdition()
-
isEditRepeatComponent
public boolean isEditRepeatComponent()
-
isResourceShortURL
public boolean isResourceShortURL()
-
testInstance
public boolean testInstance()
-
getErrorMailReport
public String getErrorMailReport()
-
getFileFolder
public String getFileFolder()
-
getFileFolderName
public String getFileFolderName()
-
getVFSFolderName
public String getVFSFolderName()
-
getMailingTimebetweenTwoMailing
public long getMailingTimebetweenTwoMailing()
-
getMailingTimebetweenTwoSend
public long getMailingTimebetweenTwoSend()
-
getImageCacheFolder
public String getImageCacheFolder()
-
getFlashFolder
public String getFlashFolder()
-
getGalleryFolder
public String getGalleryFolder()
-
getGalleryFolderName
public String getGalleryFolderName()
-
getI18nEditFile
public String getI18nEditFile()
-
getI18nSpecificEditFile
public String getI18nSpecificEditFile()
-
getI18nSpecificViewFile
public String getI18nSpecificViewFile()
-
getI18nViewFile
public String getI18nViewFile()
-
getImageFolder
public String getImageFolder()
-
getImageFolderName
public String getImageFolderName()
-
getVideoFolder
public String getVideoFolder()
-
getAvatarFolder
public String getAvatarFolder()
-
getAvatarFolderName
public String getAvatarFolderName()
-
getInstanceId
public String getInstanceId()
-
getLastAccessPage
public int getLastAccessPage()
-
getLastAccessStatic
public int getLastAccessStatic()
-
getLDAPInitalContextFactory
public String getLDAPInitalContextFactory()
-
getLDAPProviderURL
public String getLDAPProviderURL()
-
getLDAPSecurityAuthentification
public String getLDAPSecurityAuthentification()
-
getLDAPSecurityCredentials
public String getLDAPSecurityCredentials()
-
getLDAPSecurityPrincipal
public String getLDAPSecurityPrincipal()
-
getLDAPSecurityLogin
public String getLDAPSecurityLogin(String login)
use #login# in place of login- Returns:
-
getLocalMailingFolder
public String getLocalMailingFolder()
-
getLocalMailingHistoryFolder
public String getLocalMailingHistoryFolder()
-
getLocalMailingTrashFolder
public String getLocalMailingTrashFolder()
-
getLocalMailingTemplateFolder
public String getLocalMailingTemplateFolder()
-
getLocalShareDataFolder
public String getLocalShareDataFolder()
-
isRemoveImportOnDeletePage
public boolean isRemoveImportOnDeletePage()
-
isCreateContentOnImportImage
public boolean isCreateContentOnImportImage()
-
getLocalTempDir
public String getLocalTempDir()
-
getLocalTemplateFolder
public String getLocalTemplateFolder()
-
getLocalTemplatePluginFolder
public String getLocalTemplatePluginFolder()
-
getLocalThreadFolder
public String getLocalThreadFolder()
-
getLoginLogLevel
public Level getLoginLogLevel()
-
getMailingFolder
public String getMailingFolder()
-
getMailingHistoryFolder
public String getMailingHistoryFolder()
-
getMailingStaticConfig
public MailingStaticConfig getMailingStaticConfig()
-
getMailingTrashFolder
public String getMailingTrashFolder()
-
getMailingTemplateFolder
public String getMailingTemplateFolder()
-
getMaxMenuTitleSize
public int getMaxMenuTitleSize()
-
getMaxURLSize
public int getMaxURLSize()
-
getMinFreeSpaceOnDataFolder
public long getMinFreeSpaceOnDataFolder()
-
getNavigationLogLevel
public Level getNavigationLogLevel()
-
getProductVersion
public String getProductVersion()
-
getProductName
public String getProductName()
-
getProductUrl
public String getProductUrl()
-
getProperties
public Properties getProperties()
- Returns:
- a newly created Properties object
-
getProxyHost
public String getProxyHost()
-
getProxyPort
public int getProxyPort()
-
getPublishLoadingDepth
public int getPublishLoadingDepth()
-
getCaptchaSize
public int getCaptchaSize()
-
isXSSHeader
public boolean isXSSHeader()
-
isResourcesSecured
public boolean isResourcesSecured()
if true, test the roles of the resource, if current user has'nt right role --> return 403- Returns:
-
isLoginWithToken
public boolean isLoginWithToken()
-
getMaxErrorLoginByHour
public int getMaxErrorLoginByHour()
-
getSecretKey
public String getSecretKey()
-
getDefaultPassword
public String getDefaultPassword()
-
getShareDataFolderKey
public String getShareDataFolderKey()
-
getShareImageFolder
public String getShareImageFolder()
-
getSharedPixaBayAPIKey
public String getSharedPixaBayAPIKey()
-
getSharedStockvaultAPIKey
public String getSharedStockvaultAPIKey()
-
getSMTPHost
public String getSMTPHost()
-
getSMTPPasswordParam
public String getSMTPPasswordParam()
-
getSMTPPort
public String getSMTPPort()
-
getSMTPUser
public String getSMTPUser()
-
getStaticConfigLocalisation
public String getStaticConfigLocalisation()
-
getExternComponentFolder
public String getExternComponentFolder()
-
getStaticFolder
public String getStaticFolder()
-
getSynchroCode
public String getSynchroCode()
-
getSynchroTokenValidityMinutes
public int getSynchroTokenValidityMinutes()
-
getSynchroLogLevel
public Level getSynchroLogLevel()
-
getTeaserFolder
public String getTeaserFolder()
-
getWebTempDir
public File getWebTempDir()
-
getTempDir
public String getTempDir()
-
getTemplateFolder
public String getTemplateFolder()
-
getDefaultTemplateFolder
public String getDefaultTemplateFolder()
-
getTemplatePluginFolder
public String getTemplatePluginFolder()
-
getThreadFolder
public String getThreadFolder()
-
getTrashContextFolder
public String getTrashContextFolder()
-
getTrashFolder
public String getTrashFolder()
-
getUserFolder
public String getUserFolder()
-
getUserInfoFile
public String getUserInfoFile()
-
getAdminUserInfoFile
public String getAdminUserInfoFile()
-
getVFSFolder
public String getVFSFolder()
-
getDefaultTestURL
public String getDefaultTestURL()
-
isInternetAccess
public boolean isInternetAccess()
-
isAutoCreation
public boolean isAutoCreation()
-
isCorporate
public boolean isCorporate()
-
isAccountSize
public boolean isAccountSize()
cancul account size of true. Account size is always -1 if false.- Returns:
-
isDataFolderRelative
public boolean isDataFolderRelative()
-
isDownloadCleanDataFolder
public boolean isDownloadCleanDataFolder()
-
isDownloadIncludeTracking
public boolean isDownloadIncludeTracking()
-
isStorageZipped
public boolean isStorageZipped()
-
isSecureEncrypt
public boolean isSecureEncrypt()
-
isHostDefineSite
public boolean isHostDefineSite()
-
isRandomDataFoder
public boolean isRandomDataFoder()
-
isHTMLEditor
public boolean isHTMLEditor()
-
isI18nFileRelative
public boolean isI18nFileRelative()
-
isMailingWidthUserInfo
public boolean isMailingWidthUserInfo()
-
isMailingUserTracking
public boolean isMailingUserTracking()
-
isMailingThread
public boolean isMailingThread()
-
isStaticInfoDescription
public boolean isStaticInfoDescription()
-
isNotificationThread
public boolean isNotificationThread()
-
getNotificationHours
public int getNotificationHours()
-
isNotificationDyanamicComponentThread
public boolean isNotificationDyanamicComponentThread()
-
getPasswordEncrytClass
public String getPasswordEncrytClass()
-
isFirstPasswordMustBeChanged
public boolean isFirstPasswordMustBeChanged()
-
isOauthView
public boolean isOauthView()
-
getOauthGoogleIdClient
public String getOauthGoogleIdClient()
-
getOauthGoogleSecret
public String getOauthGoogleSecret()
-
getFirstPasswordEncryptedIfNeeded
public String getFirstPasswordEncryptedIfNeeded()
-
getFirstPassword
public String getFirstPassword()
-
isRequestWrapper
public boolean isRequestWrapper()
-
isTemplateJSP
public boolean isTemplateJSP()
-
isTracking
public boolean isTracking()
-
isViewPrefix
public boolean isViewPrefix()
-
isURIWithContext
public boolean isURIWithContext()
-
reload
public void reload()
-
clearCache
public void clearCache()
-
storeAllProperties
public void storeAllProperties(String content) throws IOException
- Throws:
IOException
-
useHttps
public boolean useHttps()
-
useLocalFolder
public boolean useLocalFolder()
-
getDefaultDateFormat
public String getDefaultDateFormat()
-
getDefaultJSDateFormat
public String getDefaultJSDateFormat()
-
getServletContext
public javax.servlet.ServletContext getServletContext()
-
getMarketServerName
public String getMarketServerName()
-
getLogFile
public String getLogFile()
log file, if retrun null, choose the latest modified file of log dir- Returns:
-
getLogDir
public String getLogDir()
-
getSiteEmail
public String getSiteEmail()
-
getManualErrorEmail
public String getManualErrorEmail()
-
getHelpURL
public String getHelpURL()
-
isDefaultTemplateImported
public boolean isDefaultTemplateImported()
-
getShortURLSize
public int getShortURLSize()
-
getTransformingSize
public long getTransformingSize()
-
shutdown
public void shutdown()
-
finalize
protected void finalize() throws Throwable
-
getCmsName
public String getCmsName()
-
isFixPreview
public boolean isFixPreview()
-
getPlatformType
public String getPlatformType()
-
getPlatformTitle
public String getPlatformTitle()
-
get404PageName
public String get404PageName()
-
isRedirectWidthName
public boolean isRedirectWidthName()
if page not found, search a page with the same name and redirect to it.- Returns:
-
getEditTemplateFolder
public String getEditTemplateFolder()
-
getEditTemplateMode
public String getEditTemplateMode()
default mode of the edit template (mode is defined in GlobalContext), can be used in template renderer for include special css or js. preview css is : edit_preview_[mode].css- Returns:
-
getEditDefaultMimeTypeImage
public String getEditDefaultMimeTypeImage()
-
getTimeBetweenChangeNotification
public int getTimeBetweenChangeNotification()
return time between 2 modification check in second. default : 3 minutes- Returns:
-
getTimeBetweenChangeNotificationForDynamicComponent
public int getTimeBetweenChangeNotificationForDynamicComponent()
return time between 2 modification check of dynamic component in second. default : 10 minutes- Returns:
-
getApplicationLogin
public String getApplicationLogin()
-
getApplicationPassword
public String getApplicationPassword()
-
getPasswordRegularExpression
public String getPasswordRegularExpression()
-
getImageMaxWidth
public int getImageMaxWidth()
all image uploaded was resize under this max-size- Returns:
-
isUndo
public boolean isUndo()
-
isExcludeContextDomain
public boolean isExcludeContextDomain(String domain)
-
getSearchEngineClassName
public String getSearchEngineClassName()
-
getSearchEngineLucenePattern
public String getSearchEngineLucenePattern()
-
getDropboxAppKey
public String getDropboxAppKey()
-
getHtmlHead
public String getHtmlHead()
-
getDropboxAppSecret
public String getDropboxAppSecret()
-
getPreviewCommandFilePath
public String getPreviewCommandFilePath()
-
getTimeTravelerFilePath
public String getTimeTravelerFilePath()
-
getCssPreview
public String getCssPreview()
-
getJSPreview
public String getJSPreview()
-
getHTML2Canvas
public String getHTML2Canvas()
-
getJSBootStrap
public String getJSBootStrap()
-
getStaticResourceCacheTime
public String getStaticResourceCacheTime()
-
isContentExtensionValid
public boolean isContentExtensionValid(String ext)
-
getDefaultContentExtension
public String getDefaultContentExtension()
-
isCheckContentIntegrity
public boolean isCheckContentIntegrity()
-
isDisplayIntegrity
public boolean isDisplayIntegrity()
-
getJSLibPreview
public String getJSLibPreview()
-
isTracked
public Boolean isTracked()
-
getDefaultParentEditableTemplate
public String getDefaultParentEditableTemplate()
-
isSharedImportDocument
public boolean isSharedImportDocument()
-
isIntegrityCheck
public boolean isIntegrityCheck()
-
isEditOnCreate
public boolean isEditOnCreate()
-
isRestServlet
public boolean isRestServlet()
-
isHighSecure
public boolean isHighSecure()
-
getSpecialLogFile
public String getSpecialLogFile()
-
getUndoDepth
public Integer getUndoDepth()
-
getImportFolder
public String getImportFolder()
-
getImportImageFolder
public String getImportImageFolder()
-
getImportGalleryFolder
public String getImportGalleryFolder()
-
getImportResourceFolder
public String getImportResourceFolder()
-
getImportVFSFolder
public String getImportVFSFolder()
-
getSiteMapSizeLimit
public long getSiteMapSizeLimit()
-
isAutoFocus
public boolean isAutoFocus()
-
getSiteMapNewsLimit
public long getSiteMapNewsLimit()
-
getImageFormat
public String getImageFormat()
-
getVideoFormat
public String getVideoFormat()
-
isRedirectSecondaryURL
public boolean isRedirectSecondaryURL()
return true if javlo must be forward to the canonical URL. WARNING : always false if isJsessionID return false- Returns:
-
isJsessionID
public boolean isJsessionID()
-
isComponentsFiltered
public boolean isComponentsFiltered()
-
isEditIpSecurity
public boolean isEditIpSecurity()
-
isConvertHTMLToImage
public boolean isConvertHTMLToImage()
-
isIM
public boolean isIM()
-
isSiteLog
public boolean isSiteLog()
-
isSiteLogStorage
public boolean isSiteLogStorage()
-
isSiteLogCaller
public boolean isSiteLogCaller()
-
getSiteLogGroup
public String getSiteLogGroup()
-
isAddButton
public boolean isAddButton()
-
isRestServer
public boolean isRestServer()
-
isAnonymisedTracking
public boolean isAnonymisedTracking()
-
isCompressJsp
public boolean isCompressJsp()
-
isMobilePreview
public boolean isMobilePreview()
-
getBackupInterval
public int getBackupInterval()
-
getDbBackupCount
public int getDbBackupCount()
-
getDbBackupInterval
public int getDbBackupInterval()
-
getUsersBackupCount
public int getUsersBackupCount()
-
getUsersBackupInterval
public int getUsersBackupInterval()
-
getMailingFeedBackURI
public String getMailingFeedBackURI()
-
getFormsBackupCount
public int getFormsBackupCount()
-
getFormsBackupInterval
public int getFormsBackupInterval()
-
isFoundFile
public boolean isFoundFile()
-
setFoundFile
public void setFoundFile(boolean foundFile)
-
download
public static ContentContext download(ContentContext ctx, InstallBean installBean, boolean importTemplate, boolean importDemo, String email)
download data form javlo.org- Parameters:
ctx
-importTemplate
-importDemo
-- Returns:
- a ctx to new demo site, null if no demo site imported
- Throws:
Exception
-
install
public InstallBean install(ContentContext ctx, String inConfigFolder, String idDataFolder, String adminPassword, boolean importTemplate, boolean importDemo, String email)
-
getSearchPageName
public String getSearchPageName()
-
getRegisterPageName
public String getRegisterPageName()
-
getLoginPageName
public String getLoginPageName()
-
getIP2LocationURL
public String getIP2LocationURL()
-
getDefaultPDFLayout
public String getDefaultPDFLayout()
-
getNewsPageName
public String getNewsPageName()
-
getEcomLister
public IEcomListner getEcomLister() throws SecurityException, NoSuchMethodException, ClassNotFoundException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
-
getGeneralLister
public IGeneralListner getGeneralLister() throws SecurityException, NoSuchMethodException, ClassNotFoundException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
-
getWebpEncoder
public String getWebpEncoder()
-
getZoneDateTime
public String getZoneDateTime()
-
getLocaleCountry
public String getLocaleCountry()
-
getLayerCacheMaxSize
public int getLayerCacheMaxSize()
-
getFirstRequestLister
public IFirstRequestListner getFirstRequestLister() throws ClassNotFoundException, InstantiationException, IllegalAccessException
-
-