org.rhq.plugins.jbossas5.util
Class ConversionUtils
java.lang.Object
org.rhq.plugins.jbossas5.util.ConversionUtils
public class ConversionUtils
- extends java.lang.Object
Utility class to convert some basic Profile Service objects to JON objects, and some basic manipulation and data
gathering of Profile Service objects.
This should not include converting between Property objects and ManagedProperties. Those conversions should be in the
corresponding Adapter classes.
- Author:
- Ian Springer, Mark Spritzler
|
Field Summary |
protected static java.lang.String |
PLUGIN
|
|
Method Summary |
static void |
convertConfigurationToManagedProperties(java.util.Map<java.lang.String,org.jboss.managed.api.ManagedProperty> managedProperties,
Configuration configuration,
ResourceType resourceType,
java.util.Map<java.lang.String,PropertySimple> customProps)
|
static Configuration |
convertManagedObjectToConfiguration(java.util.Map<java.lang.String,org.jboss.managed.api.ManagedProperty> managedProperties,
java.util.Map<java.lang.String,PropertySimple> customProps,
ResourceType resourceType)
|
static void |
convertManagedOperationResults(org.jboss.managed.api.ManagedOperation operation,
org.jboss.metatype.api.values.MetaValue resultMetaValue,
Configuration complexResults,
OperationDefinition operationDefinition)
|
static void |
convertMetricValuesToMeasurement(MeasurementReport report,
org.jboss.managed.api.ManagedProperty metricProperty,
MeasurementScheduleRequest request,
ResourceType resourceType,
java.lang.String deploymentName)
|
static org.jboss.metatype.api.values.MetaValue[] |
convertOperationsParametersToMetaValues(org.jboss.managed.api.ManagedOperation managedOperation,
Configuration parameters,
OperationDefinition operationDefinition)
Takes the Configuration parameter object and converts it into a MetaValue array, which can them be passed in with
the invoke method to the ProfileService to fire the operation of a resource. |
static org.jboss.metatype.api.types.MetaType |
convertPropertyDefinitionToMetaType(PropertyDefinition propDef)
|
static org.jboss.managed.api.ComponentType |
getComponentType(ResourceType resourceType)
|
static org.jboss.deployers.spi.management.KnownDeploymentTypes |
getDeploymentType(ResourceType resourceType)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PLUGIN
protected static final java.lang.String PLUGIN
- See Also:
- Constant Field Values
ConversionUtils
public ConversionUtils()
getComponentType
public static org.jboss.managed.api.ComponentType getComponentType(@NotNull
ResourceType resourceType)
getDeploymentType
public static org.jboss.deployers.spi.management.KnownDeploymentTypes getDeploymentType(@NotNull
ResourceType resourceType)
convertManagedObjectToConfiguration
public static Configuration convertManagedObjectToConfiguration(java.util.Map<java.lang.String,org.jboss.managed.api.ManagedProperty> managedProperties,
java.util.Map<java.lang.String,PropertySimple> customProps,
ResourceType resourceType)
convertConfigurationToManagedProperties
public static void convertConfigurationToManagedProperties(java.util.Map<java.lang.String,org.jboss.managed.api.ManagedProperty> managedProperties,
Configuration configuration,
ResourceType resourceType,
java.util.Map<java.lang.String,PropertySimple> customProps)
convertPropertyDefinitionToMetaType
public static org.jboss.metatype.api.types.MetaType convertPropertyDefinitionToMetaType(PropertyDefinition propDef)
convertOperationsParametersToMetaValues
@NotNull
public static org.jboss.metatype.api.values.MetaValue[] convertOperationsParametersToMetaValues(@NotNull
org.jboss.managed.api.ManagedOperation managedOperation,
@NotNull
Configuration parameters,
@NotNull
OperationDefinition operationDefinition)
- Takes the Configuration parameter object and converts it into a MetaValue array, which can them be passed in with
the invoke method to the ProfileService to fire the operation of a resource.
- Parameters:
managedOperation - Operation that will be fired and stores the parameter types for the operationparameters - set of Parameter Values that the OperationFacet sent to the ComponentoperationDefinition - the RHQ operation definition
- Returns:
- MetaValue[] array of MetaValues representing the parameters; if there are no parameters, an empty array
will be returned
convertManagedOperationResults
public static void convertManagedOperationResults(org.jboss.managed.api.ManagedOperation operation,
org.jboss.metatype.api.values.MetaValue resultMetaValue,
Configuration complexResults,
OperationDefinition operationDefinition)
convertMetricValuesToMeasurement
public static void convertMetricValuesToMeasurement(MeasurementReport report,
org.jboss.managed.api.ManagedProperty metricProperty,
MeasurementScheduleRequest request,
ResourceType resourceType,
java.lang.String deploymentName)
Copyright © 2008-2009 Red Hat, Inc.. All Rights Reserved.