org.jboss.deployers.vfs.spi.deployer
Class AbstractVFSParsingDeployer<T>

java.lang.Object
  extended by org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
      extended by org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployer
          extended by org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput<T>
              extended by org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer<T>
Type Parameters:
T - the type of output
All Implemented Interfaces:
org.jboss.deployers.spi.deployer.Deployer, org.jboss.deployers.spi.deployer.managed.ManagedObjectCreator, org.jboss.deployers.spi.Ordered
Direct Known Subclasses:
JAXBDeployer, JAXPDeployer, ManifestDeployer, ObjectModelFactoryDeployer, SchemaResolverDeployer

public abstract class AbstractVFSParsingDeployer<T>
extends org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput<T>

AbstractVFSParsingDeployer.

Version:
$Revision: 1.1 $
Author:
Adrian Brock

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.deployers.spi.Ordered
org.jboss.deployers.spi.Ordered.OrderedComparator
 
Field Summary
 
Fields inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
log
 
Fields inherited from interface org.jboss.deployers.spi.Ordered
COMPARATOR
 
Constructor Summary
AbstractVFSParsingDeployer(Class<T> output)
          Create a new AbstractVFSParsingDeployer.
 
Method Summary
protected  boolean accepts(org.jboss.deployers.structure.spi.DeploymentUnit unit)
           
protected  boolean accepts(VFSDeploymentUnit unit)
          Callback to do prechecking on the deployment
protected  void init(VFSDeploymentUnit unit, T metaData, org.jboss.virtual.VirtualFile file)
          Initialise the metadata
protected  T parse(org.jboss.deployers.structure.spi.DeploymentUnit unit, String name, String suffix, T root)
           
protected  T parse(org.jboss.deployers.structure.spi.DeploymentUnit unit, String name, T root)
           
protected abstract  T parse(VFSDeploymentUnit unit, org.jboss.virtual.VirtualFile file, T root)
          Parse a deployment
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput
allowsReparse, build, createMetaData, createMetaData, deploy, getMetaData, getName, getOutput, getSuffix, isBuildManagedObject, isIncludeDeploymentFile, setBuildManagedObject, setIncludeDeploymentFile, setName, setSuffix
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
addInput, addInput, addOutput, addOutput, getInput, getInputs, getOutputs, getRelativeOrder, getStage, getType, isAllInputs, isComponentsOnly, isParentFirst, isTopLevelOnly, isWantComponents, setAllInputs, setComponentsOnly, setInput, setInputs, setInputs, setInputs, setOutput, setOutputs, setOutputs, setOutputs, setParentFirst, setRelativeOrder, setStage, setTopLevelOnly, setType, setWantComponents, undeploy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractVFSParsingDeployer

public AbstractVFSParsingDeployer(Class<T> output)
Create a new AbstractVFSParsingDeployer.

Parameters:
output - the type of output
Throws:
IllegalArgumentException - for null output
Method Detail

accepts

protected boolean accepts(VFSDeploymentUnit unit)
                   throws org.jboss.deployers.spi.DeploymentException
Callback to do prechecking on the deployment

Parameters:
unit - the unit
Returns:
true by default
Throws:
org.jboss.deployers.spi.DeploymentException - for any error

accepts

protected boolean accepts(org.jboss.deployers.structure.spi.DeploymentUnit unit)
                   throws org.jboss.deployers.spi.DeploymentException
Overrides:
accepts in class org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput<T>
Throws:
org.jboss.deployers.spi.DeploymentException

parse

protected T parse(org.jboss.deployers.structure.spi.DeploymentUnit unit,
                  String name,
                  T root)
           throws Exception
Specified by:
parse in class org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput<T>
Throws:
Exception

parse

protected T parse(org.jboss.deployers.structure.spi.DeploymentUnit unit,
                  String name,
                  String suffix,
                  T root)
           throws Exception
Specified by:
parse in class org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput<T>
Throws:
Exception

parse

protected abstract T parse(VFSDeploymentUnit unit,
                           org.jboss.virtual.VirtualFile file,
                           T root)
                    throws Exception
Parse a deployment

Parameters:
unit - the deployment unit
file - the metadata file
root - - possibly null pre-existing root
Returns:
the metadata
Throws:
Exception - for any error

init

protected void init(VFSDeploymentUnit unit,
                    T metaData,
                    org.jboss.virtual.VirtualFile file)
             throws Exception
Initialise the metadata

Parameters:
unit - the unit
metaData - the metadata
file - the metadata file
Throws:
Exception - for any error


Copyright ? 2007 JBoss Inc.. All Rights Reserved.