Class DescriptorUtils


  • public class DescriptorUtils
    extends java.lang.Object
    This class provides generation/manipulation of Descriptor objects - ConnectorDescriptor, FunctionComponentDescriptor, ParserDescriptor. The class has dependency on the system MetamergeConfig and the Global FormConfig so it should only be used in the context of the Tivoli Directory Integrator Server.

    Note: This class is for internal usage only. Any dependency from the end-user will not be supported. Changes to this class will happen without a warning.
    Since:
    7.1
    • Constructor Detail

      • DescriptorUtils

        public DescriptorUtils()
    • Method Detail

      • getConnectorDescriptor

        public static ConnectorDescriptor getConnectorDescriptor​(java.lang.String connId,
                                                                 ConnectorConfig cfg)
                                                          throws java.lang.Exception
        Generates a ConnectorDescriptor based on the tdi.xml for the connector specified by the provided parameters.
        Parameters:
        connId - the connector name under which the ConnectorConfig object is mapped in the MetamergeConfig
        cfg - the config object corresponding to the provided name.
        Returns:
        the connector descriptor of the specified ConnectorConfig
        Throws:
        java.lang.Exception
      • getParserDescriptor

        public static ParserDescriptor getParserDescriptor​(java.lang.String connId,
                                                           ParserConfig cfg)
                                                    throws java.lang.Exception
        Generates a ParserDescriptor based on the tdi.xml for the parser specified by the provided parameters.
        Parameters:
        connId - the parser name under which the ParserConfig object is mapped in the MetamergeConfig
        cfg - the config object corresponding to the provided name.
        Returns:
        the parser descriptor of the specified ParserConfig
        Throws:
        java.lang.Exception
      • toXMLString

        public static java.lang.String toXMLString​(BaseDescriptor desc)
                                            throws javax.xml.bind.JAXBException
        Produces XML for the provided BaseDescriptor
        Parameters:
        desc - the BaseDescriptor to serialize as XML
        Returns:
        the XML as String
        Throws:
        javax.xml.bind.JAXBException