org.jboss.managed.api
Interface ManagedDeployment

All Known Implementing Classes:
ManagedDeploymentImpl

public interface ManagedDeployment

A collection of ManagedComponent and structural information about a deployment.

Version:
$Revision: 86987 $
Author:
Scott.Stark@jboss.org

Nested Class Summary
static class ManagedDeployment.DeploymentPhase
          Deprecated. - no replacement, to be dropped
 
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 setTypes(Set<String> types)
          Get the deployment/module types.
 

Method Detail

getName

String getName()
Get the full name of the associated DeploymentUnit.

Returns:
full name of the DeploymentUnit

getSimpleName

String getSimpleName()
Get the simple name (x.ear) for the deployment

Returns:
simple name of the deployment

getDeploymentPhase

ManagedDeployment.DeploymentPhase getDeploymentPhase()
Get the phase this deployment is associated with

Returns:
the phase

getDeploymentState

DeploymentState getDeploymentState()
Get the deployment state of the deployment.

Returns:
the deployment state

addType

boolean addType(String type)
Add a deployment/module type

Parameters:
type -
Returns:
true if the type was added, false if it already exists

getTypes

Set<String> getTypes()
Get the deployment/module types.

Returns:
deployment types

setTypes

void setTypes(Set<String> types)
Get the deployment/module types.

Parameters:
types -

getPropertyNames

Set<String> getPropertyNames()
Get the managed property names

Returns:
the property names

getProperty

ManagedProperty getProperty(String name)
Get a property

Parameters:
name - the name
Returns:
the property

getProperties

Map<String,ManagedProperty> getProperties()
Get the properties

Returns:
the properties

getManagedObjectNames

Set<String> getManagedObjectNames()
Get the managed object names

Returns:
the property names

getManagedObjects

Map<String,ManagedObject> getManagedObjects()

getManagedObject

ManagedObject getManagedObject(String name)

getParent

ManagedDeployment getParent()
Returns:
the parent

getComponent

ManagedComponent getComponent(String name)

getComponents

Map<String,ManagedComponent> getComponents()
Get the ManagedComponents for the deployment module.

Returns:
ManagedComponents for the deployment module.

getChildren

List<ManagedDeployment> getChildren()
Get the nested deployment modules.

Returns:
nested deployment modules.

getComponentTemplateNames

Set<String> getComponentTemplateNames()
Get the DeploymentTemplate names for components that can be added to this deployment.

Returns:
the template names

addComponent

void addComponent(String name,
                  ManagedComponent comp)
Add a component to this deployment

Parameters:
name - the name
comp - the component

removeComponent

boolean removeComponent(String name)
Parameters:
name - the name
Returns:
true when it was removed

getDeploymentTemplateNames

Set<String> getDeploymentTemplateNames()
Get the DeploymentTemplate names for deployments that can be added to this deployment.

Returns:
the template names

addModule

ManagedDeployment addModule(String deplymentBaseName,
                            DeploymentTemplateInfo info)
Add a deployment

Parameters:
deplymentBaseName -
info -
Returns:
the deployment

getAttachment

Object getAttachment(String name)
Get an attachment from the deployment.

Parameters:
name - the name
Returns:
the attachment
See Also:
setAttachment(String, Object)

getAttachment

<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.

Type Parameters:
T - the expected type
Parameters:
expectedType - the expected type
Returns:
the attachment
Throws:
ClassCastException - when the object is not of the expected type

setAttachment

void setAttachment(String name,
                   Object attachment)
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.

Parameters:
name - the name
attachment - the attachment, pass null to remove an attachment
Throws:
IllegalArgumentException - for a null name


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