Class Config

java.lang.Object
com.cksource.ckfinder.config.Config
All Implemented Interfaces:
Serializable

public class Config extends Object implements Serializable
CKFinder's connector configuration class.
See Also:
  • Constructor Details

    • Config

      public Config()
  • Method Details

    • getLicenseName

      public String getLicenseName()
      Returns:
      license name
    • setLicenseName

      public void setLicenseName(String licenseName)
      Parameters:
      licenseName - license name
    • getLicenseKey

      public String getLicenseKey()
      Returns:
      license key
    • setLicenseKey

      public void setLicenseKey(String licenseKey)
      Parameters:
      licenseKey - license key
    • getRoleSessionAttribute

      public String getRoleSessionAttribute()
      Returns:
      the name of HttpSession attribute that holds current user's role name
    • setRoleSessionAttribute

      public void setRoleSessionAttribute(String roleSessionAttribute)
      Parameters:
      roleSessionAttribute - the name of HttpSession attribute that holds current user's role name
    • getPrivateDirConfig

      public Config.PrivateDir getPrivateDirConfig()
      Returns:
      private directories configuration
    • setPrivateDir

      public void setPrivateDir(Config.PrivateDir privateDir)
      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

      public Map<String,Config.ResourceType> getResourceTypes()
      Returns:
      map containing defined resource types
    • getResourceTypeConfig

      public Config.ResourceType getResourceTypeConfig(String resourceTypeName)
      Parameters:
      resourceTypeName - resource type name
      Returns:
      configuration of resource type with given name
    • setResourceTypes

      public void setResourceTypes(ArrayList<Config.ResourceType> resourceTypes)
      Parameters:
      resourceTypes - resource types configuration
    • getBackends

      public Map<String,Config.Backend> getBackends()
      Returns:
      map containing defined backends
    • getBackendConfig

      public Config.Backend getBackendConfig(String backendName)
      Parameters:
      backendName - backend name
      Returns:
      the configuration of backend with given name
    • setBackends

      public void setBackends(ArrayList<Config.Backend> backends)
      Parameters:
      backends - backends configuration
    • getAccessControl

      public ArrayList<AclRule> getAccessControl()
      Returns:
      access control rules defined in config
    • setAccessControl

      public void setAccessControl(ArrayList<AclRule> accessControl)
      Parameters:
      accessControl - sets access control rules
    • getThumbnailsConfig

      public Config.Thumbnails getThumbnailsConfig()
      Returns:
      thumbnails configuration
    • setThumbnails

      public void setThumbnails(Config.Thumbnails thumbnails)
      Parameters:
      thumbnails - thumbnails configuration
    • getImagesConfig

      public Config.Images getImagesConfig()
      Returns:
      configuration for image processing
    • setImages

      public void setImages(Config.Images images)
      Parameters:
      images - configuration for image processing
    • getCacheConfig

      public Config.Cache getCacheConfig()
      Returns:
      cache configuration
    • setCache

      public void setCache(Config.Cache cache)
      Parameters:
      cache - cache configuration
    • getExtraHeaders

      public Map<String,String> getExtraHeaders()
      Returns:
      extra headers configuration
    • setExtraHeaders

      public void setExtraHeaders(Map<String,String> extraHeaders)
      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)