org.nanoko.coffee.mill.processors
Class DefaultProcessor

java.lang.Object
  extended by org.nanoko.coffee.mill.processors.DefaultProcessor
All Implemented Interfaces:
Processor
Direct Known Subclasses:
AggregatorProcessor, CoffeeScriptCompilationProcessor, CopyAssetProcessor, CSSFileCopyProcessor, CSSLintProcessor, DustJSProcessor, FinalArtifactProcessor, HTMLCompressorProcessor, JavaScriptFileCopyProcessor, JpegTranProcessor, JSHintProcessor, JSLintProcessor, LessCompilationProcessor, OptiPNGProcessor

public class DefaultProcessor
extends Object
implements Processor

Default Implementation of Processor


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.nanoko.coffee.mill.processors.Processor
Processor.ProcessorException, Processor.ProcessorWarning
 
Field Summary
protected  AbstractCoffeeMillMojo mojo
           
protected  Map<String,Object> options
           
 
Constructor Summary
DefaultProcessor()
           
 
Method Summary
 boolean accept(File file)
           
static File computeRelativeFile(File file, File rel, File dir)
          Gets a File object representing a File in the directory dir which has the same path as the file file from the directory rel.
 void configure(AbstractCoffeeMillMojo mojo, Map<String,Object> options)
           
static void copyFileToDir(File file, File rel, File dir)
          Copy the file file to the directory dir, keeping the structure relative to rel
 void fileCreated(File file)
           
 void fileDeleted(File file)
           
 void fileUpdated(File file)
           
 org.apache.maven.plugin.logging.Log getLog()
           
static boolean isFileContainedInDirectory(File file, File dir)
           
 void processAll()
           
 void tearDown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mojo

protected AbstractCoffeeMillMojo mojo

options

protected Map<String,Object> options
Constructor Detail

DefaultProcessor

public DefaultProcessor()
Method Detail

configure

public void configure(AbstractCoffeeMillMojo mojo,
                      Map<String,Object> options)
Specified by:
configure in interface Processor

processAll

public void processAll()
                throws Processor.ProcessorException
Specified by:
processAll in interface Processor
Throws:
Processor.ProcessorException

tearDown

public void tearDown()
Specified by:
tearDown in interface Processor

accept

public boolean accept(File file)
Specified by:
accept in interface Processor

fileCreated

public void fileCreated(File file)
                 throws Processor.ProcessorException
Specified by:
fileCreated in interface Processor
Throws:
Processor.ProcessorException

fileUpdated

public void fileUpdated(File file)
                 throws Processor.ProcessorException
Specified by:
fileUpdated in interface Processor
Throws:
Processor.ProcessorException

fileDeleted

public void fileDeleted(File file)
                 throws Processor.ProcessorException
Specified by:
fileDeleted in interface Processor
Throws:
Processor.ProcessorException

getLog

public org.apache.maven.plugin.logging.Log getLog()

isFileContainedInDirectory

public static boolean isFileContainedInDirectory(File file,
                                                 File dir)

copyFileToDir

public static void copyFileToDir(File file,
                                 File rel,
                                 File dir)
                          throws Processor.ProcessorException
Copy the file file to the directory dir, keeping the structure relative to rel

Throws:
ProcessorException
Processor.ProcessorException

computeRelativeFile

public static File computeRelativeFile(File file,
                                       File rel,
                                       File dir)
Gets a File object representing a File in the directory dir which has the same path as the file file from the directory rel.

Parameters:
file -
rel -
dir -
Returns:


Copyright © 2012-2013 OW2. All Rights Reserved.