com.day.cq.widget.impl
Class AbstractBuilder

java.lang.Object
  extended by com.day.cq.widget.impl.AbstractBuilder
All Implemented Interfaces:
HtmlLibraryBuilder
Direct Known Subclasses:
CssFileBuilder, JsFileBuilder

public abstract class AbstractBuilder
extends Object
implements HtmlLibraryBuilder

The AbstractBuilder provides all common functionality which is needed by its extendig classes.


Constructor Summary
AbstractBuilder()
           
 
Method Summary
 File build(org.apache.tools.ant.types.resources.Resources jsFiles)
          Builds the library
protected abstract  File concatenate(org.apache.tools.ant.types.resources.Resources coll)
           
 org.apache.sling.api.resource.Resource getResource()
           
 boolean isDoMinify()
           
protected abstract  void minify(InputStream inputStream, OutputStream outputStream)
           
 void setDoMinify(boolean doMinify)
           
 void setResource(org.apache.sling.api.resource.Resource resource)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.day.cq.widget.HtmlLibraryBuilder
getMimeType, getType
 

Constructor Detail

AbstractBuilder

public AbstractBuilder()
Method Detail

build

public File build(org.apache.tools.ant.types.resources.Resources jsFiles)
           throws IOException
Description copied from interface: HtmlLibraryBuilder
Builds the library

Specified by:
build in interface HtmlLibraryBuilder
Parameters:
jsFiles - all "ant" resources which need to be included in the generated library
Returns:
generated library as file
Throws:
IOException

concatenate

protected abstract File concatenate(org.apache.tools.ant.types.resources.Resources coll)
                             throws IOException
Throws:
IOException

minify

protected abstract void minify(InputStream inputStream,
                               OutputStream outputStream)
                        throws IOException
Throws:
IOException

isDoMinify

public boolean isDoMinify()

setDoMinify

public void setDoMinify(boolean doMinify)
Specified by:
setDoMinify in interface HtmlLibraryBuilder

setResource

public void setResource(org.apache.sling.api.resource.Resource resource)
Specified by:
setResource in interface HtmlLibraryBuilder

getResource

public org.apache.sling.api.resource.Resource getResource()


Copyright © 2008 Day Management AG. All Rights Reserved.