org.apache.cocoon.core
Interface DynamicSettings

All Known Subinterfaces:
Settings
All Known Implementing Classes:
MutableSettings

public interface DynamicSettings

The settings (configuration) for the Cocoon core are described through the BaseSettings interface and the DynamicSettings interface. Whereas the settings of the BaseSettings object can't be changed at runtime, the settings of the DynamicSettings object are mutable. Use the Core instance to update the settings.

Since:
2.2
Version:
$Id: DynamicSettings.java 312930 2005-10-11 18:13:35Z cziegeler $

Field Summary
static boolean ENABLE_UPLOADS
          Default value for isEnableUploads() parameter (false).
static boolean HIDE_SHOW_TIME
           
static String KEY_HIDE_SHOWTIME
          If true, processing time will be added as an HTML comment
static String KEY_LAZY_MODE
          Lazy mode for component loading
static String KEY_RELOAD_DELAY
          Delay between reload checks for the configuration
static String KEY_RELOADING
          Allow reinstantiating (reloading) of the cocoon instance.
static String KEY_SHOW_VERSION
          If true, the X-Cocoon-Version response header will be included.
static String KEY_SHOWTIME
          Allow adding processing time to the response
static String KEY_UPLOADS_AUTOSAVE
          Causes all files in multipart requests to be saved to upload-dir.
static String KEY_UPLOADS_ENABLE
          Causes all files in multipart requests to be processed.
static String KEY_UPLOADS_MAXSIZE
          Specify maximum allowed size of the upload.
static String KEY_UPLOADS_OVERWRITE
          Specify handling of name conflicts when saving uploaded files to disk.
static int MAX_UPLOAD_SIZE
           
static boolean RELOADING_ENABLED_DEFAULT
          Default value for isReloadingEnabled(String) parameter (false).
static boolean SAVE_UPLOADS_TO_DISK
           
static boolean SHOW_COCOON_VERSION
          Default value for isShowVersion() parameter (true).
static boolean SHOW_TIME
           
 
Method Summary
 int getMaxUploadSize()
           
 String getOverwriteUploads()
           
 long getReloadDelay(String type)
          This method can be used by components to get the configured delay period inbetween checks.
 boolean isAllowOverwrite()
           
 boolean isAutosaveUploads()
           
 boolean isEnableUploads()
           
 boolean isHideShowTime()
           
 boolean isLazyMode()
           
 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()
           
 

Field Detail

RELOADING_ENABLED_DEFAULT

public static final boolean RELOADING_ENABLED_DEFAULT
Default value for isReloadingEnabled(String) parameter (false).

See Also:
Constant Field Values

ENABLE_UPLOADS

public static final boolean ENABLE_UPLOADS
Default value for isEnableUploads() parameter (false).

See Also:
Constant Field Values

SAVE_UPLOADS_TO_DISK

public static final boolean SAVE_UPLOADS_TO_DISK
See Also:
Constant Field Values

MAX_UPLOAD_SIZE

public static final int MAX_UPLOAD_SIZE
See Also:
Constant Field Values

SHOW_TIME

public static final boolean SHOW_TIME
See Also:
Constant Field Values

HIDE_SHOW_TIME

public static final boolean HIDE_SHOW_TIME
See Also:
Constant Field Values

SHOW_COCOON_VERSION

public static final boolean SHOW_COCOON_VERSION
Default value for isShowVersion() parameter (true).

See Also:
Constant Field Values

KEY_RELOADING

public static final String KEY_RELOADING
Allow reinstantiating (reloading) of the cocoon instance. If this is set to "yes" or "true", a new cocoon instance can be created using the request parameter "cocoon-reload". It also enables that Cocoon is reloaded when cocoon.xconf changes. Default is no for security reasons.

See Also:
Constant Field Values

KEY_UPLOADS_ENABLE

public static final String KEY_UPLOADS_ENABLE
Causes all files in multipart requests to be processed. Default is false for security reasons.

See Also:
Constant Field Values

KEY_UPLOADS_AUTOSAVE

public static final String KEY_UPLOADS_AUTOSAVE
Causes all files in multipart requests to be saved to upload-dir. Default is true for security reasons.

See Also:
Constant Field Values

KEY_UPLOADS_OVERWRITE

public static final String KEY_UPLOADS_OVERWRITE
Specify handling of name conflicts when saving uploaded files to disk. Acceptable values are deny, allow, rename (default). Files are renamed x_filename where x is an integer value incremented to make the new filename unique.

See Also:
Constant Field Values

KEY_UPLOADS_MAXSIZE

public static final String KEY_UPLOADS_MAXSIZE
Specify maximum allowed size of the upload. Defaults to 10 Mb.

See Also:
Constant Field Values

KEY_SHOWTIME

public static final String KEY_SHOWTIME
Allow adding processing time to the response

See Also:
Constant Field Values

KEY_HIDE_SHOWTIME

public static final String KEY_HIDE_SHOWTIME
If true, processing time will be added as an HTML comment

See Also:
Constant Field Values

KEY_SHOW_VERSION

public static final String KEY_SHOW_VERSION
If true, the X-Cocoon-Version response header will be included.

See Also:
Constant Field Values

KEY_RELOAD_DELAY

public static final String KEY_RELOAD_DELAY
Delay between reload checks for the configuration

See Also:
Constant Field Values

KEY_LAZY_MODE

public static final String KEY_LAZY_MODE
Lazy mode for component loading

See Also:
Constant Field Values
Method Detail

isHideShowTime

public boolean isHideShowTime()
Returns:
Returns the hideShowTime.
See Also:
KEY_HIDE_SHOWTIME

isShowVersion

public boolean isShowVersion()
Returns:
Returns the showCocoonVersion.
See Also:
KEY_SHOW_VERSION

isReloadingEnabled

public boolean isReloadingEnabled(String type)
This method can be used by components to query if they are configured to check for reloading.

Parameters:
type - The type of the component that wants to check for reload.
Returns:
Returns if reloading is enabled for this component.
See Also:
KEY_RELOADING

getReloadDelay

public long getReloadDelay(String type)
This method can be used by components to get the configured delay period inbetween checks.

Parameters:
type - The type of the component that wants to check for reload.
Returns:
Returns the delay inbetween checks in milliseconds.
See Also:
KEY_RELOAD_DELAY

isAutosaveUploads

public boolean isAutosaveUploads()
Returns:
Returns the autosaveUploads.
See Also:
KEY_UPLOADS_AUTOSAVE

isEnableUploads

public boolean isEnableUploads()
Returns:
Returns the enableUploads.
See Also:
KEY_UPLOADS_ENABLE

getMaxUploadSize

public int getMaxUploadSize()
Returns:
Returns the maxUploadSize.
See Also:
KEY_UPLOADS_MAXSIZE

getOverwriteUploads

public String getOverwriteUploads()
Returns:
Returns the overwriteUploads.
See Also:
KEY_UPLOADS_OVERWRITE

isShowTime

public boolean isShowTime()
Returns:
Returns the showTime.
See Also:
KEY_SHOWTIME

isLazyMode

public boolean isLazyMode()
Returns:
Returns the lazyMode.
See Also:
KEY_LAZY_MODE

isAllowOverwrite

public boolean isAllowOverwrite()

isSilentlyRename

public boolean isSilentlyRename()


Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.