org.jboss.deployers.vfs.spi.deployer
Class SchemaResolverDeployer<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>
                  extended by org.jboss.deployers.vfs.spi.deployer.UnmarshallerFactoryDeployer<T,Boolean>
                      extended by org.jboss.deployers.vfs.spi.deployer.JBossXBDeployer<T>
                          extended by org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer<T>
Type Parameters:
T - the expected type
All Implemented Interfaces:
Deployer, JarExtensionProvider, Ordered, FileMatcher
Direct Known Subclasses:
BeanDeployer, DependenciesParserDeployer, ScanningMetaDataDeployer

public class SchemaResolverDeployer<T>
extends JBossXBDeployer<T>

SchemaResolverDeployer.

Version:
$Revision 1.1 $
Author:
Adrian Brock, Scott.Stark@jboss.org, Ales Justin

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.deployers.spi.Ordered
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
SchemaResolverDeployer(Class<T> output)
          Create a new SchemaResolverDeployer.
 
Method Summary
 void create()
          Check if we need to register schema to jbossxb.
 void destroy()
          Remove registered schema
 String getNamespace()
          Get the namespace, if it was set.
 boolean isRegisterWithJBossXB()
          Get the registerWithJBossXB.
protected  T parse(VFSDeploymentUnit unit, org.jboss.virtual.VirtualFile file, T root)
          Parse a deployment
protected  T parse(org.jboss.virtual.VirtualFile file)
          Parse the file.
 void setRegisterWithJBossXB(boolean registerWithJBossXB)
          Set the registerWithJBossXB.
 
Methods inherited from class org.jboss.deployers.vfs.spi.deployer.JBossXBDeployer
createUnmarshallerFactory, fromString, getHelper, isUseSchemaValidation, isUseValidation, setUseSchemaValidation, setUseValidation
 
Methods inherited from class org.jboss.deployers.vfs.spi.deployer.UnmarshallerFactoryDeployer
getFeatures, isUseDefaultFeatures, setFeatures, setUseDefaultFeatures, start
 
Methods inherited from class org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer
accepts, accepts, allowsMultipleFiles, getAltMappings, getMetadataFile, handleMultipleFiles, init, isDeployable, matchFileToClass, mergeFiles, openStreamAndValidate, parse, parse, parse, parse, parseAndInit, setAllowMultipleFiles
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput
allowsReparse, createMetaData, createMetaData, createMetaData, createMetaData, deploy, getAttachmentKey, getJarExtension, getMetaData, getName, getNames, getOutput, getSuffix, isBuildManagedObject, isIncludeDeploymentFile, setAttachmentKey, setBuildManagedObject, setIncludeDeploymentFile, setJarExtension, setName, setNames, setSuffix
 
Methods inherited from class org.jboss.deployers.spi.deployer.helpers.AbstractDeployer
addInput, addInput, addOutput, addOutput, getInput, getInputs, getOutputs, getRelativeOrder, getStage, isAllInputs, isComponentsOnly, isParentFirst, isTopLevelOnly, isWantComponents, setAllInputs, setComponentsOnly, setInput, setInputs, setInputs, setInputs, setOutput, setOutputs, setOutputs, setOutputs, setParentFirst, setRelativeOrder, setStage, setTopLevelOnly, setWantComponents, undeploy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaResolverDeployer

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

Parameters:
output - the output
Throws:
IllegalArgumentException - for a null output
Method Detail

isRegisterWithJBossXB

public boolean isRegisterWithJBossXB()
Get the registerWithJBossXB.

Returns:
the registerWithJBossXB

setRegisterWithJBossXB

public void setRegisterWithJBossXB(boolean registerWithJBossXB)
Set the registerWithJBossXB.

Parameters:
registerWithJBossXB - the registerWithJBossXB

getNamespace

public String getNamespace()
Get the namespace, if it was set.

Returns:
the namespace

create

public void create()
Check if we need to register schema to jbossxb.


destroy

public void destroy()
Remove registered schema


parse

protected T parse(VFSDeploymentUnit unit,
                  org.jboss.virtual.VirtualFile file,
                  T root)
           throws Exception
Description copied from class: AbstractVFSParsingDeployer
Parse a deployment

Specified by:
parse in class AbstractVFSParsingDeployer<T>
Parameters:
unit - the deployment unit
file - the metadata file
root - - possibly null pre-existing root
Returns:
the metadata
Throws:
Exception - for any error

parse

protected T parse(org.jboss.virtual.VirtualFile file)
           throws Exception
Parse the file.

Parameters:
file - the virtual file to parse
Returns:
new metadata instance
Throws:
Exception - for any error


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.