co.uk.hjcs.canyon.provider.impl
Class DirectoryFileProvider

java.lang.Object
  extended by co.uk.hjcs.canyon.provider.impl.DirectoryFileProvider
All Implemented Interfaces:
CanyonInputProvider

public class DirectoryFileProvider
extends java.lang.Object
implements CanyonInputProvider

The default directory file provider. Sources input files based on the directory path. If the directory cannot be read (i.e. does not exist, or does not have permission) validation will fail and an exception will be thrown

Author:
HJC Solutions Ltd (http://canyon.hjcsolutions.co.uk)

Constructor Summary
DirectoryFileProvider(java.lang.String directoryPath)
           
 
Method Summary
 java.io.InputStream[] getInputStreams(java.util.Properties properties)
          Returns an array of input streams to be consumed as input configuration or data
 void validate(java.util.Properties properties)
          Is called to validate the input streams, so that Canyon can operate on them
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryFileProvider

public DirectoryFileProvider(java.lang.String directoryPath)
Method Detail

getInputStreams

public java.io.InputStream[] getInputStreams(java.util.Properties properties)
Description copied from interface: CanyonInputProvider
Returns an array of input streams to be consumed as input configuration or data

Specified by:
getInputStreams in interface CanyonInputProvider
Parameters:
properties - - the properties defined in the configuration
Returns:
- the input stream to read objects from

validate

public void validate(java.util.Properties properties)
              throws CanyonException
Description copied from interface: CanyonInputProvider
Is called to validate the input streams, so that Canyon can operate on them

Specified by:
validate in interface CanyonInputProvider
Parameters:
properties - - the properties defined in the configuration
Throws:
CanyonException