org.jboss.deployers.spi.management
Interface ManagementView


public interface ManagementView

The management view plugin spi for querying profiles for the deployment management object interface roots.

Version:
$Revision$
Author:
Scott.Stark@jboss.org, Emanuel Muckenhuber

Method Summary
 void applyTemplate(String deploymentBaseName, org.jboss.managed.api.DeploymentTemplateInfo info)
          Create a deployment based on the given DeploymentTemplateInfo.
 org.jboss.managed.api.ManagedComponent getComponent(String name, org.jboss.managed.api.ComponentType type)
          Obtain the ManagedComponent for the given name/type
 Set<org.jboss.managed.api.ManagedComponent> getComponentsForType(org.jboss.managed.api.ComponentType type)
          Get the components of a type.
 Set<org.jboss.managed.api.ComponentType> getComponentTypes()
          Get a set of the component types in use in the profiles
 org.jboss.managed.api.ManagedDeployment getDeployment(String name)
          Get a deployment.
 Set<String> getDeploymentNames()
          Get the names of all deployments.
 Set<String> getDeploymentNamesForType(String type)
          Get the names of the deployment that have the given deployment type.
 Set<org.jboss.managed.api.ManagedDeployment> getDeploymentsForType(String type)
          Get the deployments of a type.
 Set<org.jboss.managed.api.ManagedComponent> getMatchingComponents(String name, org.jboss.managed.api.ComponentType type, NameMatcher<org.jboss.managed.api.ManagedComponent> matcher)
          Obtain the ManagedComponents for the given name/type and matcher.
 Set<String> getMatchingDeploymentName(String regex)
          Search for all deployment names with a name matching the regex expression.
 Set<org.jboss.managed.api.ManagedDeployment> getMatchingDeployments(String name, NameMatcher<org.jboss.managed.api.ManagedDeployment> matcher)
          Search for all deployments matched by the matcher.
 org.jboss.managed.api.DeploymentTemplateInfo getTemplate(String name)
          Get a deployment template.
 Set<String> getTemplateNames()
          Get the registered DeploymentTemplate names.
 boolean load()
          Load all active profiles in the ManagementView for future operations.
 void process()
          Process the changes made to the profile.
 void reload()
          Reload the current profiles managed deployments/objects.
 void removeComponent(org.jboss.managed.api.ManagedComponent comp)
          Removes a given component.
 void updateComponent(org.jboss.managed.api.ManagedComponent comp)
          Update the given component.
 

Method Detail

load

boolean load()
Load all active profiles in the ManagementView for future operations. This must be called before the other ManagementView operations may be used.

Returns:
if the ManagementView was reloaded

reload

void reload()
Reload the current profiles managed deployments/objects.


getDeploymentNames

Set<String> getDeploymentNames()
Get the names of all deployments.

Returns:
the deployment names

getDeploymentNamesForType

Set<String> getDeploymentNamesForType(String type)
Get the names of the deployment that have the given deployment type.

Parameters:
type - - the deployment type
Returns:
the names

getMatchingDeploymentName

Set<String> getMatchingDeploymentName(String regex)
                                      throws NoSuchDeploymentException
Search for all deployment names with a name matching the regex expression.

Parameters:
regex - - the regex to query deployment name
Returns:
the deployment name.
Throws:
NoSuchDeploymentException - if no matches are found

getMatchingDeployments

Set<org.jboss.managed.api.ManagedDeployment> getMatchingDeployments(String name,
                                                                    NameMatcher<org.jboss.managed.api.ManagedDeployment> matcher)
                                                                    throws NoSuchDeploymentException,
                                                                           Exception
Search for all deployments matched by the matcher.

Parameters:
name - - the name to input to the matcher
matcher - - the matcher
Returns:
a possibly empty set of ManagedDeployment accepted by the matcher
Throws:
Exception
NoSuchDeploymentException

getDeployment

org.jboss.managed.api.ManagedDeployment getDeployment(String name)
                                                      throws NoSuchDeploymentException
Get a deployment.

Parameters:
name - the name
Returns:
the deployment
Throws:
NoSuchDeploymentException - if no matches are found

getDeploymentsForType

Set<org.jboss.managed.api.ManagedDeployment> getDeploymentsForType(String type)
                                                                   throws Exception
Get the deployments of a type.

Parameters:
type - - the deployment or module type.
Returns:
the possibly empty set of deployment with the given type.
Throws:
Exception

getComponentTypes

Set<org.jboss.managed.api.ComponentType> getComponentTypes()
Get a set of the component types in use in the profiles

Returns:
set of component types in use

getComponentsForType

Set<org.jboss.managed.api.ManagedComponent> getComponentsForType(org.jboss.managed.api.ComponentType type)
                                                                 throws Exception
Get the components of a type.

Parameters:
type - - the component type.
Returns:
the possibly empty set of components with the given type.
Throws:
Exception

getComponent

org.jboss.managed.api.ManagedComponent getComponent(String name,
                                                    org.jboss.managed.api.ComponentType type)
                                                    throws Exception
Obtain the ManagedComponent for the given name/type

Parameters:
name - - the ManagedComponent#getName value to match
type - - the component type
Returns:
the possibly null ManagedComponent
Throws:
Exception
See Also:
#getComponent(String, ComponentType, NameMatcher)

getMatchingComponents

Set<org.jboss.managed.api.ManagedComponent> getMatchingComponents(String name,
                                                                  org.jboss.managed.api.ComponentType type,
                                                                  NameMatcher<org.jboss.managed.api.ManagedComponent> matcher)
                                                                  throws Exception
Obtain the ManagedComponents for the given name/type and matcher.

Parameters:
name - - the ManagedComponent#getName value to match
type - - the component type
matcher - - a matcher that compares name to candidate ManagedComponent
Returns:
the possibly empty set of ManagedComponent matches.
Throws:
Exception

updateComponent

void updateComponent(org.jboss.managed.api.ManagedComponent comp)
                     throws Exception
Update the given component. This takes the component ManagedDeployment, obtains the ManagedObject set for the underlying deployment, and applies the component ManagedProperty set to matching the deployment ManagedObject properties.

Parameters:
comp - the managed component
Throws:
Exception

removeComponent

void removeComponent(org.jboss.managed.api.ManagedComponent comp)
                     throws Exception
Removes a given component. This will remove a component from the associated ManagedDeployment.

Parameters:
comp - the managed component.
Throws:
Exception

getTemplateNames

Set<String> getTemplateNames()
Get the registered DeploymentTemplate names. TODO: probably needs a Map notion

Returns:
the template names

getTemplate

org.jboss.managed.api.DeploymentTemplateInfo getTemplate(String name)
                                                         throws NoSuchDeploymentException
Get a deployment template.

Parameters:
name - - the deployment name to identify the template to retrieve
Returns:
the named DeploymentTemplate
Throws:
NoSuchDeploymentException - - if there is no such template

applyTemplate

void applyTemplate(String deploymentBaseName,
                   org.jboss.managed.api.DeploymentTemplateInfo info)
                   throws Exception
Create a deployment based on the given DeploymentTemplateInfo.

Parameters:
deploymentBaseName - the base name
info - the deployment template info
Throws:
Exception

process

void process()
             throws Exception
Process the changes made to the profile.

Throws:
Exception


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