com.sun.wts.tools.htmlmacro
Class HtmlMacroTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by com.sun.wts.tools.htmlmacro.HtmlMacroTask
All Implemented Interfaces:
java.lang.Cloneable

public class HtmlMacroTask
extends org.apache.tools.ant.Task

Author:
Kohsuke Kawaguchi

Field Summary
private  org.apache.tools.ant.types.Path classpath
          Used to load additional jelly tag libraries.
private  java.io.File destdir
           
private  java.util.List<org.apache.tools.ant.types.FileSet> documents
          Source files to process.
private  java.lang.String encoding
          Encoding of the file to be generated.
private  boolean html
          Reads the source file as HTML.
private  java.util.Map<java.lang.String,java.lang.String> properties
           
private  java.util.List<java.io.File> tags
          Tag files.
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
HtmlMacroTask()
           
 
Method Summary
 void addConfiguredDocuments(org.apache.tools.ant.types.FileSet fs)
          Docs to process.
 void addConfiguredProperty(org.apache.tools.ant.types.Environment.Variable v)
           
 void addConfiguredTags(org.apache.tools.ant.types.FileSet fs)
          Nested tag files.
 org.apache.tools.ant.types.Path createClasspath()
          Nested <classpath> element.
 void execute()
           
private  void populateFiles(org.apache.tools.ant.types.FileSet fs, java.util.List<java.io.File> r)
           
private  void registerTagLibrariesFromClasspath(org.apache.commons.jelly.JellyContext context)
          Look up META-INF/jelly/taglibs and register them all
 void setClasspath(org.apache.tools.ant.types.Path cp)
          Nested <classpath> element.
 void setClasspathRef(org.apache.tools.ant.types.Reference r)
           
 void setDestdir(java.io.File destdir)
           
 void setEncoding(java.lang.String encoding)
           
 void setXhtml(boolean value)
          True to read the source files as HTML.
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

classpath

private final org.apache.tools.ant.types.Path classpath
Used to load additional jelly tag libraries.


tags

private final java.util.List<java.io.File> tags
Tag files.


html

private boolean html
Reads the source file as HTML.


documents

private java.util.List<org.apache.tools.ant.types.FileSet> documents
Source files to process.


destdir

private java.io.File destdir

encoding

private java.lang.String encoding
Encoding of the file to be generated.

When HTML files are loaded locally, it's assumed to be in the system default encoding, so we can't reliably use any encoding. The best bet is to use us-ascii, since it's a subet of most of the encodings used today.


properties

private java.util.Map<java.lang.String,java.lang.String> properties
Constructor Detail

HtmlMacroTask

public HtmlMacroTask()
Method Detail

setDestdir

public void setDestdir(java.io.File destdir)

setClasspath

public void setClasspath(org.apache.tools.ant.types.Path cp)
Nested <classpath> element.


createClasspath

public org.apache.tools.ant.types.Path createClasspath()
Nested <classpath> element.


setClasspathRef

public void setClasspathRef(org.apache.tools.ant.types.Reference r)

addConfiguredProperty

public void addConfiguredProperty(org.apache.tools.ant.types.Environment.Variable v)

addConfiguredTags

public void addConfiguredTags(org.apache.tools.ant.types.FileSet fs)
Nested tag files.


addConfiguredDocuments

public void addConfiguredDocuments(org.apache.tools.ant.types.FileSet fs)
Docs to process.


setXhtml

public void setXhtml(boolean value)
True to read the source files as HTML.


setEncoding

public void setEncoding(java.lang.String encoding)

populateFiles

private void populateFiles(org.apache.tools.ant.types.FileSet fs,
                           java.util.List<java.io.File> r)

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

registerTagLibrariesFromClasspath

private void registerTagLibrariesFromClasspath(org.apache.commons.jelly.JellyContext context)
Look up META-INF/jelly/taglibs and register them all