Table of Contents |
---|
Introduction
The Operation element is part of a specifies the type of file transfer that is to be carried out. In the XSD schema, the operation The Operation is a child element of the profile element as is shown in the diagram. Display xsd image jade
The Operation element that is selected defines the source and target elements that can be called as well as the transfer options that may be available.
It is required for each file transfer configuration and a required element.
Operation - the action
...
YADE is to carry out
The JADE Operation elements that the YADE Client can carry out a number of different operations.These areare defined as follows:
- copy
Copy - duplicate the files from one location to another
- move
Move - duplicate the files from one location to another and then delete the original files
- remove
Remove - delete files from a server
- getlist
GetList - obtain a file containing a list of file
namesStatus colour Yellow title verify definition
...
The operation element is mandatory.
Example Configuration using the 'Copy' Operation
An example configuration using the 'Copy' Operation was shown on the Configuring File Transfers with the JADE Client page.
The example was generated using the SOS XML Editor and is shown both as a configuration tree in the editor and as a JADE XML configuration file.
Example Configuration using the 'getlist' Operation
The getlist operation requires two child elements:
- GetListSourceFragmentRef, which includes parameters specifying the fragment parameters to be used to connect to the directory/directories to be listed and
- SourceFileOptions, which includes parameters specifying the directory/directories to be listed, file selection criteria and whether polling should be carried out.
A target fragment is not required:
- the ResultSetFile parameter can be used specify a file in which the results of the getlist operation are saved
- if a ResultSetFile is not specified the default output for getlist is the JADE log4j logger
A simple getlist configuration in the SOS XML Editor is shown in the screenshot below.
The above configuration looks for two files on the 'demo' FTP server on the SOS 'test' subdomain and lists their occurrence in the JADE log file.
Status | ||||
---|---|---|---|---|
|
The configuration uses an FTPFragment with a basic connection and password authentication to log onto the server.
Two files are specified in the FilePath element.
The following listing shows the XML configuration file generated by the Editor.
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?>
<Configurations>
<Fragments>
<ProtocolFragments>
<FTPFragment name="demo-test.sos-berlin.com">
<BasicAuthentication>
<Account><![CDATA[demo]]></Account>
<Password><![CDATA[demo]]></Password>
</BasicAuthentication>
<BasicConnection>
<Hostname><![CDATA[test.sos-berlin.com]]></Hostname>
</BasicConnection>
</FTPFragment>
</ProtocolFragments>
</Fragments>
<Profiles>
<Profile profile_id="ftp_demo_getlist_lorem_ipsum">
<Operation>
<GetList>
<GetListSourceFragmentRef>
<FTPFragmentRef ref="demo-test.sos-berlin.com" />
</GetListSourceFragmentRef>
<SourceFileOptions>
<Selection>
<FilePathSelection>
<FilePath><![CDATA[a/lorem_ipsum_medium.pdf.gz,a/lorem_ipsum_large.pdf.gz]]></FilePath>
</FilePathSelection>
</Selection>
</SourceFileOptions>
</GetList>
</Operation>
</Profile>
</Profiles>
</Configurations> |
A simple profile that uses FTP to look for 2 files on a test host and lists their occurrence in the the JADE log file.
names
Specifying the Operation Element
An Operation element is required for each file transfer configuration.
In the YADE XSD schema, the Operation is a child of the Profile element as is shown in the hierarchy below:
- Profile
- Operation
- Copy
- CopySource
- CopyTarget
- Move
- MoveSource
- MoveTarget
- Remove
- RemoveSource
- GetList
- GetListSource
- Copy
- Client (optional)
- other optional siblings ...
- Operation
The hierarchy also shows how the Operation element that is selected defines whether source and target elements require to be called. These in turn define the transfer options that may be available.
The Operation element has a number of siblings (Client, JobScheduler and Notifications) which are optional children of the Profile element and are described in the Profile parameter reference article.
When the XML Editor is used, selection of an Operation will cause the Editor to automatically generate the required descendants necessary to specify the Operation.
For the Copy Operation these would be:
- Copy
- CopySource
- CopySourceFragmentRef
- *FragmentRef (contains the reference to the Fragment to be used, where * defines the protocol to be used)
- SourceFileOptions
- Selection
- CopySourceFragmentRef
- CopyTarget
- CopyTargetFragmentRef
- Directory
- CopySource
Example Configuration using the Copy Operation
An example configuration using the Copy Operation was shown on the Configuring File Transfers with the YADE Client page.
Example Configuration using the GetList Operation
An example configuration using the GetList Operation is shown on the Example YADE Configuration using the GetList Operation page.
Further Information
- We recommend using the Editor for XML Configuration to configure file transfers for YADE. The editor uses the YADE XSD schema to guide users through the configuration process and validate configurations.
- The Operation parameter reference page.
...