Class ConnectorConfigParserUtils


  • public class ConnectorConfigParserUtils
    extends Object
    This is an util class containing methods for parsing connector configurations present in ra.xml.
    Author:
    Srikanth P
    • Constructor Detail

      • ConnectorConfigParserUtils

        public ConnectorConfigParserUtils()
        Default constructor.
    • Method Detail

      • mergeProps

        public Properties mergeProps​(Set ddVals,
                                     Properties introspectedVals)
        Merges the properties obtained by introspecting the javabean and the properties present in ra.xml for the corresponding javabean.
        Parameters:
        ddVals - Properties obtained from ra.xml for the javabean
        introspectedVals - Properties obtained by introspecting javabean
        Returns:
        Merged Properties present in ra.xml and introspected properties of javabean.
      • mergePropsReturnTypes

        public Properties mergePropsReturnTypes​(Set ddVals,
                                                Properties introspectedVals)
        Merges the datatype of properties obtained by introspecting the javabean and the datatypes of properties present in ra.xml for the corresponding javabean. It is a Properties object consisting of property name and the property data type.
        Parameters:
        ddVals - Properties obtained from ra.xml for the javabean
        introspectedVals - Properties obtained by introspecting javabean which consist of property name as key and datatype as the value.
        Returns:
        Merged Properties present in ra.xml and introspected properties of javabean. Properties consist of property name as the key and datatype as the value.
      • introspectJavaBean

        public Properties introspectJavaBean​(Object javaBeanInstance,
                                             Set ddPropsSet)
                                      throws ConnectorRuntimeException
        Introspects the javabean and returns only the introspected properties not present in the configuration in ra.xml for the corresponding javabean. If no definite value is obtained while introspection of a method empty string is taken as the value.
        Parameters:
        javaBeanInstance - bean
        ddPropsSet - Set of Properties present in configuration in ra.xml for the corresponding javabean.
        Returns:
        Introspected properties not present in the configuration in ra.xml for the corresponding javabean.
        Throws:
        ConnectorRuntimeException - if the Class could not be loaded or instantiated.
      • introspectJavaBeanReturnTypes

        public Properties introspectJavaBeanReturnTypes​(String className,
                                                        Set ddPropsSet,
                                                        String rarName)
                                                 throws ConnectorRuntimeException
        Introspects the javabean and returns only the introspected properties and their datatypes not present in the configuration in ra.xml for the corresponding javabean.
        Parameters:
        className - Name of the class to be introspected.
        ddPropsSet - Set of Properties present in configuration in ra.xml for the corresponding javabean.
        Returns:
        Introspected properties and their datatype not present in the configuration in ra.xml for the corresponding javabean. The properties consist of property name as the key and datatype as the value
        Throws:
        ConnectorRuntimeException - if the Class could not be loaded