Package com.cksource.ckfinder.config
Class Config
java.lang.Object
com.cksource.ckfinder.config.Config
- All Implemented Interfaces:
Serializable
CKFinder's connector configuration class.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Backend configuration class.static class
Configuration node for HTTP cache lifetimes for various CKFinder components.static class
Configuration node for image processing.static class
Configuration node for CKFinder connector's internal private directories.static class
Configuration node for resource type.static class
Configuration node for image thumbnails. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getBackendConfig
(String backendName) getResourceTypeConfig
(String resourceTypeName) boolean
boolean
boolean
void
setAccessControl
(ArrayList<AclRule> accessControl) void
setBackends
(ArrayList<Config.Backend> backends) void
setCache
(Config.Cache cache) void
setCheckSizeAfterScaling
(boolean checkSizeAfterScaling) void
setCsrfProtection
(boolean enableCsrfProtection) void
setExtraHeaders
(Map<String, String> extraHeaders) void
setImages
(Config.Images images) void
setLicenseKey
(String licenseKey) void
setLicenseName
(String licenseName) void
setPrivateDir
(Config.PrivateDir privateDir) void
setResourceTypes
(ArrayList<Config.ResourceType> resourceTypes) void
setRoleSessionAttribute
(String roleSessionAttribute) void
setSecureImageUploads
(boolean secureImageUploads) void
setServeStaticResources
(boolean serveStaticResources) void
setThumbnails
(Config.Thumbnails thumbnails)
-
Constructor Details
-
Config
public Config()
-
-
Method Details
-
getLicenseName
- Returns:
- license name
-
setLicenseName
- Parameters:
licenseName
- license name
-
getLicenseKey
- Returns:
- license key
-
setLicenseKey
- Parameters:
licenseKey
- license key
-
getRoleSessionAttribute
- Returns:
- the name of
HttpSession
attribute that holds current user's role name
-
setRoleSessionAttribute
- Parameters:
roleSessionAttribute
- the name ofHttpSession
attribute that holds current user's role name
-
getPrivateDirConfig
- Returns:
- private directories configuration
-
setPrivateDir
- Parameters:
privateDir
- private directories configuration
-
checkSizeAfterScaling
public boolean checkSizeAfterScaling()- Returns:
- true if size of uploaded image should be checked after the image is rescaled to smaller dimensions
-
setCheckSizeAfterScaling
public void setCheckSizeAfterScaling(boolean checkSizeAfterScaling) - Parameters:
checkSizeAfterScaling
- flag telling if the size of uploaded image should be checked after the image is rescaled to smaller dimensions
-
secureImageUploadsEnabled
public boolean secureImageUploadsEnabled()- Returns:
- true if uploading of corrupted images should be allowed
-
setSecureImageUploads
public void setSecureImageUploads(boolean secureImageUploads) - Parameters:
secureImageUploads
- flag telling if uploading of corrupted images should be allowed
-
isCsrfProtectionEnabled
public boolean isCsrfProtectionEnabled()- Returns:
- true if the CSRF protection is enabled
-
setCsrfProtection
public void setCsrfProtection(boolean enableCsrfProtection) - Parameters:
enableCsrfProtection
- flag telling if the CSRF protection should be enabled
-
getResourceTypes
- Returns:
- map containing defined resource types
-
getResourceTypeConfig
- Parameters:
resourceTypeName
- resource type name- Returns:
- configuration of resource type with given name
-
setResourceTypes
- Parameters:
resourceTypes
- resource types configuration
-
getBackends
- Returns:
- map containing defined backends
-
getBackendConfig
- Parameters:
backendName
- backend name- Returns:
- the configuration of backend with given name
-
setBackends
- Parameters:
backends
- backends configuration
-
getAccessControl
- Returns:
- access control rules defined in config
-
setAccessControl
- Parameters:
accessControl
- sets access control rules
-
getThumbnailsConfig
- Returns:
- thumbnails configuration
-
setThumbnails
- Parameters:
thumbnails
- thumbnails configuration
-
getImagesConfig
- Returns:
- configuration for image processing
-
setImages
- Parameters:
images
- configuration for image processing
-
getCacheConfig
- Returns:
- cache configuration
-
setCache
- Parameters:
cache
- cache configuration
-
getExtraHeaders
- Returns:
- extra headers configuration
-
setExtraHeaders
- Parameters:
extraHeaders
- extra headers configuration
-
serveStaticResources
public boolean serveStaticResources()- Returns:
- true if the servlet should serve static resources (JS and CSS files of CKFinder's frontend)
-
setServeStaticResources
public void setServeStaticResources(boolean serveStaticResources) - Parameters:
serveStaticResources
- option telling if the servlet should serve static resources (JS and CSS files of CKFinder's frontend)
-