org.teiid.rhq.plugin.util
Class ProfileServiceUtil

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

public class ProfileServiceUtil
extends java.lang.Object


Field Summary
protected static org.apache.commons.logging.Log LOG
           
protected static java.lang.String PLUGIN
           
 
Constructor Summary
ProfileServiceUtil()
           
 
Method Summary
static java.lang.Boolean booleanValue(org.jboss.metatype.api.values.MetaValue v1)
           
static void convertConfigurationToManagedProperties(java.util.Map<java.lang.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(java.util.Map<java.lang.String,org.jboss.managed.api.ManagedProperty> managedProperties, java.util.Map<java.lang.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 org.jboss.managed.api.ComponentType getComponentType(org.rhq.core.domain.resource.ResourceType resourceType)
           
static java.util.Map<java.lang.String,org.rhq.core.domain.configuration.PropertySimple> getCustomProperties(org.rhq.core.domain.configuration.Configuration pluginConfig)
           
static java.io.File getDeployDirectory()
           
static org.jboss.deployers.spi.management.deploy.DeploymentManager getDeploymentManager()
          Get the DeploymentManager from the ProfileService
static org.jboss.managed.api.ManagedComponent getDQPManagementView()
           
static org.jboss.managed.api.ManagedComponent getManagedComponent(org.jboss.managed.api.ComponentType componentType, java.lang.String componentName)
          Get the passed in ManagedComponent
static java.util.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.profileservice.spi.ProfileService getProfileService()
           
static
<T> T
getSimpleValue(org.jboss.managed.api.ManagedCommon mc, java.lang.String prop, java.lang.Class<T> expectedType)
           
static
<T> T
getSimpleValue(org.jboss.managed.api.ManagedComponent mc, java.lang.String prop, java.lang.Class<T> expectedType)
           
static boolean isManagedComponent(org.jboss.deployers.spi.management.ManagementView managementView, java.lang.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 java.lang.String stringValue(org.jboss.metatype.api.values.MetaValue v1)
           
static org.jboss.metatype.api.values.SimpleValue wrap(org.jboss.metatype.api.types.MetaType type, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

protected static final org.apache.commons.logging.Log LOG

PLUGIN

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

ProfileServiceUtil

public ProfileServiceUtil()
Method Detail

getComponentType

public static org.jboss.managed.api.ComponentType getComponentType(@NotNull
                                                                   org.rhq.core.domain.resource.ResourceType resourceType)

isManagedComponent

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

getManagedComponent

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

Returns:
ManagedComponent
Throws:
javax.naming.NamingException
java.lang.Exception

getManagedComponents

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

Returns:
Set of ManagedComponents
Throws:
javax.naming.NamingException - , Exception
java.lang.Exception

getManagementView

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

getDeploymentManager

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

Returns:
DeploymentManager
Throws:
javax.naming.NamingException
java.lang.Exception

getProfileService

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

getDeployDirectory

public static java.io.File getDeployDirectory()
                                       throws javax.naming.NamingException,
                                              java.lang.Exception
Returns:
File
Throws:
javax.naming.NamingException - , Exception
java.lang.Exception

getDQPManagementView

public static org.jboss.managed.api.ManagedComponent getDQPManagementView()
                                                                   throws javax.naming.NamingException,
                                                                          java.lang.Exception
Throws:
javax.naming.NamingException
java.lang.Exception

stringValue

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

booleanValue

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

getSimpleValue

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

getSimpleValue

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

getCustomProperties

public static java.util.Map<java.lang.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(java.util.Map<java.lang.String,org.jboss.managed.api.ManagedProperty> managedProperties,
                                                                                                  java.util.Map<java.lang.String,org.rhq.core.domain.configuration.PropertySimple> customProps,
                                                                                                  org.rhq.core.domain.resource.ResourceType resourceType)

convertConfigurationToManagedProperties

public static void convertConfigurationToManagedProperties(java.util.Map<java.lang.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)

wrap

public static org.jboss.metatype.api.values.SimpleValue wrap(org.jboss.metatype.api.types.MetaType type,
                                                             java.lang.String value)
                                                      throws java.lang.Exception
Throws:
java.lang.Exception


Copyright © 2010. All Rights Reserved.