org.jboss.managed.plugins
Class ManagedDeploymentImpl

java.lang.Object
  extended by org.jboss.managed.plugins.ManagedDeploymentImpl
All Implemented Interfaces:
Serializable, ManagedDeployment

public class ManagedDeploymentImpl
extends Object
implements ManagedDeployment, Serializable

A simple ManagedDeployment bean implementation

Version:
$Revision: 86987 $
Author:
Scott.Stark@jboss.org
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jboss.managed.api.ManagedDeployment
ManagedDeployment.DeploymentPhase
 
Constructor Summary
ManagedDeploymentImpl(String name, String simpleName)
           
ManagedDeploymentImpl(String name, String simpleName, ManagedDeployment.DeploymentPhase phase, ManagedDeployment parent, Map<String,ManagedObject> unitMOs)
          Deprecated. 
ManagedDeploymentImpl(String name, String simpleName, ManagedDeployment parent, Map<String,ManagedObject> unitMOs)
           
 
Method Summary
 void addComponent(String name, ManagedComponent comp)
          Add a component to this deployment
 ManagedDeployment addModule(String deplymentBaseName, DeploymentTemplateInfo info)
          Add a deployment
 boolean addType(String type)
          Add a deployment/module type
<T> T
getAttachment(Class<T> expectedType)
          Get an attachment from the deployment, uses the expected type as both the name and to cast the resulting object.
 Object getAttachment(String name)
          Get an attachment from the deployment.
 List<ManagedDeployment> getChildren()
          Get the nested deployment modules.
 ManagedComponent getComponent(String name)
           
 Map<String,ManagedComponent> getComponents()
          Get the ManagedComponents for the deployment module.
 Set<String> getComponentTemplateNames()
          Get the DeploymentTemplate names for components that can be added to this deployment.
 ManagedDeployment.DeploymentPhase getDeploymentPhase()
          Get the phase this deployment is associated with
 DeploymentState getDeploymentState()
          Get the deployment state of the deployment.
 Set<String> getDeploymentTemplateNames()
          Get the DeploymentTemplate names for deployments that can be added to this deployment.
 ManagedObject getManagedObject(String name)
           
 Set<String> getManagedObjectNames()
          Get the managed object names
 Map<String,ManagedObject> getManagedObjects()
           
 String getName()
          Get the full name of the associated DeploymentUnit.
 ManagedDeployment getParent()
           
 Map<String,ManagedProperty> getProperties()
          Get the properties
 ManagedProperty getProperty(String name)
          Get a property
 Set<String> getPropertyNames()
          Get the managed property names
 String getSimpleName()
          Get the simple name (x.ear) for the deployment
 Set<String> getTypes()
          Get the deployment/module types.
 boolean removeComponent(String name)
           
 void setAttachment(String name, Object attachment)
          Set an attachment against the deployment.
 void setDeploymentState(DeploymentState state)
           
 void setTypes(Set<String> types)
          Get the deployment/module types.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ManagedDeploymentImpl

public ManagedDeploymentImpl(String name,
                             String simpleName)

ManagedDeploymentImpl

@Deprecated
public ManagedDeploymentImpl(String name,
                                        String simpleName,
                                        ManagedDeployment.DeploymentPhase phase,
                                        ManagedDeployment parent,
                                        Map<String,ManagedObject> unitMOs)
Deprecated. 


ManagedDeploymentImpl

public ManagedDeploymentImpl(String name,
                             String simpleName,
                             ManagedDeployment parent,
                             Map<String,ManagedObject> unitMOs)
Method Detail

getName

public String getName()
Description copied from interface: ManagedDeployment
Get the full name of the associated DeploymentUnit.

Specified by:
getName in interface ManagedDeployment
Returns:
full name of the DeploymentUnit

getSimpleName

public String getSimpleName()
Description copied from interface: ManagedDeployment
Get the simple name (x.ear) for the deployment

Specified by:
getSimpleName in interface ManagedDeployment
Returns:
simple name of the deployment

addType

public boolean addType(String type)
Description copied from interface: ManagedDeployment
Add a deployment/module type

Specified by:
addType in interface ManagedDeployment
Returns:
true if the type was added, false if it already exists

getTypes

public Set<String> getTypes()
Description copied from interface: ManagedDeployment
Get the deployment/module types.

Specified by:
getTypes in interface ManagedDeployment
Returns:
deployment types

setTypes

public void setTypes(Set<String> types)
Description copied from interface: ManagedDeployment
Get the deployment/module types.

Specified by:
setTypes in interface ManagedDeployment

getDeploymentPhase

public ManagedDeployment.DeploymentPhase getDeploymentPhase()
Description copied from interface: ManagedDeployment
Get the phase this deployment is associated with

Specified by:
getDeploymentPhase in interface ManagedDeployment
Returns:
the phase

getDeploymentState

public DeploymentState getDeploymentState()
Description copied from interface: ManagedDeployment
Get the deployment state of the deployment.

Specified by:
getDeploymentState in interface ManagedDeployment
Returns:
the deployment state

setDeploymentState

public void setDeploymentState(DeploymentState state)

getParent

public ManagedDeployment getParent()
Specified by:
getParent in interface ManagedDeployment
Returns:
the parent

getComponentTemplateNames

public Set<String> getComponentTemplateNames()
Description copied from interface: ManagedDeployment
Get the DeploymentTemplate names for components that can be added to this deployment.

Specified by:
getComponentTemplateNames in interface ManagedDeployment
Returns:
the template names

addComponent

public void addComponent(String name,
                         ManagedComponent comp)
Description copied from interface: ManagedDeployment
Add a component to this deployment

Specified by:
addComponent in interface ManagedDeployment
Parameters:
name - the name
comp - the component

getComponent

public ManagedComponent getComponent(String name)
Specified by:
getComponent in interface ManagedDeployment

getComponents

public Map<String,ManagedComponent> getComponents()
Description copied from interface: ManagedDeployment
Get the ManagedComponents for the deployment module.

Specified by:
getComponents in interface ManagedDeployment
Returns:
ManagedComponents for the deployment module.

removeComponent

public boolean removeComponent(String name)
Specified by:
removeComponent in interface ManagedDeployment
Parameters:
name - the name
Returns:
true when it was removed

getDeploymentTemplateNames

public Set<String> getDeploymentTemplateNames()
Description copied from interface: ManagedDeployment
Get the DeploymentTemplate names for deployments that can be added to this deployment.

Specified by:
getDeploymentTemplateNames in interface ManagedDeployment
Returns:
the template names

getChildren

public List<ManagedDeployment> getChildren()
Description copied from interface: ManagedDeployment
Get the nested deployment modules.

Specified by:
getChildren in interface ManagedDeployment
Returns:
nested deployment modules.

addModule

public ManagedDeployment addModule(String deplymentBaseName,
                                   DeploymentTemplateInfo info)
Description copied from interface: ManagedDeployment
Add a deployment

Specified by:
addModule in interface ManagedDeployment
Returns:
the deployment

getProperties

public Map<String,ManagedProperty> getProperties()
Description copied from interface: ManagedDeployment
Get the properties

Specified by:
getProperties in interface ManagedDeployment
Returns:
the properties

getProperty

public ManagedProperty getProperty(String name)
Description copied from interface: ManagedDeployment
Get a property

Specified by:
getProperty in interface ManagedDeployment
Parameters:
name - the name
Returns:
the property

getPropertyNames

public Set<String> getPropertyNames()
Description copied from interface: ManagedDeployment
Get the managed property names

Specified by:
getPropertyNames in interface ManagedDeployment
Returns:
the property names

getManagedObjectNames

public Set<String> getManagedObjectNames()
Description copied from interface: ManagedDeployment
Get the managed object names

Specified by:
getManagedObjectNames in interface ManagedDeployment
Returns:
the property names

getManagedObjects

public Map<String,ManagedObject> getManagedObjects()
Specified by:
getManagedObjects in interface ManagedDeployment

getManagedObject

public ManagedObject getManagedObject(String name)
Specified by:
getManagedObject in interface ManagedDeployment

getAttachment

public <T> T getAttachment(Class<T> expectedType)
Description copied from interface: ManagedDeployment
Get an attachment from the deployment, uses the expected type as both the name and to cast the resulting object.

Specified by:
getAttachment in interface ManagedDeployment
Type Parameters:
T - the expected type
Parameters:
expectedType - the expected type
Returns:
the attachment

getAttachment

public Object getAttachment(String name)
Description copied from interface: ManagedDeployment
Get an attachment from the deployment.

Specified by:
getAttachment in interface ManagedDeployment
Parameters:
name - the name
Returns:
the attachment
See Also:
ManagedDeployment.setAttachment(String, Object)

setAttachment

public void setAttachment(String name,
                          Object attachment)
Description copied from interface: ManagedDeployment
Set an attachment against the deployment. Attachments added to a deployment are serialized to external clients like admin tools, so the attachment type should be restricted to jdk types and commonly provided management related classes.

Specified by:
setAttachment in interface ManagedDeployment
Parameters:
name - the name
attachment - the attachment, pass null to remove an attachment

toString

public String toString()
Overrides:
toString in class Object


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