Configuration file is a typical Java properties file. It is composed of 3 main levels: global, directory and plugin.
You can use the JVM parameter direxe.config.path (-D switch) to specify a different location of the direxe.properties file.
If you are writing your own plugin, the each property can be automatically loaded into your configuration class (POJO class where you hold your configuration data). The condition is that the properties are defined as simple public fields and that the class is named like your Plugin class + "Config".
direxe.defaultPollSeconds
Default polling interval in seconds for each directory.
Default is 1000.
direxe.dir.mydir
Directory section named "mydir"
direxe.dir.mydir.className
Name of the plugin class. Plugin class must implement smolasoftware.direxe.processor.Processor.
Out-of-the-box plugin classes are:
smolasoftware.direxe.processor.Mail
smolasoftware.direxe.processor.Move
smolasoftware.direxe.processor.System
direxe.dir.mydir.path
Path of the directory.
direxe.dir.mydir.pollSeconds
Polling interval in seconds. Default is taken from direxe.defaultPollSeconds.
direxe.dir.mydir.executeTimeoutSeconds
Timeout in seconds before execution will be terminated. If not defined or less than 1 it is ignored.
direxe.dir.mydir.ignoreErrors
Tries to ignores errors from the plugin. JVM crashes are possible.
direxe.dir.mydir.filters
Map of included file filters. Example:
direxe.dir.mydir.filters.1=*.txt
direxe.dir.mydir.filters.2=*.java
direxe.dir.mydir.filters.5=*.html
...
direxe.dir.mydir.excludeFilters
Map of excluded file filters. Example:
direxe.dir.mydir.excludeFilters.5=*.*zip
direxe.dir.mydir.excludeFilters.6=*.?ar
direxe.dir.mydir.excludeFilters.12=index.html
...
direxe.dir.movedir.destination (template aware)
Destination directory path. Examples:
- with template variable for file extension on Unix
direxe.dir.movedir.destination=c:\incoming
direxe.dir.movedir.destination=/incoming_/E
direxe.dir.movedir.destination=c:\incoming\\E - with template variable for file extension on Windows
direxe.dir.movedir.overwrite
Overwrites the destination file. Default is true.
direxe.dir.movedir.overwriteOlder
Overwrites the destination file only if it is older than the source file.
Default is false.
direxe.dir.movedir.renameTo (template aware)
Renames the destination file. It is not possible to use this parameter to move file to another subirectory (e.g. to use mynewdir//F). Examples:
(Windows) Name invoice.pdf renamed to \N_\D.\E becomes invoice_20120622.pdf
(Linux) Name invoice.pdf renamed to /F.bak becomes invoice.pdf.bak
direxe.dir.movedir.dateFormat
Date format as defined in class java.text.SimpleDateFormat (docs.oracle.com). It is used for the date template variable.
direxe.dir.maildir.asAttachment
Mail as message attachment. Otherwise mail as message body.
direxe.dir.maildir.fromAddress
From address field.
direxe.dir.maildir.footer (template aware)
Footer text. If you define FooterFile property, both will get added.
You can use all template variables.
direxe.dir.maildir.footerFile (template aware)
Path to the file which contains additional footer text.
You can use all template variables.
direxe.dir.maildir.header (template aware)
Header text. If you define HeaderFile property, both will get added.
You can use all template variables.
direxe.dir.maildir.headerFile (template aware)
Path to the file which contains additional header text.
You can use all template variables.
direxe.dir.maildir.mailServer
SMPT mail server (for sending mails).
direxe.dir.maildir.mimeType
Mail mime type. Default is plain/text.
direxe.dir.maildir.subject (template aware)
Mail subject text. You can use all template variables.
You can use all template variables.
direxe.dir.maildir.toAddress
Destination address.
direxe.dir.sysdir.command
Starts a system process with command text (and arguments if defined). Complex arguments (with space, quotes or with template variables) should probably be placed in the arg property. Examples:
direxe.dir.sysdir.command=cmd /c start MyFolder - opens folder window for MyFolder (on Windows)
direxe.dir.sysdir.command=run.bat /F - starts a BAT file with the processing file as an argument
direxe.dir.sysdir.command=\F - starts the processing filename
direxe.dir.sysdir.arg
Map of arguments for the command. Examples:
direxe.dir.sysdir.command=notepad.exe
direxe.dir.sysdir.arg.1=%A
direxe.dir.sysdir.waitForFinish
Waits until the process finishes. Default is false.
direxe.dir.sysdir.workingDirectory
Set the working directory for the process. Default is the directory.
direxe.dir.sysdir.dateFormat
Date format as defined in class java.text.SimpleDateFormat (docs.oracle.com). It is used for the date template variable.
Map properties are used for lists of values. They have an additional ID. Values will be sorted by the ID (as text). ID can be a number or a text. Example:
items.20=value3
items.1=value1
items.23=value4
items.2=value2
items.A=value5
items.B=value6