org.jboss.ejb3.test.deployers
Class MockDeploymentUnit

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.ejb3.test.deployers.MockDeploymentUnit
All Implemented Interfaces:
Externalizable, Serializable, org.jboss.deployers.spi.attachments.Attachments, org.jboss.deployers.spi.attachments.MutableAttachments, org.jboss.deployers.structure.spi.DeploymentUnit

public class MockDeploymentUnit
extends org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit
implements org.jboss.deployers.structure.spi.DeploymentUnit

MockDeploymentUnit An implementation of DeploymentUnit used in EJB3 Testing, equipped with ability to: - Add attachments - Manage the parent/child relationship - Get the ClassLoader

Version:
$Revision: $
Author:
ALR
See Also:
Serialized Form

Constructor Summary
MockDeploymentUnit(String name)
           
MockDeploymentUnit(String name, org.jboss.deployers.structure.spi.DeploymentUnit parent)
           
 
Method Summary
 Object addAttachment(String name, Object attachment)
           
 void addChild(org.jboss.deployers.structure.spi.DeploymentUnit child)
           
 Object getAttachment(String name)
           
 Map<String,Object> getAttachments()
           
 List<org.jboss.deployers.structure.spi.DeploymentUnit> getChildren()
           
 ClassLoader getClassLoader()
           
 org.jboss.deployers.structure.spi.DeploymentUnit getParent()
           
 String toString()
           
 
Methods inherited from class org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit
addComponent, addControllerContextName, addIDependOn, clear, clearChangeCount, createClassLoader, createComponentDeploymentContext, createComponentDeploymentUnit, getAllMetaData, getChangeCount, getComponent, getComponentContext, getComponents, getControllerContextName, getControllerContextNames, getDependencyInfo, getDeploymentContext, getMainDeployer, getMetaData, getMutableMetaData, getMutableScope, getName, getRelativePath, getRequiredStage, getResourceClassLoader, getResourceLoader, getScope, getSimpleName, getTopLevel, getTransientManagedObjects, hasAttachments, isAttachmentPresent, isComponent, isTopLevel, readExternal, removeAttachment, removeClassLoader, removeComponent, removeControllerContextName, removeIDependOn, setMutableScope, setRequiredStage, setScope, 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, getComponent, getComponents, getControllerContextName, getControllerContextNames, getDependencyInfo, getMainDeployer, getMetaData, getMutableMetaData, getMutableScope, getName, getRelativePath, getRequiredStage, getResourceClassLoader, getResourceLoader, getScope, getSimpleName, getTopLevel, getTransientManagedObjects, isComponent, isTopLevel, removeClassLoader, removeComponent, removeControllerContextName, removeIDependOn, setMutableScope, setRequiredStage, setScope, visit
 
Methods inherited from interface org.jboss.deployers.spi.attachments.MutableAttachments
addAttachment, addAttachment, clear, clearChangeCount, getChangeCount, removeAttachment, removeAttachment, removeAttachment, setAttachments
 
Methods inherited from interface org.jboss.deployers.spi.attachments.Attachments
getAttachment, getAttachment, hasAttachments, isAttachmentPresent, isAttachmentPresent, isAttachmentPresent
 

Constructor Detail

MockDeploymentUnit

public MockDeploymentUnit(String name)

MockDeploymentUnit

public MockDeploymentUnit(String name,
                          org.jboss.deployers.structure.spi.DeploymentUnit parent)
Method Detail

addChild

public void addChild(org.jboss.deployers.structure.spi.DeploymentUnit child)

getChildren

public List<org.jboss.deployers.structure.spi.DeploymentUnit> getChildren()
Specified by:
getChildren in interface org.jboss.deployers.structure.spi.DeploymentUnit
Overrides:
getChildren in class org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit

getParent

public org.jboss.deployers.structure.spi.DeploymentUnit getParent()
Specified by:
getParent in interface org.jboss.deployers.structure.spi.DeploymentUnit
Overrides:
getParent in class org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit

addAttachment

public Object addAttachment(String name,
                            Object attachment)
Specified by:
addAttachment in interface org.jboss.deployers.spi.attachments.MutableAttachments
Overrides:
addAttachment in class org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit

getAttachment

public Object getAttachment(String name)
Specified by:
getAttachment in interface org.jboss.deployers.spi.attachments.Attachments
Overrides:
getAttachment in class org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit

getAttachments

public Map<String,Object> getAttachments()
Specified by:
getAttachments in interface org.jboss.deployers.spi.attachments.Attachments
Overrides:
getAttachments in class org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit

toString

public String toString()
Overrides:
toString in class org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit

getClassLoader

public ClassLoader getClassLoader()
Specified by:
getClassLoader in interface org.jboss.deployers.structure.spi.DeploymentUnit
Overrides:
getClassLoader in class org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit


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