file-commands

FileSearchCommand

Check if one or more files, whose name conforms to a given regular expression, exists within the specified directory. On completion of and in the absence of errors are set the following properties of output GVBuffer: 1) GVFM_FOUND_FILES_NUM Number of files found (= 0) 2) GVFM_FOUND_FILES_LIST List of names of found files, separated by ‘;’. Set only if the value of field ‘GVFM_FOUND_FILES_NUM’ is greater than 0. Both the pattern of the file and that the directory can be static or contain placeholders that are replaced at runtime. Can contains the following placeholders:

  • fixed : a text string;
  • $ : a System property name;
  • sp : a System property name;
  • env : an Environment variable value;
  • @ : a inProperties property name;
  • timestamp : return the current timestamp, in optional tZone value, formatted as ‘pattern’
  • dateformat : reformat ‘date’ from ‘source-pattern’ to ‘dest-pattern’, and optionally from ‘source-tZone’ to ‘dest-tZone’
  • decode : evaluate as if-then-else; if ‘field’ is equal to cond1…n, return the value of val1…n, otherwise ‘default’
  • decodeL : is equivalent to ‘decode’, with the difference that ‘condX’ can be a list of values separated by ‘sep’
  • script : evaluate a ‘lang’ script, using the base context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • js : evaluate a JavaScript script, using the context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • ognl : evaluate a OGNL script, the GVBuffer is added to the scope as ‘object’ (and is also the object on which execute the script !! NO MORE FROM 3.5 !!),
  • sql : execute a select sql statement sql and return the value of the first field of the first selected record. The ‘conn’ parameter is the JNDI name of a DataSource
  • sqllist : execute a select sql statement sql and return the value of the first field of all selected records as a ‘sep’ separated list. The ‘conn’ parameter is the JNDI name of a DataSource The ‘sep’ parameter defaults to comma
  • sqltable : executes a select sql statement and returns all values of returned cursor as an XML. The ‘conn’ parameter is the JNDI name of a DataSource.

Fixed attributes:

  • class: Unmodifiable. Used by GreenVulcanoESB factory framework.
  • type: Unmodifiable. Used by GreenVulcanoESB factory framework.

Implied attributes:

  • returnFullPath: If true the found files are inserted in list with full path. Default false.
  • isCritical: If true an internal error interrupt the command sequence. Default true.

Required attributes:

  • sourcePath: Absolute path of the directory to search in.
  • filePattern: File name to search for. Can be a regular espression.

Subelements

FileSearchCommand has the followong subelement:

  • Description (optional).

FileMoveCommand

Move/rename a file/directory. The file name, the source and destination directory names can be static or contain placeholders that are replaced at runtime. After the replacement of the placeholder, the value of the ‘filename’ may contain a regular expression, in which case, all files of the source directory, whose name is in accordance with the corresponding pattern will be moved to the destination directory. If the destination directory already contains files with the same name, they will be overwritten. Can contains the following placeholders:

  • fixed : a text string;
  • $ : a System property name;
  • sp : a System property name;
  • env : an Environment variable value;
  • @ : a inProperties property name;
  • timestamp : return the current timestamp, in optional tZone value, formatted as ‘pattern’
  • dateformat : reformat ‘date’ from ‘source-pattern’ to ‘dest-pattern’, and optionally from ‘source-tZone’ to ‘dest-tZone’
  • decode : evaluate as if-then-else; if ‘field’ is equal to cond1…n, return the value of val1…n, otherwise ‘default’
  • decodeL : is equivalent to ‘decode’, with the difference that ‘condX’ can be a list of values separated by ‘sep’
  • script : evaluate a ‘lang’ script, using the base context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • js : evaluate a JavaScript script, using the context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • ognl : evaluate a OGNL script, the GVBuffer is added to the scope as ‘object’ (and is also the object on which execute the script !! NO MORE FROM 3.5 !!),
  • sql : execute a select sql statement sql and return the value of the first field of the first selected record. The ‘conn’ parameter is the JNDI name of a DataSource
  • sqllist : execute a select sql statement sql and return the value of the first field of all selected records as a ‘sep’ separated list. The ‘conn’ parameter is the JNDI name of a DataSource The ‘sep’ parameter defaults to comma
  • sqltable : executes a select sql statement and returns all values of returned cursor as an XML. The ‘conn’ parameter is the JNDI name of a DataSource.

Fixed attributes:

  • class: Unmodifiable. Used by GreenVulcanoESB factory framework.
  • type: Unmodifiable. Used by GreenVulcanoESB factory framework.

Implied attributes:

  • filePattern: File name to move. Can be a regular espression. Is used only if sourcePath is a directory, and if empty the filter is ignored.
  • isCritical: If true an internal error interrupt the command sequence. Default true.

Required attributes:

  • sourcePath: Absolute path of the file/directory to move.
  • targetPath: Absolute path of the destination file/directory.

Subelements

FileMoveCommand has the followong subelement:

  • Description (optional).

FileDeleteCommand

Deleting a file/directory. Both the file name and the directory can be static or contain placeholders that are replaced at runtime. After the replacement of the placeholder, the value of the ‘filename’ may contain a regular expression, in which case, will erase all files in the specified directory whose name is consistent with the corresponding pattern. Can contains the following placeholders:

  • fixed : a text string;
  • $ : a System property name;
  • sp : a System property name;
  • env : an Environment variable value;
  • @ : a inProperties property name;
  • timestamp : return the current timestamp, in optional tZone value, formatted as ‘pattern’
  • dateformat : reformat ‘date’ from ‘source-pattern’ to ‘dest-pattern’, and optionally from ‘source-tZone’ to ‘dest-tZone’
  • decode : evaluate as if-then-else; if ‘field’ is equal to cond1…n, return the value of val1…n, otherwise ‘default’
  • decodeL : is equivalent to ‘decode’, with the difference that ‘condX’ can be a list of values separated by ‘sep’
  • script : evaluate a ‘lang’ script, using the base context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • js : evaluate a JavaScript script, using the context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • ognl : evaluate a OGNL script, the GVBuffer is added to the scope as ‘object’ (and is also the object on which execute the script !! NO MORE FROM 3.5 !!),
  • sql : execute a select sql statement sql and return the value of the first field of the first selected record. The ‘conn’ parameter is the JNDI name of a DataSource
  • sqllist : execute a select sql statement sql and return the value of the first field of all selected records as a ‘sep’ separated list. The ‘conn’ parameter is the JNDI name of a DataSource The ‘sep’ parameter defaults to comma
  • sqltable : executes a select sql statement and returns all values of returned cursor as an XML. The ‘conn’ parameter is the JNDI name of a DataSource.

Fixed attributes:

  • class: Unmodifiable. Used by GreenVulcanoESB factory framework.
  • type: Unmodifiable. Used by GreenVulcanoESB factory framework.

Implied attributes:

  • isCritical: If true an internal error interrupt the command sequence. Default true.
  • filePattern: File name to remove. Can be a regular espression. Is used only if targetPath is a directory, and if empty the filter is ignored.

Required attributes:

  • targetPath: Absolute path of the file/directory to remove.

Subelements

FileDeleteCommand has the followong subelement:

  • Description (optional).

FileCopyCommand

Copy a file/directory. The file name, the source and destination directory names can be static or contain placeholders that are replaced at runtime. After the replacement of the placeholder, the value of the ‘filename’ may contain a regular expression, in which case, all files of the source directory, whose name is in accordance with the corresponding pattern will be copied to the destination directory. If the destination directory already contains files with the same name, they will be overwritten. Can contains the following placeholders:

  • fixed : a text string;
  • $ : a System property name;
  • sp : a System property name;
  • env : an Environment variable value;
  • @ : a inProperties property name;
  • timestamp : return the current timestamp, in optional tZone value, formatted as ‘pattern’
  • dateformat : reformat ‘date’ from ‘source-pattern’ to ‘dest-pattern’, and optionally from ‘source-tZone’ to ‘dest-tZone’
  • decode : evaluate as if-then-else; if ‘field’ is equal to cond1…n, return the value of val1…n, otherwise ‘default’
  • decodeL : is equivalent to ‘decode’, with the difference that ‘condX’ can be a list of values separated by ‘sep’
  • script : evaluate a ‘lang’ script, using the base context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • js : evaluate a JavaScript script, using the context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • ognl : evaluate a OGNL script, the GVBuffer is added to the scope as ‘object’ (and is also the object on which execute the script !! NO MORE FROM 3.5 !!),
  • sql : execute a select sql statement sql and return the value of the first field of the first selected record. The ‘conn’ parameter is the JNDI name of a DataSource
  • sqllist : execute a select sql statement sql and return the value of the first field of all selected records as a ‘sep’ separated list. The ‘conn’ parameter is the JNDI name of a DataSource The ‘sep’ parameter defaults to comma
  • sqltable : executes a select sql statement and returns all values of returned cursor as an XML. The ‘conn’ parameter is the JNDI name of a DataSource.

Fixed attributes:

  • class: Unmodifiable. Used by GreenVulcanoESB factory framework.
  • type: Unmodifiable. Used by GreenVulcanoESB factory framework.

Implied attributes:

  • filePattern: File name to copy. Can be a regular espression. Is used only if sourcePath is a directory, and if empty the filter is ignored.
  • isCritical: If true an internal error interrupt the command sequence. Default true.

Required attributes:

  • targetPath: Absolute path of the destination file/directory.
  • sourcePath: Absolute path of the file/directory to copy.

Subelements

FileCopyCommand has the followong subelement:

  • Description (optional).

FileZipCommand

Compression of one or more files/directories in a directory source to a ZIP file into a target directory. The file name, the source and destination directory names can be static or contain placeholders that are replaced at runtime. If the destination directory already has a ZIP file with the same name, it will be overwritten. Can contains the following placeholders:

  • fixed : a text string;
  • $ : a System property name;
  • sp : a System property name;
  • env : an Environment variable value;
  • @ : a inProperties property name;
  • timestamp : return the current timestamp, in optional tZone value, formatted as ‘pattern’
  • dateformat : reformat ‘date’ from ‘source-pattern’ to ‘dest-pattern’, and optionally from ‘source-tZone’ to ‘dest-tZone’
  • decode : evaluate as if-then-else; if ‘field’ is equal to cond1…n, return the value of val1…n, otherwise ‘default’
  • decodeL : is equivalent to ‘decode’, with the difference that ‘condX’ can be a list of values separated by ‘sep’
  • script : evaluate a ‘lang’ script, using the base context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • js : evaluate a JavaScript script, using the context ‘scope’, the GVBuffer is added to the scope as ‘object’
  • ognl : evaluate a OGNL script, the GVBuffer is added to the scope as ‘object’ (and is also the object on which execute the script !! NO MORE FROM 3.5 !!),
  • sql : execute a select sql statement sql and return the value of the first field of the first selected record. The ‘conn’ parameter is the JNDI name of a DataSource
  • sqllist : execute a select sql statement sql and return the value of the first field of all selected records as a ‘sep’ separated list. The ‘conn’ parameter is the JNDI name of a DataSource The ‘sep’ parameter defaults to comma
  • sqltable : executes a select sql statement and returns all values of returned cursor as an XML. The ‘conn’ parameter is the JNDI name of a DataSource.

Fixed attributes:

  • type: Unmodifiable. Used by GreenVulcanoESB factory framework.
  • class: Unmodifiable. Used by GreenVulcanoESB factory framework.

Implied attributes:

  • filePattern: File name to zip. Can be a regular espression. Is used only if sourcePath is a directory, and if empty the filter is ignored.
  • isCritical: If true an internal error interrupt the command sequence. Default true.

Required attributes:

  • sourcePath: Absolute path of the source directory.
  • targetPath: Absolute path of the destination directory.
  • zipFileName: Name of the zip file.

Subelements

FileZipCommand has the followong subelement:

  • Description (optional).

FileUnZipCommand

Unpacking the contents of a Zip file in a directory source to a target directory. The file name, the source and destination directory names can be static or contain placeholders that are replaced at runtime.

Fixed attributes:

  • class: Unmodifiable. Used by GreenVulcanoESB factory framework.
  • type: Unmodifiable. Used by GreenVulcanoESB factory framework.

Implied attributes:

  • isCritical: If true an internal error interrupt the command sequence. Default true.

Required attributes:

  • zipFileName: Name of the zip file.
  • sourcePath: Absolute path of the source directory.
  • targetPath: Absolute path of the destination directory.

Subelements

FileUnZipCommand has the followong subelement:

  • Description (optional).