Difference between revisions of "Fsmonitor-call"

From GreenVulcano Wiki
Jump to: navigation, search
Line 25: Line 25:
 
Its subelements are:
 
Its subelements are:
 
* Description,
 
* Description,
* (LocalFileSystemMonitor or [[RemoteFileSystemMonitor]])
+
* (LocalFileSystemMonitor or RemoteFileSystemMonitor)
  
 
===LocalFileSystemMonitor===
 
===LocalFileSystemMonitor===
Line 40: Line 40:
 
* Description
 
* Description
 
* (InMemoryMonitorStatus or FileMonitorStatus)
 
* (InMemoryMonitorStatus or FileMonitorStatus)
* [[FileFilter]]
+
* FileFilter
* [[ResultFilter]]
+
* ResultFilter
 +
 
 +
 
 +
===RemoteFileSystemMonitor===
 +
 
 +
Configure a RemoteFileSystemMonitor instance, to be used to monitor a remote file system directory.
 +
 
 +
The RemoteFileSystemMonitor Element is used by ''fsmonitor-call''.
 +
 
 +
Its attributes are:
 +
* ''type'': fs-monitor.
 +
* ''class'': it.greenvulcano.util.file.monitor.RemoteFileSystemMonitor.
 +
* ''path'': Absolute path to monitor on local file system. Can contains [[placeholders]] which will be replaced at runtime.
 +
 
 +
and has the subelement:
 +
* Description
 +
* (InMemoryMonitorStatus | FileMonitorStatus)
 +
* FileFilter
 +
* ResultFilter
 +
* ([[FTPManager]] | [[SFTPManager]])
 +
 
  
 
====InMemoryMonitorStatus====
 
====InMemoryMonitorStatus====
Line 55: Line 75:
 
** true
 
** true
 
** false
 
** false
 +
  
 
====FileMonitorStatus====
 
====FileMonitorStatus====
Line 67: Line 88:
 
* ''statusFilePath'': The absolute path of the monitor status file.
 
* ''statusFilePath'': The absolute path of the monitor status file.
 
* ''errorOnInvalidFile'': If 'true' (default) an error is raised for invalid status file. <br/> The attribute's admitted values are:
 
* ''errorOnInvalidFile'': If 'true' (default) an error is raised for invalid status file. <br/> The attribute's admitted values are:
 +
** true
 +
** false
 +
 +
 +
====FileFilter====
 +
 +
Defines a file filter configuration. The FileFilter Element is used by ''LocalFileSystemMonitor'' and ''RemoteFileSystemMonitor''.
 +
 +
Its attributes are:
 +
* ''file-mask'': Regular expression for file name matching. Default to all files.
 +
* ''file-type'': Filter for file type. Default to 'files-only'. The attribute's admitted values are:
 +
** files-only
 +
** directories-only
 +
** all
 +
 +
 +
====ResultFilter====
 +
 +
Filter the information in AnalysisReport generated from a FileSystemMonitor.
 +
 +
The ResultFilter Element is used by ''LocalFileSystemMonitor'' and ''RemoteFileSystemMonitor''.
 +
 +
Its attributes are:
 +
* ''existing'': The attribute's admitted values are:
 +
** true
 +
** false
 +
* ''created'': The attribute's admitted values are:
 +
** false
 +
** true
 +
* ''modified'': The attribute's admitted values are:
 +
** false
 +
** true
 +
* ''deleted'': The attribute's admitted values are:
 +
** false
 +
** true
 +
* ''sort-mode'': The attribute's admitted values are:
 +
** by-name
 +
** by-time
 +
* ''sort-ascending'': The attribute's admitted values are:
 
** true
 
** true
 
** false
 
** false

Revision as of 20:50, 2 February 2012

This plug-in, when invoked, performs a scan of the directory specified in configuration, and returns a report in XML format (following the schema AnalysisReport.xsd) that can be configured to display any combination of the information listed below:

  • files CREATED in the directory since the last scan performed;
  • files MODIFIED in the directory since the last scan performed;
  • files DELETED from the directory since the last scan performed;
  • files EXISTENT in the directory;


You can restrict the scan to only files whose names conform to a regular expression defined in configuration.

If the invocation of the plug ends with the generation of a report, this report is included in the object field of output GVBuffer.

In the output GVBuffer are also set the following properties:

  • GVFSM_REPORT_CREATED set to true if a report XML and was created.
  • GVFSM_EXISTING_FILES set if the filter existing was configured and in target directory exist files whose name conforms to the pattern specified in configuration. Contains the number of such files.
  • GVFSM_CREATED_FILES set if the filter created was configured and the in target directory, after the last scan performed, were created file whose name is consistent with the pattern specified in the configuration. Contains the number of such files.
  • GVFSM_MODIFIED_FILES set if the filter 'modified' was configured and the in target directory, after the last scan performed, were modified file whose name is consistent with the pattern specified in the configuration. Contains the number of such files.
  • GVFSM_DELETED_FILES set if the filter 'deleted' was configured and the in target directory, after the last scan performed, were deleted file whose name is consistent with the pattern specified in the configuration. Contains the number of such files.


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

  • type: call.
  • class: it.greenvulcano.gvesb.virtual.file.reader.AnalyzeDirCall.
  • name: Operation name. Used in the 'Flow' section to associate workflow nodes to VCL operations.

Its subelements are:

  • Description,
  • (LocalFileSystemMonitor or RemoteFileSystemMonitor)

LocalFileSystemMonitor

This subelement configures a LocalFileSystemMonitor instance, to be used to monitor a local file system directory.

The LocalFileSystemMonitor Element is used only by fsmonitor-call. Its attributes are:

  • type: fs-monitor.
  • class: it.greenvulcano.util.file.monitor.LocalFileSystemMonitor.
  • path: Absolute path to monitor on local file system. Can contains placeholders which will be replaced at runtime.

It has the following subelements:

  • Description
  • (InMemoryMonitorStatus or FileMonitorStatus)
  • FileFilter
  • ResultFilter


RemoteFileSystemMonitor

Configure a RemoteFileSystemMonitor instance, to be used to monitor a remote file system directory.

The RemoteFileSystemMonitor Element is used by fsmonitor-call.

Its attributes are:

  • type: fs-monitor.
  • class: it.greenvulcano.util.file.monitor.RemoteFileSystemMonitor.
  • path: Absolute path to monitor on local file system. Can contains placeholders which will be replaced at runtime.

and has the subelement:

  • Description
  • (InMemoryMonitorStatus | FileMonitorStatus)
  • FileFilter
  • ResultFilter
  • (FTPManager | SFTPManager)


InMemoryMonitorStatus

Configure a InMemoryMonitorStatus to be used to hold a FileSystemMonitor status in memory.

The InMemoryMonitorStatus Element is used by LocalFileSystemMonitor and RemoteFileSystemMonitor.

The element's attributes are:

  • type: fs-monitor-status.
  • class: it.greenvulcano.util.file.monitor.status.InMemoryMonitorStatus.
  • dumpStatus: If 'true' (default) the status is dumped on log on every update.
    The attribute's admitted values are:
    • true
    • false


FileMonitorStatus

Configure a FileMonitorStatus to be used to hold a FileSystemMonitor status in a local file.

The FileMonitorStatus Element is used by LocalFileSystemMonitor and RemoteFileSystemMonitor.

Its attributes are:

  • type: fs-monitor-status.
  • class: it.greenvulcano.util.file.monitor.status.FileMonitorStatus.
  • statusFilePath: The absolute path of the monitor status file.
  • errorOnInvalidFile: If 'true' (default) an error is raised for invalid status file.
    The attribute's admitted values are:
    • true
    • false


FileFilter

Defines a file filter configuration. The FileFilter Element is used by LocalFileSystemMonitor and RemoteFileSystemMonitor.

Its attributes are:

  • file-mask: Regular expression for file name matching. Default to all files.
  • file-type: Filter for file type. Default to 'files-only'. The attribute's admitted values are:
    • files-only
    • directories-only
    • all


ResultFilter

Filter the information in AnalysisReport generated from a FileSystemMonitor.

The ResultFilter Element is used by LocalFileSystemMonitor and RemoteFileSystemMonitor.

Its attributes are:

  • existing: The attribute's admitted values are:
    • true
    • false
  • created: The attribute's admitted values are:
    • false
    • true
  • modified: The attribute's admitted values are:
    • false
    • true
  • deleted: The attribute's admitted values are:
    • false
    • true
  • sort-mode: The attribute's admitted values are:
    • by-name
    • by-time
  • sort-ascending: The attribute's admitted values are:
    • true
    • false