com.ibm.j2ca.extension.emd
Class EMDUtil

java.lang.Object
  extended bycom.ibm.j2ca.extension.emd.EMDUtil

public class EMDUtil
extends java.lang.Object

This class can be used to transform a bean like MCF, RA or Activation Spec to a property group and vice versa.


Constructor Summary
EMDUtil()
           
 
Method Summary
static WBIPropertyGroupImpl addBiDiActivationSpecProperties(WBIPropertyGroupImpl actspecProp, boolean isMetadata, java.lang.String value)
           
static WBIPropertyGroupImpl addBiDiManagedConnectionFactoryProperties(WBIPropertyGroupImpl mcfProp, boolean isMetadata, java.lang.String value)
           
static void addBiDiProperties(WBIOutboundConnectionTypeImpl connType, WBIPropertyGroupImpl pg)
           
static WBIPropertyGroupImpl addBiDiResourceAdapterProperties(WBIPropertyGroupImpl adapterProp, boolean isMetadata, java.lang.String value)
           
static WBIPropertyGroupImpl addBiDiUserPasswordProperties(WBIPropertyGroupImpl propertyGroup, java.lang.String value)
           
static void copyPropertyGroup(java.lang.Object bean, commonj.connector.metadata.discovery.properties.PropertyGroup pg)
          This method returns a property group for the given bean.
static void copyValues(commonj.connector.metadata.discovery.properties.PropertyGroup fromPG, commonj.connector.metadata.discovery.properties.PropertyGroup toPG)
          Copies properties with same name and same type from obe property group to another.
static java.lang.Object getBean(java.lang.Object bean, commonj.connector.metadata.discovery.properties.PropertyGroup pg)
          Fills the bean with the values from the property group.
static java.lang.String getBiDiProperties(commonj.connector.metadata.discovery.properties.PropertyGroup pg)
           
static commonj.connector.metadata.discovery.properties.PropertyGroup getPropertyGroup(java.lang.Object bean)
          This method returns a property group for the given bean.
static commonj.connector.metadata.discovery.properties.PropertyGroup getPropertyGroupBiDi()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EMDUtil

public EMDUtil()
Method Detail

getPropertyGroup

public static commonj.connector.metadata.discovery.properties.PropertyGroup getPropertyGroup(java.lang.Object bean)
                                                                                      throws commonj.connector.metadata.MetadataException
This method returns a property group for the given bean. If the bean has properties with values the property group would have properties with those values set.

Parameters:
bean -
Returns:
@throws MetadataException
Throws:
commonj.connector.metadata.MetadataException

getBean

public static java.lang.Object getBean(java.lang.Object bean,
                                       commonj.connector.metadata.discovery.properties.PropertyGroup pg)
                                throws commonj.connector.metadata.MetadataException
Fills the bean with the values from the property group. The assumption here is that the names of the properties in the bean and the property group match.

Parameters:
bean - Object representing the bean
pg - Property Group from which values have to be copied
Returns:
Object the bean
Throws:
commonj.connector.metadata.MetadataException

copyValues

public static void copyValues(commonj.connector.metadata.discovery.properties.PropertyGroup fromPG,
                              commonj.connector.metadata.discovery.properties.PropertyGroup toPG)
                       throws commonj.connector.metadata.MetadataException
Copies properties with same name and same type from obe property group to another.

Parameters:
fromPG - The property group from which values have to be copied
toPG - The property group to which values have to be copied
Throws:
commonj.connector.metadata.MetadataException

copyPropertyGroup

public static void copyPropertyGroup(java.lang.Object bean,
                                     commonj.connector.metadata.discovery.properties.PropertyGroup pg)
                              throws commonj.connector.metadata.MetadataException
This method returns a property group for the given bean. If the bean has properties with values the property group would have properties with those values set.

Parameters:
bean -
Returns:
@throws MetadataException
Throws:
commonj.connector.metadata.MetadataException

addBiDiResourceAdapterProperties

public static WBIPropertyGroupImpl addBiDiResourceAdapterProperties(WBIPropertyGroupImpl adapterProp,
                                                                    boolean isMetadata,
                                                                    java.lang.String value)

addBiDiUserPasswordProperties

public static WBIPropertyGroupImpl addBiDiUserPasswordProperties(WBIPropertyGroupImpl propertyGroup,
                                                                 java.lang.String value)

addBiDiManagedConnectionFactoryProperties

public static WBIPropertyGroupImpl addBiDiManagedConnectionFactoryProperties(WBIPropertyGroupImpl mcfProp,
                                                                             boolean isMetadata,
                                                                             java.lang.String value)

addBiDiActivationSpecProperties

public static WBIPropertyGroupImpl addBiDiActivationSpecProperties(WBIPropertyGroupImpl actspecProp,
                                                                   boolean isMetadata,
                                                                   java.lang.String value)

getPropertyGroupBiDi

public static commonj.connector.metadata.discovery.properties.PropertyGroup getPropertyGroupBiDi()

getBiDiProperties

public static java.lang.String getBiDiProperties(commonj.connector.metadata.discovery.properties.PropertyGroup pg)

addBiDiProperties

public static void addBiDiProperties(WBIOutboundConnectionTypeImpl connType,
                                     WBIPropertyGroupImpl pg)