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 java.lang.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  java.lang.String[] collectResources(FileExtractor.Transformer transformer)
           
 void extractFile(java.lang.String resourcePath, FileExtractor.Transformer transformer)
          Extracts the given resource from the classpath and stores it as dictacted by the given Transformer.
 void extractFile(java.lang.String resourcePath, java.lang.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(java.lang.String resourcePath, java.lang.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(java.lang.String resourcePath,
                        java.lang.String absTargetPath)
                 throws java.io.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:
java.io.IOException

extractFile

public void extractFile(java.lang.String resourcePath,
                        FileExtractor.Transformer transformer)
                 throws java.io.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:
java.io.IOException

extractFiles

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

Specified by:
extractFiles in interface FileExtractor
Throws:
java.io.IOException

newOperation

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

collectResources

protected java.lang.String[] collectResources(FileExtractor.Transformer transformer)


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