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, java.lang.String prefix)
           
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 java.lang.Double doubleValue(org.jboss.metatype.api.values.MetaValue v1)
           
static org.jboss.managed.api.ManagedComponent getBufferService(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection)
           
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(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection)
           
static org.jboss.deployers.spi.management.deploy.DeploymentManager getDeploymentManager(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection)
          Get the DeploymentManager from the ProfileService
static org.jboss.managed.api.ManagedComponent getManagedComponent(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection, 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.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection, 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 getRuntimeEngineDeployer(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection)
           
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
<T> T
getSimpleValue(org.jboss.metatype.api.values.MetaValue prop, java.lang.Class<T> expectedType)
           
static java.lang.Integer integerValue(org.jboss.metatype.api.values.MetaValue v1)
           
static boolean isManagedComponent(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection, java.lang.String name, org.jboss.managed.api.ComponentType componentType)
           
static java.lang.Long longValue(org.jboss.metatype.api.values.MetaValue v1)
           
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.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection,
                                         java.lang.String name,
                                         org.jboss.managed.api.ComponentType componentType)
Parameters:
name -
componentType -
Returns:

getManagedComponent

public static org.jboss.managed.api.ManagedComponent getManagedComponent(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection,
                                                                         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.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection,
                                                                                         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(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection)
                                                                                        throws javax.naming.NamingException,
                                                                                               java.lang.Exception
Get the DeploymentManager from the ProfileService

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

getDeployDirectory

public static java.io.File getDeployDirectory(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection)
                                       throws javax.naming.NamingException,
                                              java.lang.Exception
Returns:
File
Throws:
javax.naming.NamingException - , Exception
java.lang.Exception

getRuntimeEngineDeployer

public static org.jboss.managed.api.ManagedComponent getRuntimeEngineDeployer(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection)
                                                                       throws javax.naming.NamingException,
                                                                              java.lang.Exception
Throws:
javax.naming.NamingException
java.lang.Exception

getBufferService

public static org.jboss.managed.api.ManagedComponent getBufferService(org.rhq.plugins.jbossas5.connection.ProfileServiceConnection connection)
                                                               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

doubleValue

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

longValue

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

integerValue

public static java.lang.Integer integerValue(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.metatype.api.values.MetaValue 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,
                                                           java.lang.String prefix)

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 © 2011. All Rights Reserved.