Filereader-call

From GreenVulcano Wiki
Revision as of 12:42, 30 January 2012 by Anonymous (talk) (Created page with "==Definition== This plug-in allows you to read the contents of a file on the local file system and saves it in the field "object" of output. {{GVESB}} provides two different too...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Definition

This plug-in allows you to read the contents of a file on the local file system and saves it in the field "object" of output.

GreenVulcano® ESB provides two different tools, GV Console® and VulCon®, to configure all supported plug-ins in GV services.

VulCon / GV Console Configuration

This plug-in reads the local filesystem file's content, and saves it in output GVBuffer 'object' field.

Complete file path is the concatenation of 'srcPath' attribute, with the 'fileName' attribute.

Both of them can contain placeholders, that are expanded at plugin call time.

Attributes 'srcPath' and 'fileName' are subject to these constraints:

  • attribute srcPath is overridden by GVFR_DIRECTORY property, if present in current GVBuffer. If property is not defined in GVBuffer, the 'srcPath' attribute in the configuration is used. In both cases, the value of this attribute can be a placeholder, resolved at plugin call time, and the result of the expansion, must result in an absolute pathname, otherwise an exception is thrown. An exception is also thrown if neither the property nor the attribute in configuration are set.
  • attribute fileName is overridden by GVFR_FILE_NAME property, if present in current GVBuffer. If property is not defined in GVBuffer, the 'fileName' attribute in the configuration is used. In both cases, the value of this attribute can be a placeholder, resolved at plugin call time, and the result of the expansion, combined with the previous attribute, must result in an existent resource in the local filesystem, otherwise an exception is thrown. An exception is also thrown if neither the property nor the attribute in configuration are set.

The filereader-call Element is used by: Channel, routed-call. It has the following attributes:

  • type: call.
  • class: it.greenvulcano.gvesb.virtual.file.reader.FileReader.
  • name: Operation name. Used in the 'Flow' section to associate workflow nodes to VCL operations.
  • srcPath: This value can be static or dynamic, containing placeholders that could be replaced at plugin call time. This is a default value, and is used if the property 'GVFR_DIRECTORY' is not defined in the current GVBuffer.
  • fileName: This value can be static or dynamic, containing placeholders that could be replaced at plugin call time. This is a default value, and is used if the property 'GVFR_FILE_NAME' is not defined in the current GVBuffer.

and the subelements:

  • Description,
  • xml-processor.

xml-processor

If this element is specified, the plugin will read the file directly parsed as an XML. It is only used by filereader-call.

Its attributes are:

  • as-xml: If true the file is parsed as an XML. Default is false. The attribute's admitted values are:
    • true
    • false
  • use-axiom: If true uses AXIOM instead of DOM to parse the file. Default is false. The attribute's admitted values are:
    • true
    • false
  • validating: If true the XML representing the file is validated. This option applies only if as-xml is true. Default is false. The attribute's admitted values are:
    • true
    • false
  • namespace-aware: If true the DOM keeps informations about the declared namespaces on the file. This option applies only if as-xml is true. Default is false. The attribute's admitted values are:
    • true
    • false