org.apache.avalon.tools.tasks
Class BlockTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.avalon.tools.tasks.ContextualTask
              extended byorg.apache.avalon.tools.tasks.SystemTask
                  extended byorg.apache.avalon.tools.tasks.DeclareTask
                      extended byorg.apache.avalon.tools.tasks.BlockTask

public class BlockTask
extends DeclareTask

Create meta-data for a block.

Version:
$Revision: 1.2 $ $Date: 2004/03/17 10:30:09 $
Author:
Avalon Development Team

Nested Class Summary
static class BlockTask.Component
           
static class BlockTask.Context
           
static class BlockTask.Dependencies
           
static class BlockTask.Dependency
           
static class BlockTask.Entry
           
static class BlockTask.Identifiable
           
static class BlockTask.Include
           
static class BlockTask.Param
           
static class BlockTask.Parameter
           
static class BlockTask.Parameters
           
static class BlockTask.Service
           
 
Field Summary
 
Fields inherited from class org.apache.avalon.tools.tasks.ContextualTask
MODULE_PROPERTIES, USER_PROPERTIES
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
BlockTask()
           
 
Method Summary
 BlockTask.Component createComponent()
           
 BlockTask.Include createInclude()
           
 BlockTask.Service createService()
           
 void execute()
           
protected  File getPluginFile()
           
 void init()
           
 void setEmbed(String target)
          Optional attribute indicating that the block is to be generated as an embedded BLOCK-INF/block.xml into either the MAIN or TEST classes directory as indicated by the target parameter.
 void setName(String name)
           
 void setStandalone(boolean flag)
          Optional attribute indicating that the block is to be generated as a standalone block.
protected  void writeContainer(String pad, Writer writer, Definition def)
           
protected  void writePlugin(Writer writer, Definition def)
           
 
Methods inherited from class org.apache.avalon.tools.tasks.DeclareTask
setType, writeClasspath
 
Methods inherited from class org.apache.avalon.tools.tasks.SystemTask
getHome, setRefid
 
Methods inherited from class org.apache.avalon.tools.tasks.ContextualTask
getContext, getKey, isInitialized, loadProperties, mkDir, setupProperties
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlockTask

public BlockTask()
Method Detail

setName

public void setName(String name)

setEmbed

public void setEmbed(String target)
Optional attribute indicating that the block is to be generated as an embedded BLOCK-INF/block.xml into either the MAIN or TEST classes directory as indicated by the target parameter.


setStandalone

public void setStandalone(boolean flag)
Optional attribute indicating that the block is to be generated as a standalone block.


getPluginFile

protected File getPluginFile()
Overrides:
getPluginFile in class DeclareTask

createComponent

public BlockTask.Component createComponent()

createInclude

public BlockTask.Include createInclude()

createService

public BlockTask.Service createService()

init

public void init()
Overrides:
init in class ContextualTask

execute

public void execute()
Overrides:
execute in class DeclareTask

writePlugin

protected void writePlugin(Writer writer,
                           Definition def)
                    throws IOException
Overrides:
writePlugin in class DeclareTask
Throws:
IOException

writeContainer

protected void writeContainer(String pad,
                              Writer writer,
                              Definition def)
                       throws IOException
Throws:
IOException