org.jboss.managed.plugins.factory
Class DeploymentTemplateInfoFactory

java.lang.Object
  extended by org.jboss.managed.plugins.factory.DeploymentTemplateInfoFactory

public class DeploymentTemplateInfoFactory
extends Object

Creates a DeploymentTemplateInfo from a ManagedObject view, or the deployment attachment class

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

Constructor Summary
DeploymentTemplateInfoFactory()
           
 
Method Summary
protected  ManagedProperty createProperty(org.jboss.beans.info.spi.PropertyInfo propertyInfo, ManagementProperty managementProperty)
           
 DeploymentTemplateInfo createTemplateInfo(Class<?> attachmentClass, String name, String description)
          Create a DeploymentTemplateInfo by scanning the metadata attachment class for ManagementProperty annotations.
 DeploymentTemplateInfo createTemplateInfo(Class<? extends DeploymentTemplateInfo> infoClass, Class<?> attachmentClass, String name, String description)
          Create a DeploymentTemplateInfo by scanning the metadata attachment class for ManagementProperty annotations.
 DeploymentTemplateInfo createTemplateInfo(ManagedObject mo, String name, String description)
          Create a DeploymentTemplateInfo from the ManagedObject view.
 MetaTypeFactory getMetaTypeFactory()
           
 MetaValueFactory getMetaValueFactory()
           
 void setMetaTypeFactory(MetaTypeFactory metaTypeFactory)
           
 void setMetaValueFactory(MetaValueFactory metaValueFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeploymentTemplateInfoFactory

public DeploymentTemplateInfoFactory()
Method Detail

getMetaTypeFactory

public MetaTypeFactory getMetaTypeFactory()

setMetaTypeFactory

public void setMetaTypeFactory(MetaTypeFactory metaTypeFactory)

getMetaValueFactory

public MetaValueFactory getMetaValueFactory()

setMetaValueFactory

public void setMetaValueFactory(MetaValueFactory metaValueFactory)

createTemplateInfo

public DeploymentTemplateInfo createTemplateInfo(ManagedObject mo,
                                                 String name,
                                                 String description)
Create a DeploymentTemplateInfo from the ManagedObject view. This is based on locating the ManagedPropertys with a ManagementProperty annotation with a includeInTemplate=true field.

Parameters:
mo - - the ManagedObject for the deployment template
name - - the name of the deployment template
description - - a description of the deployment template
Returns:
a DeploymentTemplateInfo containing the template properties.

createTemplateInfo

public DeploymentTemplateInfo createTemplateInfo(Class<?> attachmentClass,
                                                 String name,
                                                 String description)
                                          throws Exception
Create a DeploymentTemplateInfo by scanning the metadata attachment class for ManagementProperty annotations.

Parameters:
attachmentClass - - the metadata class to scan for ManagementProperty annotations
name - - the template name
description - - the template description
Returns:
the DeploymentTemplateInfo instance
Throws:
Exception - on failure to create the DeploymentTemplateInfo

createTemplateInfo

public DeploymentTemplateInfo createTemplateInfo(Class<? extends DeploymentTemplateInfo> infoClass,
                                                 Class<?> attachmentClass,
                                                 String name,
                                                 String description)
                                          throws Exception
Create a DeploymentTemplateInfo by scanning the metadata attachment class for ManagementProperty annotations.

Parameters:
infoClass - - the DeploymentTemplateInfo implementation to use. Must have a ctor with sig (String,String,Map).
attachmentClass - - the metadata class to scan for ManagementProperty annotations
name - - the template name
description - - the template description
Returns:
the DeploymentTemplateInfo instance
Throws:
Exception - on failure to create the DeploymentTemplateInfo

createProperty

protected ManagedProperty createProperty(org.jboss.beans.info.spi.PropertyInfo propertyInfo,
                                         ManagementProperty managementProperty)


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