Configuration of C5Connector.Java

In the meaning of 'convention over configuration' all properties are predefined. Change only those intended to override for the entire web application.

There are two ways to override the default properties permanently:

  • By creating a c5connector.properties file in the classpath (usually WEB-INF/classes):
      ...
      connector.impl = codes.thischwa.c5c.impl.LocalConnector
      ...
  • By calling dynamically the PropertiesLoader class:
      ...
      import codes.thischwa.c5c.PropertiesLoader;
      ...
      PropertiesLoader.setProperty("connector.impl", "codes.thischwa.c5c.impl.LocalConnector");
      ...
Attention:
It is essential to know how to use the PropertiesLoader. Like the usage of the common properties, you should use it only at the start of your web application. If you don't have a kind of an 'initialization' servlet, where you could place the PropertiesLoader calls, I suggest writing your own ServletContextListener. Thus you guarantee, you call the PropertiesLoader before the ConnectorServlet is initialized.

As you can see, both ways of setting a property are equally functional. The table below lists all configurable properties for the C5Connector.Java.

Configuration properties

Property Default Valid Values Description
default.encoding UTF-8 any valid standard charset The general character encoding. Should be untouched!
connector.defaultEncoding ISO-8859-1 any valid standard charset, or empty The character encoding of the HttpResponse. If it is empty, no charset will be explicitly set. Should be untouched!
connector.forceSingleExtension true true, false (boolean) Indicates whether filenames with multiple extensions are sanitized. Not yet implemented!
connector.filemanagerPath /filemanager any path The path of the editor installation resides within your webapp.
connector.maxUploadSize 10 any integer The maximum size for files that can be uploaded in MB (it's respected, if the filemanager config upload#fileSizeLimit='auto').
connector.impl codes.thischwa.c5c.impl .LocalConnector Any fully-qualified class name of a valid codes.thischwa.c5c.Connector implementation. The implementation of the codes.thischwa.c5c.Connector.
connector.capabilities select,delete,rename,download One or more of the capabilities: select,delete,rename,download Comma separated list with capabilities which are sent per default on each info request. This list is used by codes.thischwa.c5c.requestcycle.impl.DefaultCapability.
connector.filemanagerConfigImpl codes.thischwa.c5c.requestcycle.impl .GlobalFilemanagerLibConfig Any fully-qualified class name of a valid codes.thischwa.c5c.requestcycle .FilemanagerConfigBuilder implementation. The implementation of the codes.thischwa.c5c.requestcycle.FilemanagerConfigBuilder.
connector.messageResolverImpl codes.thischwa.c5c.impl .FilemanagerMessageLibResolver Any fully-qualified class name of a valid codes.thischwa.c5c.MessageResolver implementation. The implementation of the codes.thischwa.c5c.MessageResolver.
connector.defaultConfigResolverImpl codes.thischwa.c5c.impl .FilemanagerDefaultConfigLibResolver Any fully-qualified class name of a valid codes.thischwa.c5c.DefaultConfigResolver implementation. The implementation of the codes.thischwa.c5c.DefaultConfigResolver.
connector.iconResolverImpl codes.thischwa.c5c.requestcycle.impl .FilemanagerIconLibResolver Any fully-qualified class name of a valid codes.thischwa.c5c.requestcycle.IconResolver implementation. The implementation of the codes.thischwa.c5c.requestcycle.IconResolver.
connector.fileCapabilityImpl codes.thischwa.c5c.requestcycle.impl .DefaultCapability Any fully-qualified class name of a valid codes.thischwa.c5c.requestcycle .FilemanagerCapability implementation. The implementation of the codes.thischwa.c5c.requestcycle.FilemanagerCapability.
connector.userPathBuilderImpl codes.thischwa.c5c.impl .ServerPathBuilder Any fully-qualified class name of a valid codes.thischwa.c5c.requestcycle .BackendPathBuilder implementation. The implementation of the codes.thischwa.c5c.requsetcycle.BackendPathBuilder.
connector.exifRemoverImpl codes.thischwa.c5c.impl .ExifRemoverImpl Any fully-qualified class name of a valid codes.thischwa.c5c.ExifRemover implementation. The implementation of the codes.thischwa.c5c.ExifRemover.
connector.thumbnail.dimension 64x64 any string of the pattern [number]x[number] The dimension of thumbnails Should be untouched!
connector.preview.dimension 750x1200 any string of the pattern [number]x[number] The max. dimension of the image prieview. If it isn't set or greater than the original size the image will be be shown in its original size.
connector.regex.exclude.files ^\..* any Java regex which checks the whole term (name) Regex to check, if the file is allowed to display or not.
connector.regex.exclude.folders ^\..* any Java regex which checks the whole term (name) Regex to check, if the folder is allowed to display or not.
jii.impl de.thischwa.jii.core .ImageInfoWrapper Any fully-qualified class name of a valid IDimensionProvider implementation. The implementation of the IDimensionProvider, see JII.