org.jboss.deployers.vfs.plugins.structure
Class AbstractVFSDeploymentUnit

java.lang.Object
  extended by org.jboss.deployers.spi.attachments.helpers.AbstractAttachments
      extended by org.jboss.deployers.spi.attachments.helpers.AbstractMutableAttachments
          extended by org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit
              extended by org.jboss.deployers.vfs.plugins.structure.AbstractVFSDeploymentUnit
All Implemented Interfaces:
Externalizable, Serializable, Attachments, MutableAttachments, DeploymentUnit, VFSDeploymentUnit

public class AbstractVFSDeploymentUnit
extends AbstractDeploymentUnit
implements VFSDeploymentUnit

AbstractVFSDeploymentUnit.

Version:
$Revision: 1.1 $
Author:
Adrian Brock, Ales Justin
See Also:
Serialized Form

Constructor Summary
AbstractVFSDeploymentUnit()
          For serialization
AbstractVFSDeploymentUnit(VFSDeploymentContext deploymentContext)
          Create a new AbstractVFSDeploymentUnit.
 
Method Summary
 void addClassPath(List<org.jboss.virtual.VirtualFile> files)
          Add virtual files to the classpath
 void addClassPath(org.jboss.virtual.VirtualFile... files)
          Append virtual files to the classpath
 void appendClassPath(List<org.jboss.virtual.VirtualFile> files)
          Add virtual files to the classpath
 void appendClassPath(org.jboss.virtual.VirtualFile... files)
          Append virtual files to the classpath
 void appendMetaDataLocation(org.jboss.virtual.VirtualFile... locations)
          Append metadata file locations.
 List<org.jboss.virtual.VirtualFile> getClassPath()
          Get the class path
protected  VFSDeploymentContext getDeploymentContext()
          Get the deployment context
 org.jboss.virtual.VirtualFile getFile(String path)
          Get a virtual file
 org.jboss.virtual.VirtualFile getMetaDataFile(String name)
          Gets a metadata file.
 List<org.jboss.virtual.VirtualFile> getMetaDataFiles(String name, String suffix)
          Gets the metadata files for this deployment unit
 List<org.jboss.virtual.VirtualFile> getMetaDataFiles(org.jboss.virtual.VirtualFileFilter filter)
          Gets the metadata files for this deployment unit
 VFSDeploymentUnit getParent()
          Get the parent deployment unit
 VFSDeploymentResourceLoader getResourceLoader()
          Get a resource loader
 org.jboss.virtual.VirtualFile getRoot()
          Get the root
 VFSDeploymentUnit getTopLevel()
          Get the top leve deployment unit
 List<VFSDeploymentUnit> getVFSChildren()
          Get the children
 void prependClassPath(List<org.jboss.virtual.VirtualFile> files)
          Prepend virtual files to the classpath
 void prependClassPath(org.jboss.virtual.VirtualFile... files)
          Prepend virtual files to the classpath
 void prependMetaDataLocation(org.jboss.virtual.VirtualFile... locations)
          Prepend metadata file locations.
 void removeClassPath(org.jboss.virtual.VirtualFile... files)
          Remove classpath files.
 void removeMetaDataLocation(org.jboss.virtual.VirtualFile... locations)
          Remove metadata file locations.
 void setClassPath(List<org.jboss.virtual.VirtualFile> classPath)
          Set the classpath
 
Methods inherited from class org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit
addAttachment, addComponent, addControllerContextName, addIDependOn, clear, clearChangeCount, createClassLoader, createComponentDeploymentContext, createComponentDeploymentUnit, getAllMetaData, getAttachment, getAttachments, getChangeCount, getChildren, getClassLoader, getComponent, getComponentContext, getComponents, getControllerContextName, getControllerContextNames, getDependencyInfo, getMainDeployer, getMetaData, getMutableMetaData, getMutableScope, getName, getRelativePath, getResourceClassLoader, getScope, getSimpleName, getTransientManagedObjects, hasAttachments, isAttachmentPresent, isComponent, isTopLevel, readExternal, removeAttachment, removeClassLoader, removeComponent, removeControllerContextName, removeIDependOn, setMutableScope, setRequiredStage, setScope, toString, visit, writeExternal
 
Methods inherited from class org.jboss.deployers.spi.attachments.helpers.AbstractMutableAttachments
addAttachment, addAttachment, removeAttachment, removeAttachment, setAttachments
 
Methods inherited from class org.jboss.deployers.spi.attachments.helpers.AbstractAttachments
getAttachment, getAttachment, isAttachmentPresent, isAttachmentPresent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.deployers.structure.spi.DeploymentUnit
addComponent, addControllerContextName, addIDependOn, createClassLoader, getAllMetaData, getChildren, getClassLoader, getComponent, getComponents, getControllerContextName, getControllerContextNames, getDependencyInfo, getMainDeployer, getMetaData, getMutableMetaData, getMutableScope, getName, getRelativePath, getResourceClassLoader, getScope, getSimpleName, getTransientManagedObjects, isComponent, isTopLevel, removeClassLoader, removeComponent, removeControllerContextName, removeIDependOn, setMutableScope, setRequiredStage, setScope, visit
 
Methods inherited from interface org.jboss.deployers.spi.attachments.MutableAttachments
addAttachment, addAttachment, addAttachment, clear, clearChangeCount, getChangeCount, removeAttachment, removeAttachment, removeAttachment, setAttachments
 
Methods inherited from interface org.jboss.deployers.spi.attachments.Attachments
getAttachment, getAttachment, getAttachment, getAttachments, hasAttachments, isAttachmentPresent, isAttachmentPresent, isAttachmentPresent
 

Constructor Detail

AbstractVFSDeploymentUnit

public AbstractVFSDeploymentUnit()
For serialization


AbstractVFSDeploymentUnit

public AbstractVFSDeploymentUnit(VFSDeploymentContext deploymentContext)
Create a new AbstractVFSDeploymentUnit.

Parameters:
deploymentContext - the deployment context
Throws:
IllegalArgumentException - for a null deployment context
Method Detail

getMetaDataFile

public org.jboss.virtual.VirtualFile getMetaDataFile(String name)
Description copied from interface: VFSDeploymentUnit
Gets a metadata file. This is a file located under the deployment metadata context(s).

Specified by:
getMetaDataFile in interface VFSDeploymentUnit
Parameters:
name - the name to exactly match
Returns:
the virtual file or null if not found

getMetaDataFiles

public List<org.jboss.virtual.VirtualFile> getMetaDataFiles(String name,
                                                            String suffix)
Description copied from interface: VFSDeploymentUnit
Gets the metadata files for this deployment unit

Specified by:
getMetaDataFiles in interface VFSDeploymentUnit
Parameters:
name - the name to exactly match
suffix - the suffix to partially match
Returns:
the virtual files that match

getMetaDataFiles

public List<org.jboss.virtual.VirtualFile> getMetaDataFiles(org.jboss.virtual.VirtualFileFilter filter)
Description copied from interface: VFSDeploymentUnit
Gets the metadata files for this deployment unit

Specified by:
getMetaDataFiles in interface VFSDeploymentUnit
Parameters:
filter - the file filter
Returns:
the virtual files that match

prependMetaDataLocation

public void prependMetaDataLocation(org.jboss.virtual.VirtualFile... locations)
Description copied from interface: VFSDeploymentUnit
Prepend metadata file locations.

Specified by:
prependMetaDataLocation in interface VFSDeploymentUnit
Parameters:
locations - the locations

appendMetaDataLocation

public void appendMetaDataLocation(org.jboss.virtual.VirtualFile... locations)
Description copied from interface: VFSDeploymentUnit
Append metadata file locations.

Specified by:
appendMetaDataLocation in interface VFSDeploymentUnit
Parameters:
locations - the locations

removeMetaDataLocation

public void removeMetaDataLocation(org.jboss.virtual.VirtualFile... locations)
Description copied from interface: VFSDeploymentUnit
Remove metadata file locations.

Specified by:
removeMetaDataLocation in interface VFSDeploymentUnit
Parameters:
locations - the locations

getResourceLoader

public VFSDeploymentResourceLoader getResourceLoader()
Description copied from interface: DeploymentUnit
Get a resource loader

Specified by:
getResourceLoader in interface DeploymentUnit
Specified by:
getResourceLoader in interface VFSDeploymentUnit
Overrides:
getResourceLoader in class AbstractDeploymentUnit
Returns:
the resource loader

getFile

public org.jboss.virtual.VirtualFile getFile(String path)
Description copied from interface: VFSDeploymentUnit
Get a virtual file

Specified by:
getFile in interface VFSDeploymentUnit
Parameters:
path - the relative path of the file
Returns:
the virtual file or null if not found

getRoot

public org.jboss.virtual.VirtualFile getRoot()
Description copied from interface: VFSDeploymentUnit
Get the root

Specified by:
getRoot in interface VFSDeploymentUnit
Returns:
the root

getClassPath

public List<org.jboss.virtual.VirtualFile> getClassPath()
Description copied from interface: VFSDeploymentUnit
Get the class path

Specified by:
getClassPath in interface VFSDeploymentUnit
Returns:
the class path

setClassPath

public void setClassPath(List<org.jboss.virtual.VirtualFile> classPath)
Description copied from interface: VFSDeploymentUnit
Set the classpath

Specified by:
setClassPath in interface VFSDeploymentUnit
Parameters:
classPath - the classpath

prependClassPath

public void prependClassPath(List<org.jboss.virtual.VirtualFile> files)
Description copied from interface: VFSDeploymentUnit
Prepend virtual files to the classpath

Specified by:
prependClassPath in interface VFSDeploymentUnit
Parameters:
files - a virtual file

prependClassPath

public void prependClassPath(org.jboss.virtual.VirtualFile... files)
Description copied from interface: VFSDeploymentUnit
Prepend virtual files to the classpath

Specified by:
prependClassPath in interface VFSDeploymentUnit
Parameters:
files - a virtual file

appendClassPath

public void appendClassPath(List<org.jboss.virtual.VirtualFile> files)
Description copied from interface: VFSDeploymentUnit
Add virtual files to the classpath

Specified by:
appendClassPath in interface VFSDeploymentUnit
Parameters:
files - a virtual file

appendClassPath

public void appendClassPath(org.jboss.virtual.VirtualFile... files)
Description copied from interface: VFSDeploymentUnit
Append virtual files to the classpath

Specified by:
appendClassPath in interface VFSDeploymentUnit
Parameters:
files - a virtual file

addClassPath

public void addClassPath(List<org.jboss.virtual.VirtualFile> files)
Description copied from interface: VFSDeploymentUnit
Add virtual files to the classpath

Specified by:
addClassPath in interface VFSDeploymentUnit
Parameters:
files - a virtual file

addClassPath

public void addClassPath(org.jboss.virtual.VirtualFile... files)
Description copied from interface: VFSDeploymentUnit
Append virtual files to the classpath

Specified by:
addClassPath in interface VFSDeploymentUnit
Parameters:
files - a virtual file

removeClassPath

public void removeClassPath(org.jboss.virtual.VirtualFile... files)
Description copied from interface: VFSDeploymentUnit
Remove classpath files.

Specified by:
removeClassPath in interface VFSDeploymentUnit
Parameters:
files - the files

getParent

public VFSDeploymentUnit getParent()
Description copied from interface: DeploymentUnit
Get the parent deployment unit

Specified by:
getParent in interface DeploymentUnit
Specified by:
getParent in interface VFSDeploymentUnit
Overrides:
getParent in class AbstractDeploymentUnit
Returns:
the parent or null if there is no parent

getTopLevel

public VFSDeploymentUnit getTopLevel()
Description copied from interface: DeploymentUnit
Get the top leve deployment unit

Specified by:
getTopLevel in interface DeploymentUnit
Specified by:
getTopLevel in interface VFSDeploymentUnit
Overrides:
getTopLevel in class AbstractDeploymentUnit
Returns:
the top level deployment unit

getVFSChildren

public List<VFSDeploymentUnit> getVFSChildren()
Description copied from interface: VFSDeploymentUnit
Get the children

Specified by:
getVFSChildren in interface VFSDeploymentUnit
Returns:
the children

getDeploymentContext

protected VFSDeploymentContext getDeploymentContext()
Description copied from class: AbstractDeploymentUnit
Get the deployment context

Overrides:
getDeploymentContext in class AbstractDeploymentUnit
Returns:
the deployment context


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