|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.deployers.spi.deployer.helpers.AbstractDeployer
org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployer
org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput<T>
org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer<T>
T - the type of outputpublic abstract class AbstractVFSParsingDeployer<T>
AbstractVFSParsingDeployer.
| 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 | |
|---|---|
AbstractVFSParsingDeployer(Class<T> output)
Create a new AbstractVFSParsingDeployer. |
|
| Method Summary | |
|---|---|
protected boolean |
accepts(DeploymentUnit unit)
Callback to do prechecking on the deployment |
protected boolean |
accepts(VFSDeploymentUnit unit)
Callback to do prechecking on the deployment |
protected boolean |
allowsMultipleFiles(List<org.jboss.virtual.VirtualFile> files)
Check if we allow multiple files. |
protected static Map<String,Class<?>> |
getAltMappings(DeploymentUnit unit)
Get the alt mappings map. |
protected org.jboss.virtual.VirtualFile |
getMetadataFile(VFSDeploymentUnit unit,
Class<?> altExpectedClass,
String originalName,
boolean checkMetaDataFile)
Get metadata file. |
protected T |
handleMultipleFiles(VFSDeploymentUnit unit,
T root,
List<org.jboss.virtual.VirtualFile> files)
Handle multiple files. |
protected void |
init(VFSDeploymentUnit unit,
T metaData,
org.jboss.virtual.VirtualFile file)
Initialise the metadata |
boolean |
isDeployable(org.jboss.virtual.VirtualFile file)
Check if file param is deployable. |
protected Class<?> |
matchFileToClass(DeploymentUnit unit,
String fileName)
Match file name to metadata class. |
protected T |
mergeFiles(VFSDeploymentUnit unit,
T root,
List<org.jboss.virtual.VirtualFile> files,
Set<String> missingFiles)
Merge files into one piece of metatdata |
protected InputStream |
openStreamAndValidate(org.jboss.virtual.VirtualFile file)
Open stream and validate if not null. |
protected T |
parse(DeploymentUnit unit,
Set<String> names,
String suffix,
T root)
Parse exact file names or look for a suffix |
protected T |
parse(DeploymentUnit unit,
Set<String> names,
T root)
Parse an multiple exact file names |
protected T |
parse(DeploymentUnit unit,
String name,
String suffix,
T root)
Parse an exact file name or look for a suffix |
protected T |
parse(DeploymentUnit unit,
String name,
T root)
Parse an exact file name |
protected abstract T |
parse(VFSDeploymentUnit unit,
org.jboss.virtual.VirtualFile file,
T root)
Parse a deployment |
protected T |
parseAndInit(VFSDeploymentUnit unit,
org.jboss.virtual.VirtualFile file,
T root)
Parse the file, initialize the result if exists. |
void |
setAllowMultipleFiles(boolean allowMultipleFiles)
Set allow multiple files. |
| 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 |
|---|
public AbstractVFSParsingDeployer(Class<T> output)
output - the type of output
IllegalArgumentException - for null output| Method Detail |
|---|
public boolean isDeployable(org.jboss.virtual.VirtualFile file)
FileMatcher
isDeployable in interface FileMatcherfile - the virtual file
protected boolean accepts(VFSDeploymentUnit unit)
throws DeploymentException
unit - the unit
DeploymentException - for any error
protected boolean accepts(DeploymentUnit unit)
throws DeploymentException
AbstractParsingDeployerWithOutput
accepts in class AbstractParsingDeployerWithOutput<T>unit - the unit
DeploymentException - for any error
protected InputStream openStreamAndValidate(org.jboss.virtual.VirtualFile file)
throws Exception
file - the virtual file
Exception - for any error or if file's stream is nullprotected static Map<String,Class<?>> getAltMappings(DeploymentUnit unit)
unit - the deployment unit
protected org.jboss.virtual.VirtualFile getMetadataFile(VFSDeploymentUnit unit,
Class<?> altExpectedClass,
String originalName,
boolean checkMetaDataFile)
unit - the vfs deployment unitaltExpectedClass - the expected class of altDDoriginalName - the original file namecheckMetaDataFile - should we fall back to metadata file
protected Class<?> matchFileToClass(DeploymentUnit unit,
String fileName)
unit - the deployment unitfileName - the file name
protected T parse(DeploymentUnit unit,
String name,
T root)
throws Exception
AbstractParsingDeployerWithOutput
parse in class AbstractParsingDeployerWithOutput<T>unit - the unitname - the exact name to matchroot - - possibly null pre-existing root
Exception - for any error
protected T parse(DeploymentUnit unit,
Set<String> names,
T root)
throws Exception
AbstractParsingDeployerWithOutput
parse in class AbstractParsingDeployerWithOutput<T>unit - the unitnames - the exact names to matchroot - - possibly null pre-existing root
Exception - for any error
protected T parse(DeploymentUnit unit,
String name,
String suffix,
T root)
throws Exception
AbstractParsingDeployerWithOutput
parse in class AbstractParsingDeployerWithOutput<T>unit - the unitname - the exact name to matchsuffix - the suffix to matchroot - - possibly null pre-existing root
Exception - for any error
protected T parseAndInit(VFSDeploymentUnit unit,
org.jboss.virtual.VirtualFile file,
T root)
throws Exception
unit - the deployment unitfile - the fileroot - the root
Exception - for any error
protected T parse(DeploymentUnit unit,
Set<String> names,
String suffix,
T root)
throws Exception
AbstractParsingDeployerWithOutput
parse in class AbstractParsingDeployerWithOutput<T>unit - the unitnames - the exact names to matchsuffix - the suffix to matchroot - - possibly null pre-existing root
Exception - for any error
protected T mergeFiles(VFSDeploymentUnit unit,
T root,
List<org.jboss.virtual.VirtualFile> files,
Set<String> missingFiles)
throws Exception
unit - the unitroot - possibly null pre-existing rootfiles - matching meta filesmissingFiles - file names that are missing matching file
Exception - for any error
protected T handleMultipleFiles(VFSDeploymentUnit unit,
T root,
List<org.jboss.virtual.VirtualFile> files)
throws Exception
unit - the vfs deployment unitroot - possibly null pre-existing rootfiles - the matching files
Exception - for any errorprotected boolean allowsMultipleFiles(List<org.jboss.virtual.VirtualFile> files)
files - the matching files
protected abstract T parse(VFSDeploymentUnit unit,
org.jboss.virtual.VirtualFile file,
T root)
throws Exception
unit - the deployment unitfile - the metadata fileroot - - possibly null pre-existing root
Exception - for any error
protected void init(VFSDeploymentUnit unit,
T metaData,
org.jboss.virtual.VirtualFile file)
throws Exception
unit - the unitmetaData - the metadatafile - the metadata file
Exception - for any errorpublic void setAllowMultipleFiles(boolean allowMultipleFiles)
allowMultipleFiles - the allow multiple files flag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||