Class FileListAccessor
- java.lang.Object
-
- org.smooks.cartridges.routing.file.FileListAccessor
-
public class FileListAccessor extends Object
FileListAccessor is a utility class that retrieves list file names from the SmooksExecutionContext.- Author:
- Daniel Bevenius
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddFileName(String fileName, org.smooks.api.ExecutionContext execContext)Adds the passes inlistFileNameto the ExecutionContext.static List<String>getFileList(org.smooks.api.ExecutionContext executionContext, String fromFile)Return the list of files contained in the passed in file "fromFile"static List<String>getListFileNames(Map attributes)static List<String>getListFileNames(org.smooks.api.ExecutionContext executionContext)
-
-
-
Method Detail
-
addFileName
public static void addFileName(String fileName, org.smooks.api.ExecutionContext execContext)
Adds the passes inlistFileNameto 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 contextexecContext- - Smooks ExceutionContext
-
getFileList
public static List<String> getFileList(org.smooks.api.ExecutionContext executionContext, String fromFile) throws IOException
Return the list of files contained in the passed in file "fromFile"- Parameters:
executionContext- - Smooks execution contextfromFile- - 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(org.smooks.api.ExecutionContext executionContext)
-
-