org.apache.beehive.controls.runtime.assembly
Class AssembleTask

Object
  extended by ProjectComponent
      extended by Task
          extended by AssembleTask

public class AssembleTask
extends Task

AssembleTask defines a custom ant task to perform control assembly.

The core assembly algorithm is documented and implemented in Assembler.

Required attributes:
moduleDir: path to the root of J2EE module on which to perform assembly.
srcOutputDir: path to the dir where control assemblers may output source files. It may be necessary to run additional build steps in order to process such files (for example, if an assembler outputs Java source code, that code may need to be compiled).
contextFactoryClassname: fully qualified classname of a factory class that implements ControlAssemblyContext.Factory. Typically this would depend on the type of module on which assembly is being run (EJB, webapp, etc). Different contexts will expose different APIs to control assemblers (making different descriptors available, etc).

Supported nested elements:
classpath: specifies the classpath that will be searched for control interfaces/implementations, control clients and control assemblers.
fileset: specifies the control client manifests that should be processed by this assembly call.

An example usage of the AssembleTask in an ant build script (build.xml):

<taskdef name="assemble" classname="org.apache.beehive.controls.runtime.assembly.AssembleTask" classpathref="controls.dependency.path" onerror="report" /> <assemble moduleDir="${build.beans}" srcOutputDir="${build.beansrc}" contextFactoryClassname="org.apache.beehive.controls.runtime.assembly.EJBAssemblyContext$Factory"> <classpath> <path refid="test.classpath"/> <pathelement location="${build.beans}"/> </classpath> <fileset dir="${build.beans}"> <include name="**\*.controls.properties"/> </fileset> </assemble>


Field Summary
protected  File _bindingFile
           
protected  Path _classPath
           
protected  FileSet _clientManifestFileSet
           
protected  String _contextFactoryClassName
           
protected  File _moduleDir
           
protected  String _moduleName
           
protected  File _srcOutputDir
           
 
Fields inherited from class Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class ProjectComponent
project
 
Constructor Summary
AssembleTask()
           
 
Method Summary
 Path createClasspath()
           
 FileSet createFileset()
           
 void execute()
           
 void setBindingFile(File bindingFile)
           
 void setClasspath(Path classpath)
           
 void setContextFactoryClassName(String contextFactoryClassName)
           
 void setModuleDir(File moduleDir)
           
 void setModuleName(String moduleName)
           
 void setSrcOutputDir(File srcOutputDir)
           
 
Methods inherited from class Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class ProjectComponent
getProject, setProject
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_contextFactoryClassName

protected String _contextFactoryClassName

_moduleDir

protected File _moduleDir

_moduleName

protected String _moduleName

_srcOutputDir

protected File _srcOutputDir

_bindingFile

protected File _bindingFile

_classPath

protected Path _classPath

_clientManifestFileSet

protected FileSet _clientManifestFileSet
Constructor Detail

AssembleTask

public AssembleTask()
Method Detail

setContextFactoryClassName

public void setContextFactoryClassName(String contextFactoryClassName)

setModuleDir

public void setModuleDir(File moduleDir)

setModuleName

public void setModuleName(String moduleName)

setSrcOutputDir

public void setSrcOutputDir(File srcOutputDir)

setBindingFile

public void setBindingFile(File bindingFile)

createFileset

public FileSet createFileset()

setClasspath

public void setClasspath(Path classpath)

createClasspath

public Path createClasspath()

execute

public void execute()
Overrides:
execute in class Task