|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cocoon.core.MutableSettings
This object holds the global configuration of Cocoon.
Field Summary | |
protected boolean |
autosaveUploads
Causes all files in multipart requests to be saved to upload-dir. |
protected String |
bootstrapLogLevel
This parameter indicates the log level to use throughout startup of the system. |
protected String |
cacheDirectory
This parameter allows to specify where Cocoon should create its page and other objects cache. |
protected String |
cocoonLogger
This parameter indicates the category id of the logger from the LogKit management configuration for the Cocoon engine. |
protected String |
configuration
This parameter points to the main configuration file for Cocoon. |
protected long |
configurationReloadDelay
Delay between reload checks for the configuration. |
protected long |
creationTime
The time the cocoon instance was created. |
protected boolean |
enableUploads
Causes all files in multipart requests to be processed. |
protected String |
environmentLogger
This parameter indicates the category id of the logger from the LogKit configuration used by the environment. |
protected List |
extraClasspaths
This parameter allows to specify additional directories or jars which Cocoon should put into it's own classpath. |
protected Map |
forceProperties
This parameter allows to set system properties |
protected String |
formEncoding
Set form encoding. |
protected boolean |
hideShowTime
If true, processing time will be added as an HTML comment |
protected static String |
KEYPREFIX
Prefix for properties |
protected boolean |
lazyMode
Lazy mode for component loading |
protected List |
loadClasses
This parameter is used to list classes that should be loaded at initialization time of the servlet. |
protected String |
loggerManagerClassName
This parameter switches the logging system from LogKit to Log4J for Cocoon. |
protected String |
loggingConfiguration
This parameter indicates the configuration file of the LogKit management |
protected boolean |
manageExceptions
If true or not set, this class will try to catch and handle all Cocoon exceptions. |
protected int |
maxUploadSize
Specify maximum allowed size of the upload. |
protected String |
overrideLogLevel
If this value is specified, it will be interpreted as a log level and all logging categories will be set to this level regardless of their definition in the logging configuration. |
protected String |
overwriteUploads
Specify handling of name conflicts when saving uploaded files to disk. |
protected String |
parentServiceManagerClassName
This parameter allows you to select the parent service manager. |
protected List |
properties
The list of properties used to configure Cocoon |
protected List |
propertyProviders
The property providers. |
protected boolean |
readOnly
Are we still mutable? |
protected boolean |
reloadingEnabled
Allow reinstantiating (reloading) of the cocoon instance. |
protected boolean |
showCocoonVersion
If true, the X-Cocoon-Version response header will be included. |
protected boolean |
showTime
Allow adding processing time to the response |
protected String |
uploadDirectory
This parameter allows to specify where Cocoon should put uploaded files. |
protected String |
workDirectory
This parameter allows to specify where Cocoon should put it's working files. |
Fields inherited from interface org.apache.cocoon.core.DynamicSettings |
ENABLE_UPLOADS, HIDE_SHOW_TIME, KEY_HIDE_SHOWTIME, KEY_LAZY_MODE, KEY_RELOAD_DELAY, KEY_RELOADING, KEY_SHOW_VERSION, KEY_SHOWTIME, KEY_UPLOADS_AUTOSAVE, KEY_UPLOADS_ENABLE, KEY_UPLOADS_MAXSIZE, KEY_UPLOADS_OVERWRITE, MAX_UPLOAD_SIZE, RELOADING_ENABLED_DEFAULT, SAVE_UPLOADS_TO_DISK, SHOW_COCOON_VERSION, SHOW_TIME |
Constructor Summary | |
MutableSettings()
Create a new settings object |
Method Summary | |
void |
addToExtraClasspaths(String extraClasspath)
|
void |
addToForceProperties(String key,
String value)
|
void |
addToLoadClasses(String className)
|
void |
addToPropertyProviders(String className)
Add a property provider. |
protected void |
checkWriteable()
check if this configuration is writeable. |
void |
fill(Properties props)
Fill from a properties object |
String |
getBootstrapLogLevel()
|
String |
getCacheDirectory()
|
String |
getCocoonLogger()
|
String |
getConfiguration()
|
long |
getCreationTime()
The creation time of the current Cocoon instance. |
String |
getEnvironmentLogger()
|
List |
getExtraClasspaths()
|
Map |
getForceProperties()
|
String |
getFormEncoding()
|
List |
getLoadClasses()
|
String |
getLoggerManagerClassName()
|
String |
getLoggingConfiguration()
|
int |
getMaxUploadSize()
|
String |
getOverrideLogLevel()
|
String |
getOverwriteUploads()
|
String |
getParentServiceManagerClassName()
|
List |
getProperties(String keyPrefix)
Return all available properties starting with the prefix. |
String |
getProperty(String name)
Get the value of a property. |
String |
getProperty(String key,
String defaultValue)
Get the value of a property. |
List |
getPropertyProviders()
|
long |
getReloadDelay(String type)
This method can be used by components to get the configured delay period inbetween checks. |
String |
getUploadDirectory()
|
String |
getWorkDirectory()
|
boolean |
isAllowOverwrite()
|
boolean |
isAutosaveUploads()
|
boolean |
isEnableUploads()
|
boolean |
isHideShowTime()
|
boolean |
isLazyMode()
|
boolean |
isManageExceptions()
|
boolean |
isReloadingEnabled(String type)
This method can be used by components to query if they are configured to check for reloading. |
boolean |
isShowTime()
|
boolean |
isShowVersion()
|
boolean |
isSilentlyRename()
|
void |
makeReadOnly()
Mark this object as read-only. |
void |
setAutosaveUploads(boolean autosaveUploads)
|
void |
setBootstrapLogLevel(String logLevel)
|
void |
setCacheDirectory(String cacheDirectory)
|
void |
setCocoonLogger(String cocoonLogger)
|
void |
setConfiguration(String configuration)
|
void |
setConfigurationReloadDelay(long configurationReloadDelay)
|
void |
setCreationTime(long value)
Set the creation time of the current cocoon instance. |
void |
setEnableUploads(boolean enableUploads)
|
void |
setEnvironmentLogger(String logger)
|
void |
setFormEncoding(String formEncoding)
|
void |
setHideShowTime(boolean hideShowTime)
|
void |
setLazyMode(boolean lazyMode)
|
void |
setLoggerManagerClassName(String loggerClassName)
|
void |
setLoggingConfiguration(String loggingConfiguration)
|
void |
setManageExceptions(boolean manageExceptions)
|
void |
setMaxUploadSize(int maxUploadSize)
|
void |
setOverrideLogLevel(String overrideLogLevel)
|
void |
setOverwriteUploads(String overwriteUploads)
|
void |
setParentServiceManagerClassName(String parentServiceManagerClassName)
|
void |
setReloadingEnabled(boolean allowReload)
|
void |
setShowCocoonVersion(boolean showCocoonVersion)
|
void |
setShowTime(boolean showTime)
|
void |
setUploadDirectory(String uploadDirectory)
|
void |
setWorkDirectory(String workDirectory)
|
String |
toString()
|
protected String |
toString(List a)
Helper method to make a string out of a list of objects. |
protected String |
toString(Map a)
Helper method to make a string out of a map of objects. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected boolean readOnly
protected static final String KEYPREFIX
protected List properties
protected Map forceProperties
protected String configuration
protected String loggingConfiguration
protected String environmentLogger
protected String cocoonLogger
protected String bootstrapLogLevel
protected String loggerManagerClassName
protected boolean reloadingEnabled
protected List loadClasses
protected boolean enableUploads
protected String uploadDirectory
protected boolean autosaveUploads
protected String overwriteUploads
protected int maxUploadSize
protected String cacheDirectory
protected String workDirectory
protected List extraClasspaths
protected String parentServiceManagerClassName
protected boolean showTime
protected boolean hideShowTime
protected boolean showCocoonVersion
protected boolean manageExceptions
protected String formEncoding
protected String overrideLogLevel
protected long configurationReloadDelay
protected boolean lazyMode
protected long creationTime
protected List propertyProviders
Constructor Detail |
public MutableSettings()
Method Detail |
public void fill(Properties props)
public boolean isHideShowTime()
isHideShowTime
in interface DynamicSettings
DynamicSettings.KEY_HIDE_SHOWTIME
public boolean isReloadingEnabled(String type)
DynamicSettings
isReloadingEnabled
in interface DynamicSettings
type
- The type of the component that wants to check for reload.
DynamicSettings.KEY_RELOADING
public boolean isAutosaveUploads()
isAutosaveUploads
in interface DynamicSettings
DynamicSettings.KEY_UPLOADS_AUTOSAVE
public String getCacheDirectory()
getCacheDirectory
in interface BaseSettings
BaseSettings.KEY_CACHE_DIRECTORY
public String getCocoonLogger()
getCocoonLogger
in interface BaseSettings
BaseSettings.KEY_LOGGING_COCOON_LOGGER
public String getConfiguration()
getConfiguration
in interface BaseSettings
BaseSettings.KEY_CONFIGURATION
public boolean isEnableUploads()
isEnableUploads
in interface DynamicSettings
DynamicSettings.KEY_UPLOADS_ENABLE
public List getExtraClasspaths()
getExtraClasspaths
in interface BaseSettings
BaseSettings.KEY_EXTRA_CLASSPATHS
public Map getForceProperties()
getForceProperties
in interface BaseSettings
BaseSettings.KEY_FORCE_PROPERTIES
public String getFormEncoding()
getFormEncoding
in interface BaseSettings
BaseSettings.KEY_FORM_ENCODING
public List getLoadClasses()
getLoadClasses
in interface BaseSettings
BaseSettings.KEY_LOAD_CLASSES
public String getLoggerManagerClassName()
getLoggerManagerClassName
in interface BaseSettings
BaseSettings.KEY_LOGGING_MANAGER_CLASS
public String getLoggingConfiguration()
getLoggingConfiguration
in interface BaseSettings
BaseSettings.KEY_LOGGING_CONFIGURATION
public String getBootstrapLogLevel()
getBootstrapLogLevel
in interface BaseSettings
BaseSettings.KEY_LOGGING_BOOTSTRAP_LOGLEVEL
public boolean isManageExceptions()
isManageExceptions
in interface BaseSettings
BaseSettings.KEY_MANAGE_EXCEPTIONS
public int getMaxUploadSize()
getMaxUploadSize
in interface DynamicSettings
DynamicSettings.KEY_UPLOADS_MAXSIZE
public String getOverwriteUploads()
getOverwriteUploads
in interface DynamicSettings
DynamicSettings.KEY_UPLOADS_OVERWRITE
public String getParentServiceManagerClassName()
getParentServiceManagerClassName
in interface BaseSettings
BaseSettings.KEY_PARENT_SERVICE_MANAGER
public boolean isShowTime()
isShowTime
in interface DynamicSettings
DynamicSettings.KEY_SHOWTIME
public boolean isShowVersion()
isShowVersion
in interface DynamicSettings
DynamicSettings.KEY_SHOW_VERSION
public String getUploadDirectory()
getUploadDirectory
in interface BaseSettings
BaseSettings.KEY_UPLOADS_DIRECTORY
public String getWorkDirectory()
getWorkDirectory
in interface BaseSettings
BaseSettings.KEY_WORK_DIRECTORY
public String getEnvironmentLogger()
getEnvironmentLogger
in interface BaseSettings
BaseSettings.KEY_LOGGING_ENVIRONMENT_LOGGER
public String getOverrideLogLevel()
getOverrideLogLevel
in interface BaseSettings
BaseSettings.KEY_LOGGING_OVERRIDE_LOGLEVEL
public boolean isAllowOverwrite()
isAllowOverwrite
in interface DynamicSettings
public boolean isSilentlyRename()
isSilentlyRename
in interface DynamicSettings
public long getReloadDelay(String type)
DynamicSettings
getReloadDelay
in interface DynamicSettings
type
- The type of the component that wants to check for reload.
DynamicSettings.KEY_RELOAD_DELAY
public boolean isLazyMode()
isLazyMode
in interface DynamicSettings
DynamicSettings.KEY_LAZY_MODE
public String getProperty(String name)
Settings
getProperty
in interface Settings
name
- The name of the property.
public String getProperty(String key, String defaultValue)
Settings
getProperty
in interface Settings
key
- The name of the property.defaultValue
- The value returned if the property is not available.
public String toString()
Object.toString()
protected String toString(List a)
protected String toString(Map a)
public void setHideShowTime(boolean hideShowTime)
hideShowTime
- The hideShowTime to set.public void setReloadingEnabled(boolean allowReload)
allowReload
- The allowReload to set.public void setAutosaveUploads(boolean autosaveUploads)
autosaveUploads
- The autosaveUploads to set.public void setCacheDirectory(String cacheDirectory)
cacheDirectory
- The cacheDirectory to set.public void setCocoonLogger(String cocoonLogger)
cocoonLogger
- The cocoonLogger to set.public void setConfiguration(String configuration)
configuration
- The configuration to set.public void setEnableUploads(boolean enableUploads)
enableUploads
- The enableUploads to set.public void addToExtraClasspaths(String extraClasspath)
extraClasspath
- The extraClasspaths to set.public void addToForceProperties(String key, String value)
key
- The forceProperties to set.value
- The forceProperties value to set.public void setFormEncoding(String formEncoding)
formEncoding
- The formEncoding to set.public void addToLoadClasses(String className)
className
- The loadClasses to set.public void setLoggerManagerClassName(String loggerClassName)
loggerClassName
- The loggerClassName to set.public void setLoggingConfiguration(String loggingConfiguration)
loggingConfiguration
- The loggingConfiguration to set.public void setBootstrapLogLevel(String logLevel)
logLevel
- The logLevel to set.public void setManageExceptions(boolean manageExceptions)
manageExceptions
- The manageExceptions to set.public void setMaxUploadSize(int maxUploadSize)
maxUploadSize
- The maxUploadSize to set.public void setOverwriteUploads(String overwriteUploads)
overwriteUploads
- The overwriteUploads to set.public void setParentServiceManagerClassName(String parentServiceManagerClassName)
parentServiceManagerClassName
- The parentServiceManagerClassName to set.public void setShowTime(boolean showTime)
showTime
- The showTime to set.public void setShowCocoonVersion(boolean showCocoonVersion)
showCocoonVersion
- The showCocoonVersion flag to set.public void setUploadDirectory(String uploadDirectory)
uploadDirectory
- The uploadDirectory to set.public void setWorkDirectory(String workDirectory)
workDirectory
- The workDirectory to set.public void setEnvironmentLogger(String logger)
logger
- The logger for the environment.public void setOverrideLogLevel(String overrideLogLevel)
overrideLogLevel
- The overrideLogLevel to set.public void setConfigurationReloadDelay(long configurationReloadDelay)
configurationReloadDelay
- The configurationReloadDelay to set.public void setLazyMode(boolean lazyMode)
lazyMode
- The lazyMode to set.public void makeReadOnly()
protected final void checkWriteable() throws IllegalStateException
IllegalStateException
- if this setting is read-onlypublic long getCreationTime()
BaseSettings
getCreationTime
in interface BaseSettings
BaseSettings.getCreationTime()
public void setCreationTime(long value)
public List getPropertyProviders()
getPropertyProviders
in interface BaseSettings
BaseSettings.getPropertyProviders()
public void addToPropertyProviders(String className)
public List getProperties(String keyPrefix)
Settings
getProperties
in interface Settings
keyPrefix
- The prefix each property name must have.
Settings.getProperties(java.lang.String)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |