org.milyn.routing.file
Class FileListAccessor

java.lang.Object
  extended by org.milyn.routing.file.FileListAccessor

public class FileListAccessor
extends Object

FileListAccessor is a utility class that retrieves list file names from the Smooks ExecutionContext.

Author:
Daniel Bevenius

Method Summary
static void addFileName(String fileName, ExecutionContext execContext)
          Adds the passes in listFileName to the ExecutionContext.
static List<String> getFileList(ExecutionContext executionContext, String fromFile)
          Return the list of files contained in the passed in file "fromFile"
static List<String> getListFileNames(ExecutionContext executionContext)
           
static List<String> getListFileNames(Map attributes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

addFileName

public static void addFileName(String fileName,
                               ExecutionContext execContext)
Adds the passes in listFileName to the ExecutionContext.

Note that the filename should be specified with a path. This is so that the same filename can be used in multiple directories.

Parameters:
fileName - - list file name to add to the context
execContext - - Smooks ExceutionContext

getFileList

public static List<String> getFileList(ExecutionContext executionContext,
                                       String fromFile)
                                throws IOException
Return the list of files contained in the passed in file "fromFile"

Parameters:
executionContext - - Smooks execution context
fromFile - - path to list file
Returns:
List - where String is the absolute path to a file.
Throws:
IOException - - If the "fromFile" cannot be found or something else IO related goes wrong.

getListFileNames

public static List<String> getListFileNames(ExecutionContext executionContext)

getListFileNames

public static List<String> getListFileNames(Map attributes)


Copyright © 2014. All Rights Reserved.