org.modeshape.rhq.plugin.util
Class ProfileServiceUtil

java.lang.Object
  extended by org.modeshape.rhq.plugin.util.ProfileServiceUtil

public class ProfileServiceUtil
extends Object


Field Summary
protected static Log LOG
           
protected static String PLUGIN
           
 
Constructor Summary
ProfileServiceUtil()
           
 
Method Summary
static Boolean booleanValue(org.jboss.metatype.api.values.MetaValue v1)
           
static void convertConfigurationToManagedProperties(Map<String,org.jboss.managed.api.ManagedProperty> managedProperties, org.rhq.core.domain.configuration.Configuration configuration, org.rhq.core.domain.resource.ResourceType resourceType)
           
static org.rhq.core.domain.configuration.Configuration convertManagedObjectToConfiguration(Map<String,org.jboss.managed.api.ManagedProperty> managedProperties, Map<String,org.rhq.core.domain.configuration.PropertySimple> customProps, org.rhq.core.domain.resource.ResourceType resourceType)
           
static org.jboss.metatype.api.types.MetaType convertPropertyDefinitionToMetaType(org.rhq.core.domain.configuration.definition.PropertyDefinition propDef)
           
static Map<String,org.rhq.core.domain.configuration.PropertySimple> getCustomProperties(org.rhq.core.domain.configuration.Configuration pluginConfig)
           
static File getDeployDirectory()
           
static org.jboss.deployers.spi.management.deploy.DeploymentManager getDeploymentManager()
          Get the DeploymentManager from the ProfileService
static org.jboss.managed.api.ManagedComponent getManagedComponent(org.jboss.managed.api.ComponentType componentType, String componentName)
          Get the passed in ManagedComponent
static Set<org.jboss.managed.api.ManagedComponent> getManagedComponents(org.jboss.managed.api.ComponentType componentType)
          Get the ManagedComponent for the ComponentType and sub type.
static org.jboss.deployers.spi.management.ManagementView getManagementView(org.jboss.profileservice.spi.ProfileService ps, boolean load)
           
static org.jboss.managed.api.ManagedComponent getModeShapeManagementView()
           
static org.jboss.profileservice.spi.ProfileService getProfileService()
           
static
<T> T
getSimpleValue(org.jboss.managed.api.ManagedCommon mc, String prop, Class<T> expectedType)
           
static
<T> T
getSimpleValue(org.jboss.managed.api.ManagedComponent mc, String prop, Class<T> expectedType)
           
static boolean isManagedComponent(org.jboss.deployers.spi.management.ManagementView managementView, String name, org.jboss.managed.api.ComponentType componentType)
           
static void populateManagedPropertyFromProperty(org.jboss.managed.api.ManagedProperty managedProperty, org.rhq.core.domain.configuration.definition.PropertyDefinition propertyDefinition, org.rhq.core.domain.configuration.Configuration configuration)
           
static String stringValue(org.jboss.metatype.api.values.MetaValue v1)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final Log LOG

PLUGIN

protected static final String PLUGIN
See Also:
Constant Field Values
Constructor Detail

ProfileServiceUtil

public ProfileServiceUtil()
Method Detail

isManagedComponent

public static boolean isManagedComponent(org.jboss.deployers.spi.management.ManagementView managementView,
                                         String name,
                                         org.jboss.managed.api.ComponentType componentType)
Parameters:
managementView -
name -
componentType -
Returns:
boolean

getManagedComponent

public static org.jboss.managed.api.ManagedComponent getManagedComponent(org.jboss.managed.api.ComponentType componentType,
                                                                         String componentName)
                                                                  throws NamingException,
                                                                         Exception
Get the passed in ManagedComponent

Parameters:
componentType -
componentName -
Returns:
ManagedComponent
Throws:
NamingException
Exception

getManagedComponents

public static Set<org.jboss.managed.api.ManagedComponent> getManagedComponents(org.jboss.managed.api.ComponentType componentType)
                                                                        throws NamingException,
                                                                               Exception
Get the ManagedComponent for the ComponentType and sub type.

Parameters:
componentType -
Returns:
Set of ManagedComponents
Throws:
NamingException - , Exception
Exception

getManagementView

public static org.jboss.deployers.spi.management.ManagementView getManagementView(org.jboss.profileservice.spi.ProfileService ps,
                                                                                  boolean load)
Parameters:
ps -
load -
Returns:
ManagementView

getDeploymentManager

public static org.jboss.deployers.spi.management.deploy.DeploymentManager getDeploymentManager()
                                                                                        throws NamingException,
                                                                                               Exception
Get the DeploymentManager from the ProfileService

Returns:
DeploymentManager
Throws:
NamingException
Exception

getProfileService

public static org.jboss.profileservice.spi.ProfileService getProfileService()
                                                                     throws NamingException
Returns:
ProfileService
Throws:
NamingException - , Exception

getDeployDirectory

public static File getDeployDirectory()
                               throws NamingException,
                                      Exception
Returns:
File
Throws:
NamingException
Exception

getModeShapeManagementView

public static org.jboss.managed.api.ManagedComponent getModeShapeManagementView()
                                                                         throws NamingException,
                                                                                Exception
Throws:
NamingException
Exception

stringValue

public static String stringValue(org.jboss.metatype.api.values.MetaValue v1)
                          throws Exception
Throws:
Exception

booleanValue

public static Boolean booleanValue(org.jboss.metatype.api.values.MetaValue v1)
                            throws Exception
Throws:
Exception

getSimpleValue

public static <T> T getSimpleValue(org.jboss.managed.api.ManagedComponent mc,
                                   String prop,
                                   Class<T> expectedType)

getSimpleValue

public static <T> T getSimpleValue(org.jboss.managed.api.ManagedCommon mc,
                                   String prop,
                                   Class<T> expectedType)

getCustomProperties

public static Map<String,org.rhq.core.domain.configuration.PropertySimple> getCustomProperties(org.rhq.core.domain.configuration.Configuration pluginConfig)

convertManagedObjectToConfiguration

public static org.rhq.core.domain.configuration.Configuration convertManagedObjectToConfiguration(Map<String,org.jboss.managed.api.ManagedProperty> managedProperties,
                                                                                                  Map<String,org.rhq.core.domain.configuration.PropertySimple> customProps,
                                                                                                  org.rhq.core.domain.resource.ResourceType resourceType)

convertConfigurationToManagedProperties

public static void convertConfigurationToManagedProperties(Map<String,org.jboss.managed.api.ManagedProperty> managedProperties,
                                                           org.rhq.core.domain.configuration.Configuration configuration,
                                                           org.rhq.core.domain.resource.ResourceType resourceType)

populateManagedPropertyFromProperty

public static void populateManagedPropertyFromProperty(org.jboss.managed.api.ManagedProperty managedProperty,
                                                       org.rhq.core.domain.configuration.definition.PropertyDefinition propertyDefinition,
                                                       org.rhq.core.domain.configuration.Configuration configuration)

convertPropertyDefinitionToMetaType

public static org.jboss.metatype.api.types.MetaType convertPropertyDefinitionToMetaType(org.rhq.core.domain.configuration.definition.PropertyDefinition propDef)


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