Difference between revisions of "Fsmonitor-call"

From GreenVulcano Wiki
Jump to: navigation, search
({{VULCON}} / {{GVCONSOLE}} Configuration)
Line 45: Line 45:
 
The LocalFileSystemMonitor Element is used only by ''fsmonitor-call''.
 
The LocalFileSystemMonitor Element is used only by ''fsmonitor-call''.
 
Its attributes are:
 
Its attributes are:
* ''type'': fs-monitor.
+
{|class="gvtable"
* ''class'': it.greenvulcano.util.file.monitor.LocalFileSystemMonitor.
+
! Attribute !! Type !! Description
* ''path'': Absolute path to monitor on local file system. Can contains [[placeholders]] which will be replaced at runtime.
+
|-
 +
| type || fixed || This attribute must assume the value '''fs-monitor'''.
 +
|-
 +
| class || fixed ||  This attribute must assume the value '''it.greenvulcano.util.file.monitor.LocalFileSystemMonitor'''.
 +
|-
 +
| path || required || Absolute path to monitor on local file system. Can contains [[placeholders]] which will be replaced at runtime.
 +
|}
  
 
It has the following subelements:
 
It has the following subelements:
Line 63: Line 69:
  
 
Its attributes are:
 
Its attributes are:
* ''type'': fs-monitor.
+
{|class="gvtable"
* ''class'': it.greenvulcano.util.file.monitor.RemoteFileSystemMonitor.
+
! Attribute !! Type !! Description
* ''path'': Absolute path to monitor on local file system. Can contains [[placeholders]] which will be replaced at runtime.
+
|-
 +
| type || fixed || This attribute must assume the value '''fs-monitor'''.
 +
|-
 +
| class || fixed ||  This attribute must assume the value '''it.greenvulcano.util.file.monitor.RemoteFileSystemMonitor'''.
 +
|-
 +
| path || required || Absolute path to monitor on local file system. Can contains [[placeholders]] which will be replaced at runtime.
 +
|}
  
 
and has the subelement:
 
and has the subelement:
Line 82: Line 94:
  
 
The element's attributes are:
 
The element's attributes are:
* ''type'': fs-monitor-status.
+
{|class="gvtable"
* ''class'': it.greenvulcano.util.file.monitor.status.InMemoryMonitorStatus.
+
! Attribute !! Type !! Description
* ''dumpStatus'': If 'true' (default) the status is dumped on log on every update. <br/> The attribute's admitted values are:
+
|-
** true
+
| type || fixed || This attribute must assume the value '''fs-monitor'''.
** false
+
|-
 
+
| class || fixed ||  This attribute must assume the value '''it.greenvulcano.util.file.monitor.InMemoryMonitorStatus'''.
 +
|-
 +
| dumpStatus || required || If 'true' (default) the status is dumped on log on every update. <br/> The attribute's admitted values are:
 +
* true
 +
* false
 +
|}
  
 
====FileMonitorStatus====
 
====FileMonitorStatus====
Line 96: Line 113:
  
 
Its attributes are:
 
Its attributes are:
* ''type'': fs-monitor-status.
+
{|class="gvtable"
* ''class'': it.greenvulcano.util.file.monitor.status.FileMonitorStatus.
+
! Attribute !! Type !! Description
* ''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:
+
| type || fixed || This attribute must assume the value '''fs-monitor-status'''.
** true
+
|-
** false
+
| class || fixed ||  This attribute must assume the value '''it.greenvulcano.util.file.monitor.FileMonitorStatus'''.
 
+
|-
 +
| statusFilePath || required || The absolute path of the monitor status file.
 +
|-
 +
| errorOnInvalidFile || optional || If ''true'' (default) an error is raised for invalid status file. <br/> The attribute's admitted values are:
 +
* true
 +
* false
 +
|}
  
 
====FileFilter====
 
====FileFilter====
Line 109: Line 132:
  
 
Its attributes are:  
 
Its attributes are:  
* ''file-mask'': Regular expression for file name matching. Default to all files.
+
{|class="gvtable"
* ''file-type'': Filter for file type. Default to 'files-only'. The attribute's admitted values are:
+
! Attribute !! Type !! Description
** files-only
+
|-
** directories-only
+
| file-mask || optional || Regular expression for file name matching. Default to all files.
** all
+
|-
 
+
| file-type || optional || Filter for file type. Default to 'files-only'. The attribute's admitted values are:
 +
* files-only
 +
* directories-only
 +
* all
 +
|}
  
 
====ResultFilter====
 
====ResultFilter====
Line 123: Line 150:
  
 
Its attributes are:
 
Its attributes are:
* ''existing'': The attribute's admitted values are:
+
{|class="gvtable"
** true
+
! Attribute !! Type !! Description
** false
+
|-
* ''created'': The attribute's admitted values are:
+
| existing || required || The attribute's admitted values are:
** false
+
* true
** true
+
* false
* ''modified'': The attribute's admitted values are:
+
|-
** false
+
| created || required ||The attribute's admitted values are:
** true
+
* false
* ''deleted'': The attribute's admitted values are:
+
* true
** false
+
|-
** true
+
| modified || required ||The attribute's admitted values are:
* ''sort-mode'': The attribute's admitted values are:
+
* false
** by-name
+
* true
** by-time
+
|-
* ''sort-ascending'': The attribute's admitted values are:
+
| deleted || required ||The attribute's admitted values are:
** true
+
* false
** false
+
* true
 +
|-
 +
| sort-mode || required ||The attribute's admitted values are:
 +
* by-name
 +
* by-time
 +
|-
 +
| sort-ascending || required ||The attribute's admitted values are:
 +
* true
 +
* false
 +
|}

Revision as of 09:21, 9 February 2012

Description

Use fsmonitor-call plugin for scanning a specific directory looking for the number of files existing, created, modified and cancelled since the last scan.

VulCon / GV Console Configuration

This GreenVulcano® ESB 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:

Attribute Type Description
type fixed This attribute must assume the value call.
class fixed This attribute must assume the value it.greenvulcano.gvesb.virtual.file.reader.AnalyzeDirCall.
name required Operation name. Used in the 'Flow' section to associate workflow nodes to VCL operations.

Its subelements are:

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:

Attribute Type Description
type fixed This attribute must assume the value fs-monitor.
class fixed This attribute must assume the value it.greenvulcano.util.file.monitor.LocalFileSystemMonitor.
path required Absolute path to monitor on local file system. Can contains placeholders which will be replaced at runtime.

It has the following subelements:


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:

Attribute Type Description
type fixed This attribute must assume the value fs-monitor.
class fixed This attribute must assume the value it.greenvulcano.util.file.monitor.RemoteFileSystemMonitor.
path required Absolute path to monitor on local file system. Can contains placeholders which will be replaced at runtime.

and has the subelement:


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:

Attribute Type Description
type fixed This attribute must assume the value fs-monitor.
class fixed This attribute must assume the value it.greenvulcano.util.file.monitor.InMemoryMonitorStatus.
dumpStatus required 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:

Attribute Type Description
type fixed This attribute must assume the value fs-monitor-status.
class fixed This attribute must assume the value it.greenvulcano.util.file.monitor.FileMonitorStatus.
statusFilePath required The absolute path of the monitor status file.
errorOnInvalidFile optional 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:

Attribute Type Description
file-mask optional Regular expression for file name matching. Default to all files.
file-type optional 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:

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