Class FileListAccessor


  • public class FileListAccessor
    extends Object
    FileListAccessor is a utility class that retrieves list file names from the Smooks ExecutionContext.

    Author:
    Daniel Bevenius
    • Method Detail

      • addFileName

        public static void addFileName​(String fileName,
                                       org.smooks.api.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​(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 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​(org.smooks.api.ExecutionContext executionContext)
      • getListFileNames

        public static List<String> getListFileNames​(Map attributes)