com.ibm.di.model.descriptor
Class DescriptorUtils

java.lang.Object
  extended by com.ibm.di.model.descriptor.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 Summary
DescriptorUtils()
           
 
Method Summary
static ConnectorDescriptor getConnectorDescriptor(java.lang.String connId, ConnectorConfig cfg)
          Generates a ConnectorDescriptor based on the tdi.xml for the connector specified by the provided parameters.
static FunctionComponentDescriptor getFunctionComponentDescriptor(java.lang.String connId, FunctionConfig cfg)
          Generates a FunctionComponentDescriptor based on the tdi.xml for the FC specified by the provided parameters.
static ParserDescriptor getParserDescriptor(java.lang.String connId, ParserConfig cfg)
          Generates a ParserDescriptor based on the tdi.xml for the parser specified by the provided parameters.
static java.lang.String toXMLString(BaseDescriptor desc)
          Produces XML for the provided BaseDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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

getFunctionComponentDescriptor

public static FunctionComponentDescriptor getFunctionComponentDescriptor(java.lang.String connId,
                                                                         FunctionConfig cfg)
                                                                  throws java.lang.Exception
Generates a FunctionComponentDescriptor based on the tdi.xml for the FC specified by the provided parameters.

Parameters:
connId - the FC name under which the FunctionConfig object is mapped in the MetamergeConfig
cfg - the config object corresponding to the provided name.
Returns:
the FC descriptor of the specified FunctionConfig
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