|
||||||||||
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 contextMethod Detail |
---|
public String getName()
DeploymentUnit
getName
in interface DeploymentUnit
public Set<Object> getControllerContextNames()
DeploymentUnit
getControllerContextNames
in interface DeploymentUnit
public void addControllerContextName(Object name)
DeploymentUnit
addControllerContextName
in interface DeploymentUnit
name
- the controller context namepublic void removeControllerContextName(Object name)
DeploymentUnit
removeControllerContextName
in interface DeploymentUnit
name
- the controller context namepublic String getSimpleName()
DeploymentUnit
getSimpleName
in interface DeploymentUnit
public String getRelativePath()
DeploymentUnit
getRelativePath
in interface DeploymentUnit
public org.jboss.metadata.spi.scope.ScopeKey getScope()
DeploymentUnit
getScope
in interface DeploymentUnit
public void setScope(org.jboss.metadata.spi.scope.ScopeKey key)
DeploymentUnit
setScope
in interface DeploymentUnit
key
- the scope keypublic org.jboss.metadata.spi.scope.ScopeKey getMutableScope()
DeploymentUnit
getMutableScope
in interface DeploymentUnit
public void setMutableScope(org.jboss.metadata.spi.scope.ScopeKey key)
DeploymentUnit
setMutableScope
in interface DeploymentUnit
key
- the mutable scope keypublic org.jboss.metadata.spi.MetaData getMetaData()
DeploymentUnit
getMetaData
in interface DeploymentUnit
public org.jboss.metadata.spi.MutableMetaData getMutableMetaData()
DeploymentUnit
getMutableMetaData
in interface DeploymentUnit
public ClassLoader getClassLoader()
DeploymentUnit
getClassLoader
in interface DeploymentUnit
public boolean createClassLoader(ClassLoaderFactory factory) throws DeploymentException
DeploymentUnit
createClassLoader
in interface DeploymentUnit
factory
- the classloader factory
DeploymentException
- for any errorpublic void removeClassLoader(ClassLoaderFactory factory)
DeploymentUnit
removeClassLoader
in interface DeploymentUnit
factory
- the original factory used to create the classloaderpublic boolean isTopLevel()
DeploymentUnit
isTopLevel
in interface DeploymentUnit
public DeploymentUnit getTopLevel()
DeploymentUnit
getTopLevel
in interface DeploymentUnit
public DeploymentUnit getParent()
DeploymentUnit
getParent
in interface DeploymentUnit
public List<DeploymentUnit> getChildren()
DeploymentUnit
getChildren
in interface DeploymentUnit
public 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 DeploymentUnit
public DeploymentUnit addComponent(String name)
DeploymentUnit
addComponent
in interface DeploymentUnit
name
- the name
protected DeploymentContext getComponentContext(String name)
name
- the name
public DeploymentUnit getComponent(String name)
DeploymentUnit
getComponent
in interface DeploymentUnit
name
- the name
public boolean removeComponent(String name)
DeploymentUnit
removeComponent
in interface DeploymentUnit
name
- the name
public <T> Set<? extends T> getAllMetaData(Class<T> type)
DeploymentUnit
getAllMetaData
in interface DeploymentUnit
T
- 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 MutableAttachments
name
- the name of the attachmentattachment
- the attachment
public void clear()
MutableAttachments
clear
in interface MutableAttachments
public void clearChangeCount()
MutableAttachments
clearChangeCount
in interface MutableAttachments
public int getChangeCount()
MutableAttachments
getChangeCount
in interface MutableAttachments
public Object removeAttachment(String name)
MutableAttachments
removeAttachment
in interface MutableAttachments
name
- the name of the attachment
public Object getAttachment(String name)
Attachments
getAttachment
in interface Attachments
name
- the name of the attachment
public Map<String,Object> getAttachments()
Attachments
getAttachments
in interface Attachments
public boolean hasAttachments()
Attachments
hasAttachments
in interface Attachments
public boolean isAttachmentPresent(String name)
Attachments
isAttachmentPresent
in interface Attachments
name
- the name of the attachment
public ClassLoader getResourceClassLoader()
DeploymentUnit
getResourceClassLoader
in interface DeploymentUnit
public DeploymentResourceLoader getResourceLoader()
DeploymentUnit
getResourceLoader
in interface DeploymentUnit
public void addIDependOn(org.jboss.dependency.spi.DependencyItem dependency)
DeploymentUnit
addIDependOn
in interface DeploymentUnit
dependency
- the dependency to addpublic void visit(DeploymentUnitVisitor visitor) throws DeploymentException
DeploymentUnit
visit
in interface DeploymentUnit
visitor
- the visitor
DeploymentException
- for any error in the visitorpublic Object getControllerContextName()
DeploymentUnit
getControllerContextName
in interface DeploymentUnit
public void setRequiredStage(DeploymentStage stage)
DeploymentUnit
setRequiredStage
in interface DeploymentUnit
stage
- the required stagepublic org.jboss.dependency.spi.DependencyInfo getDependencyInfo()
DeploymentUnit
getDependencyInfo
in interface DeploymentUnit
public void removeIDependOn(org.jboss.dependency.spi.DependencyItem dependency)
DeploymentUnit
removeIDependOn
in interface DeploymentUnit
dependency
- the dependency to removepublic MainDeployer getMainDeployer()
DeploymentUnit
getMainDeployer
in interface DeploymentUnit
protected DeploymentContext getDeploymentContext()
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class AbstractAttachments
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class AbstractAttachments
out
- 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 |