Ellié Computing Home Page
My Shopping Cart

Your shopping cart is empty

Display Cart

Call us at +1 586 62 ELLIE / +1 586 62 35543 Office Opened
sales@elliecomputing.com - Contact us


UserProcessFilter object

 

 

Prototype for UserProcessFilter objects. Is kind of ConfigurationObject.

Syntax

To create a UserProcessFilter, call the constructor:

var upf = new UserProcessFilter;

Parameters

none.

Property Of

none.

Implemented In

ECMerge 2.1

Description

UserProcessFilter objects describes all the options concerning a user filter, built around the execution of process.

Properties

Property Description
activate_by_pattern Boolean. True when the activation test if based on the filename matching activation_pattern and the type of document required by the user being in adequation with the document type found for the data sources.
activate_as_sub_doc Boolean. True if this filter should activate when comparison are as sub-document from a folder comparison (such as when generating reports or computing differences). This is particularly useful to disable some filters which give a precise insight but which are not useful to determine differences (de-compression filters, such ungzip).
activation_document_type Document Type string. See activate_by_pattern.
activation_pattern Pattern String. See activate_by_pattern.
application_path String. Path to the application.
arguments String. Arguments to pass to the application. Use $(input) for the input location, $(output) for the output location.
check_exit_code Boolean. If true, exit code should be checked against success_exit_code equality to test for success, else success is always assumed.
fixed_output_extension Boolean. True if output_extension is used, false if script_for_output_filename is used.
name String. Name of the filter is it appear in the name column of the filters panel.
output_extension String. Extension to add the temporary file output name. Some filters may determine their output type from this (for example, some image filters decide to output bitmaps if the extension is "bmp").
output_is_folder Boolean. True if the output of the filter is a folder (archives filters output folders).
script_for_activation String. This script is a function body of 'function (filename, expects)', filename being the $(input) as in arguments, and expects is either undefined if the user did not force a particular comparison type or one of the known Document Type String. The return value is true if the converter should be activated
script_for_output_filename String. This script is a function body of 'function (filename)', the return value is the filename to use as output. The returned filename must be unique to avoid collision a function is provided by the virtual file system scripting (VFS.get_temporary_file_name) for that purpose.
success_exit_code Integer. Exit code that the filter should return to be considered successful. See check_exit_code

 

Methods

 none specific.

Examples

Example 1.

 Creates a UserProcessFilter and add it as a loading filter in a freshly created OptionsSet:

var upf = new UserProcessFilter;
upf.activate_by_pattern = true;
upf.activation_pattern = "*.doc";
upf.application_path = "/usr/bin/doc_converter";
upf.arguments = "$(input) $(output)";

var options_set = new OptionsSet ();
options_set["filters.loading"].push (upf);

See Also 

 ConfigurationObject object, Document Type string