JBoss Managed Parent POM 2.1.1.SP2

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: 90104 $
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 deploymentBaseName, 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)
          Gets the nested ManagedComponent with the specified name.
 Map<String,ManagedComponent> getComponents()
          Get the nested 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)
          Gets the child managed object with the specified name.
 Set<String> getManagedObjectNames()
          Get the names of the child managed objects.
 Map<String,ManagedObject> getManagedObjects()
          Gets the child managed objects.
 String getName()
          Get the full name of the associated DeploymentUnit (e.g.
 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 (e.g.
 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 (e.g. vfsfile:/C:/opt/jboss-eap-5.0.0-SNAPSHOT/server/default/deploy/foo.ear/).

Returns:
the full name of the DeploymentUnit (e.g. vfsfile:/C:/opt/jboss-eap-5.0.0-SNAPSHOT/server/default/deploy/foo.ear/)

getSimpleName

String getSimpleName()
Get the simple name (e.g. foo.ear) for the deployment

Returns:
the simple name (e.g. foo.ear) 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 names of the child managed objects. NOTE: Clients should not use this method - it is intended for server-side use only.

Returns:
the names of the child managed objects

getManagedObjects

Map<String,ManagedObject> getManagedObjects()
Gets the child managed objects. NOTE: Clients should not use this method - it is intended for server-side use only.

Returns:
the child managed objects

getManagedObject

ManagedObject getManagedObject(String name)
Gets the child managed object with the specified name. Returns null if there is no child managed object with that name. NOTE: Clients should not use this method - it is intended for server-side use only.

Parameters:
name - the managed object name
Returns:
the child managed object with the specified name, or null if there is no child managed object with that name

getParent

ManagedDeployment getParent()
Returns:
the parent

getComponent

ManagedComponent getComponent(String name)
Gets the nested ManagedComponent with the specified name.

Parameters:
name - the child component's name
Returns:
the child ManagedComponent with the specified name

getComponents

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

Returns:
the nested 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 deploymentBaseName,
                            DeploymentTemplateInfo info)
Add a deployment

Parameters:
deploymentBaseName -
info -
Returns:
the deployment

getAttachment

Object getAttachment(String name)
Get an attachment from the deployment. NOTE: Clients should not use this method - it is intended for server-side use only.

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. NOTE: Clients should not use this method - it is intended for server-side use only.

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. NOTE: Clients should not use this method - it is intended for server-side use only.

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

JBoss Managed Parent POM 2.1.1.SP2

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