info.magnolia.module.files
Class BasicFileExtractor

java.lang.Object
  extended by info.magnolia.module.files.BasicFileExtractor
All Implemented Interfaces:
FileExtractor
Direct Known Subclasses:
MD5CheckingFileExtractor

public class BasicFileExtractor
extends Object
implements FileExtractor

Basic file extractor; does not do any check but provides the actual file extraction mechanisms, via FileExtractorOperations.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph
See Also:
FileExtractorOperation

Nested Class Summary
 
Nested classes/interfaces inherited from interface info.magnolia.module.files.FileExtractor
FileExtractor.Transformer
 
Constructor Summary
BasicFileExtractor()
           
 
Method Summary
protected  String[] collectResources(FileExtractor.Transformer transformer)
           
 void extractFile(String resourcePath, FileExtractor.Transformer transformer)
          Extracts the given resource from the classpath and stores it as dictacted by the given Transformer.
 void extractFile(String resourcePath, String absTargetPath)
          Extracts the given resource from the classpath and stores it as absTargetPath.
 void extractFiles(FileExtractor.Transformer transformer)
          Extracts all found resources from the classpath, using the given Transformer.
protected  info.magnolia.module.files.FileExtractorOperation newOperation(String resourcePath, String absTargetPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicFileExtractor

public BasicFileExtractor()
Method Detail

extractFile

public void extractFile(String resourcePath,
                        String absTargetPath)
                 throws IOException
Description copied from interface: FileExtractor
Extracts the given resource from the classpath and stores it as absTargetPath. extractFile("/foo/bar.baz", "/Users/greg/tok.tak"). Does not handle any kind of logic regarding location and name of source and target files.

Specified by:
extractFile in interface FileExtractor
Throws:
IOException

extractFile

public void extractFile(String resourcePath,
                        FileExtractor.Transformer transformer)
                 throws IOException
Description copied from interface: FileExtractor
Extracts the given resource from the classpath and stores it as dictacted by the given Transformer.

Specified by:
extractFile in interface FileExtractor
Throws:
IOException

extractFiles

public void extractFiles(FileExtractor.Transformer transformer)
                  throws IOException
Description copied from interface: FileExtractor
Extracts all found resources from the classpath, using the given Transformer.

Specified by:
extractFiles in interface FileExtractor
Throws:
IOException

newOperation

protected info.magnolia.module.files.FileExtractorOperation newOperation(String resourcePath,
                                                                         String absTargetPath)

collectResources

protected String[] collectResources(FileExtractor.Transformer transformer)


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.