com.createtank.elemenope.operations
Class IngestFilesystemOperation

java.lang.Object
  extended by com.createtank.elemenope.operations.IngestFilesystemOperation
All Implemented Interfaces:
ElemenopeComponent, Operation

public class IngestFilesystemOperation
extends java.lang.Object
implements Operation

A generic and configurable file ingestion Operation.

This Operation implementation must be configured with the following attributes:

name
operation name
e.g. fileIngestOperation
class
Fully Qualified Class Name
e.g. com.createtank.elemenope.operations.IngestFilesystemOperation
path
ingest path
required: YES (must be a directory)
default: none
stagingArea
directory where files will be placed during process of ingestion
required: YES (must be a directory)
default: none
filenameOnly
boolean switch to configure whether the operation returns only the filename, or the entire file as a byte array.
required: no
default: FALSE
deleteFile
boolean switch to configure whether the operation will delete the file after ingestion (only used when filenameOnly is set to FALSE, i.e. when the entire file is returned)
required: no
default: FALSE
archivePath
directory where files will be placed after staging, but prior to ingest (file will be renamed to -yyyyMMdd-hhmmssSSS) (must be a directory)
required: no
default: empty (no archival)
fileFilterExtensions
comma-delimited list of extensions of files which are to be ingested
required: no
default: empty (no file filtering [all files are accepted])

For an example configuration, see the elemenope userguide

Author:
John Joseph Roets [mailto:john.roets@createtank.com]

Constructor Summary
IngestFilesystemOperation()
          Creates a new instance of OperationTest
 
Method Summary
 java.lang.Object execute(java.lang.Object object)
          Execute the operation.
 void releaseComponents()
          Should be called upon shutdown, in order for elemenope component classes clean up after themselves.
 void setComponents(ElemenopeComponents components)
          Passes all configured components to implementing Object.
 void setConfigurationAttributes(java.util.Map atts)
          sets configuration attributes
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IngestFilesystemOperation

public IngestFilesystemOperation()
Creates a new instance of OperationTest

Method Detail

execute

public java.lang.Object execute(java.lang.Object object)
Description copied from interface: Operation
Execute the operation.

Specified by:
execute in interface Operation

setComponents

public void setComponents(ElemenopeComponents components)
Description copied from interface: ElemenopeComponent
Passes all configured components to implementing Object.

Should ususally be called at the end of the initialization cycle, when all components have been instantiated.

Specified by:
setComponents in interface ElemenopeComponent

releaseComponents

public void releaseComponents()
Description copied from interface: ElemenopeComponent
Should be called upon shutdown, in order for elemenope component classes clean up after themselves.

Specified by:
releaseComponents in interface ElemenopeComponent

setConfigurationAttributes

public void setConfigurationAttributes(java.util.Map atts)
                                throws ElemenopeException
Description copied from interface: ElemenopeComponent
sets configuration attributes

Specified by:
setConfigurationAttributes in interface ElemenopeComponent
Parameters:
atts - Map of connectivity attributes
Throws:
ElemenopeException