|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.deployers.spi.attachments.helpers.AbstractAttachments
org.jboss.deployers.spi.attachments.helpers.AbstractMutableAttachments
org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit
public class AbstractDeploymentUnit
AbstractDeploymentUnit.
This is just a wrapper to the deployment context that restricts people from "poking" behind the scenes.
| Constructor Summary | |
|---|---|
AbstractDeploymentUnit()
For serialization |
|
AbstractDeploymentUnit(DeploymentContext deploymentContext)
Create a new AbstractDeploymentUnit. |
|
| Method Summary | ||
|---|---|---|
Object |
addAttachment(String name,
Object attachment)
Add attachment |
|
DeploymentUnit |
addComponent(String name)
Add a component |
|
void |
addControllerContextName(Object name)
Add controller context name. |
|
void |
addIDependOn(org.jboss.dependency.spi.DependencyItem dependency)
Add a dependency |
|
void |
clear()
Clear the attachments |
|
void |
clearChangeCount()
Reset the change count to zero. |
|
boolean |
createClassLoader(ClassLoaderFactory factory)
Create the classloader |
|
protected DeploymentContext |
createComponentDeploymentContext(String name,
DeploymentContext parent)
Create a component deployment context |
|
protected DeploymentUnit |
createComponentDeploymentUnit(DeploymentContext component)
Create a component deployment unit |
|
|
getAllMetaData(Class<T> type)
Get all the metadata for the expected type |
|
Object |
getAttachment(String name)
Get attachment |
|
Map<String,Object> |
getAttachments()
Get all the attachments |
|
int |
getChangeCount()
Get the number of changes that have happened. |
|
List<DeploymentUnit> |
getChildren()
Get the children |
|
ClassLoader |
getClassLoader()
Gets the classloader for this deployment unit |
|
DeploymentUnit |
getComponent(String name)
Get component. |
|
protected DeploymentContext |
getComponentContext(String name)
Get component deployment context. |
|
List<DeploymentUnit> |
getComponents()
Get the components |
|
Object |
getControllerContextName()
Get underlying controller context name. |
|
Set<Object> |
getControllerContextNames()
Get the controller context names. |
|
org.jboss.dependency.spi.DependencyInfo |
getDependencyInfo()
Get the dependency info |
|
protected DeploymentContext |
getDeploymentContext()
Get the deployment context |
|
MainDeployer |
getMainDeployer()
Get the main deployer |
|
org.jboss.metadata.spi.MetaData |
getMetaData()
Get the metadata for this deployment unit |
|
org.jboss.metadata.spi.MutableMetaData |
getMutableMetaData()
Get the mutable metadata for this deployment unit |
|
org.jboss.metadata.spi.scope.ScopeKey |
getMutableScope()
Get the mutable scope |
|
String |
getName()
Get the deployment units name |
|
DeploymentUnit |
getParent()
Get the parent deployment unit |
|
String |
getRelativePath()
Get the path of this deployment relative to the top of the deployment vfs path ------------------- relative path deploy/some.ear "" deploy/some.ear/x.ejb "/x.ejb" deploy/some.ear/y.sar "/y.sar" deploy/some.ear/y.sar/z.rar "/y.sar/z.rar" |
|
ClassLoader |
getResourceClassLoader()
Get a resource classloader |
|
DeploymentResourceLoader |
getResourceLoader()
Get a resource loader |
|
org.jboss.metadata.spi.scope.ScopeKey |
getScope()
Get the scope |
|
String |
getSimpleName()
Get the simple vfs name of the deployment unit. |
|
DeploymentUnit |
getTopLevel()
Get the top leve deployment unit |
|
MutableAttachments |
getTransientManagedObjects()
Get the transient managed objects |
|
boolean |
hasAttachments()
Are there any attachments |
|
boolean |
isAttachmentPresent(String name)
Is the attachment present |
|
boolean |
isComponent()
Whether this unit is a component |
|
boolean |
isTopLevel()
Whether this unit is a top level deployment |
|
void |
readExternal(ObjectInput in)
|
|
Object |
removeAttachment(String name)
Remove attachment |
|
void |
removeClassLoader(ClassLoaderFactory factory)
Remove the classloader |
|
boolean |
removeComponent(String name)
Remove a component |
|
void |
removeControllerContextName(Object name)
Remove controller context name. |
|
void |
removeIDependOn(org.jboss.dependency.spi.DependencyItem dependency)
Remove a dependency |
|
void |
setMutableScope(org.jboss.metadata.spi.scope.ScopeKey key)
Set the mutable scope |
|
void |
setRequiredStage(DeploymentStage stage)
Set the required stage. |
|
void |
setScope(org.jboss.metadata.spi.scope.ScopeKey key)
Set the scope |
|
String |
toString()
|
|
void |
visit(DeploymentUnitVisitor visitor)
Visit the unit and the children |
|
void |
writeExternal(ObjectOutput out)
|
|
| 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.spi.attachments.MutableAttachments |
|---|
addAttachment, addAttachment, removeAttachment, removeAttachment, setAttachments |
| Methods inherited from interface org.jboss.deployers.spi.attachments.Attachments |
|---|
getAttachment, getAttachment, isAttachmentPresent, isAttachmentPresent |
| Constructor Detail |
|---|
public AbstractDeploymentUnit()
public AbstractDeploymentUnit(DeploymentContext deploymentContext)
deploymentContext - the deployment context
IllegalArgumentException - for a null deployment context| Method Detail |
|---|
public String getName()
DeploymentUnit
getName in interface DeploymentUnitpublic Set<Object> getControllerContextNames()
DeploymentUnit
getControllerContextNames in interface DeploymentUnitpublic void addControllerContextName(Object name)
DeploymentUnit
addControllerContextName in interface DeploymentUnitname - the controller context namepublic void removeControllerContextName(Object name)
DeploymentUnit
removeControllerContextName in interface DeploymentUnitname - the controller context namepublic String getSimpleName()
DeploymentUnit
getSimpleName in interface DeploymentUnitpublic String getRelativePath()
DeploymentUnit
getRelativePath in interface DeploymentUnitpublic org.jboss.metadata.spi.scope.ScopeKey getScope()
DeploymentUnit
getScope in interface DeploymentUnitpublic void setScope(org.jboss.metadata.spi.scope.ScopeKey key)
DeploymentUnit
setScope in interface DeploymentUnitkey - the scope keypublic org.jboss.metadata.spi.scope.ScopeKey getMutableScope()
DeploymentUnit
getMutableScope in interface DeploymentUnitpublic void setMutableScope(org.jboss.metadata.spi.scope.ScopeKey key)
DeploymentUnit
setMutableScope in interface DeploymentUnitkey - the mutable scope keypublic org.jboss.metadata.spi.MetaData getMetaData()
DeploymentUnit
getMetaData in interface DeploymentUnitpublic org.jboss.metadata.spi.MutableMetaData getMutableMetaData()
DeploymentUnit
getMutableMetaData in interface DeploymentUnitpublic ClassLoader getClassLoader()
DeploymentUnit
getClassLoader in interface DeploymentUnit
public boolean createClassLoader(ClassLoaderFactory factory)
throws DeploymentException
DeploymentUnit
createClassLoader in interface DeploymentUnitfactory - the classloader factory
DeploymentException - for any errorpublic void removeClassLoader(ClassLoaderFactory factory)
DeploymentUnit
removeClassLoader in interface DeploymentUnitfactory - the original factory used to create the classloaderpublic boolean isTopLevel()
DeploymentUnit
isTopLevel in interface DeploymentUnitpublic DeploymentUnit getTopLevel()
DeploymentUnit
getTopLevel in interface DeploymentUnitpublic DeploymentUnit getParent()
DeploymentUnit
getParent in interface DeploymentUnitpublic List<DeploymentUnit> getChildren()
DeploymentUnit
getChildren in interface DeploymentUnitpublic List<DeploymentUnit> getComponents()
DeploymentUnit
getComponents in interface DeploymentUnit
protected DeploymentContext createComponentDeploymentContext(String name,
DeploymentContext parent)
name - the nameparent - the parent
protected DeploymentUnit createComponentDeploymentUnit(DeploymentContext component)
component - the component contextr
public boolean isComponent()
DeploymentUnit
isComponent in interface DeploymentUnitpublic DeploymentUnit addComponent(String name)
DeploymentUnit
addComponent in interface DeploymentUnitname - the name
protected DeploymentContext getComponentContext(String name)
name - the name
public DeploymentUnit getComponent(String name)
DeploymentUnit
getComponent in interface DeploymentUnitname - the name
public boolean removeComponent(String name)
DeploymentUnit
removeComponent in interface DeploymentUnitname - the name
public <T> Set<? extends T> getAllMetaData(Class<T> type)
DeploymentUnit
getAllMetaData in interface DeploymentUnitT - the type to gettype - the type
public MutableAttachments getTransientManagedObjects()
DeploymentUnit
getTransientManagedObjects in interface DeploymentUnit
public Object addAttachment(String name,
Object attachment)
MutableAttachments
addAttachment in interface MutableAttachmentsname - the name of the attachmentattachment - the attachment
public void clear()
MutableAttachments
clear in interface MutableAttachmentspublic void clearChangeCount()
MutableAttachments
clearChangeCount in interface MutableAttachmentspublic int getChangeCount()
MutableAttachments
getChangeCount in interface MutableAttachmentspublic Object removeAttachment(String name)
MutableAttachments
removeAttachment in interface MutableAttachmentsname - the name of the attachment
public Object getAttachment(String name)
Attachments
getAttachment in interface Attachmentsname - the name of the attachment
public Map<String,Object> getAttachments()
Attachments
getAttachments in interface Attachmentspublic boolean hasAttachments()
Attachments
hasAttachments in interface Attachmentspublic boolean isAttachmentPresent(String name)
Attachments
isAttachmentPresent in interface Attachmentsname - the name of the attachment
public ClassLoader getResourceClassLoader()
DeploymentUnit
getResourceClassLoader in interface DeploymentUnitpublic DeploymentResourceLoader getResourceLoader()
DeploymentUnit
getResourceLoader in interface DeploymentUnitpublic void addIDependOn(org.jboss.dependency.spi.DependencyItem dependency)
DeploymentUnit
addIDependOn in interface DeploymentUnitdependency - the dependency to add
public void visit(DeploymentUnitVisitor visitor)
throws DeploymentException
DeploymentUnit
visit in interface DeploymentUnitvisitor - the visitor
DeploymentException - for any error in the visitorpublic Object getControllerContextName()
DeploymentUnit
getControllerContextName in interface DeploymentUnitpublic void setRequiredStage(DeploymentStage stage)
DeploymentUnit
setRequiredStage in interface DeploymentUnitstage - the required stagepublic org.jboss.dependency.spi.DependencyInfo getDependencyInfo()
DeploymentUnit
getDependencyInfo in interface DeploymentUnitpublic void removeIDependOn(org.jboss.dependency.spi.DependencyItem dependency)
DeploymentUnit
removeIDependOn in interface DeploymentUnitdependency - the dependency to removepublic MainDeployer getMainDeployer()
DeploymentUnit
getMainDeployer in interface DeploymentUnitprotected DeploymentContext getDeploymentContext()
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class AbstractAttachmentsIOException
ClassNotFoundException
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface ExternalizablewriteExternal in class AbstractAttachmentsout - the output
IOException - for any errorpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||