private Connector mergeConnectorWithProperties(Connector connector, List<ConfigProperty> connectioDefProperties,
List<ConfigProperty> raConfigProperties) throws IllegalArgumentException, Exception
{
XsdString managedconnectionfactoryClass = null;
String id = null;
XsdString connectionfactoryImplClass = null;
XsdString connectionfactoryInterface = null;
XsdString connectionImplClass = null;
XsdString connectionInterface = null;
List<AuthenticationMechanism> authenticationMechanism = null;
boolean reauthenticationSupport = false;
List<SecurityPermission> securityPermissions = null;
XsdString vendorName = null;
List<LocalizedXsdString> description = null;
XsdString resourceadapterVersion = null;
XsdString moduleName = null;
XsdString eisType = null;
LicenseType license = null;
List<LocalizedXsdString> displayNames = null;
List<Icon> icons = null;
List<AdminObject> adminobjects = null;
TransactionSupportEnum transactionSupport = null;
if (connector.getVersion() == Version.V_10)
{
if (raConfigProperties != null)
{
if (connectioDefProperties == null)
{
connectioDefProperties = raConfigProperties;
}
else
{
connectioDefProperties.addAll(raConfigProperties);
}
}
List<ConnectionDefinition> cds = new ArrayList<ConnectionDefinition>(1);
ConnectionDefinition cd = new ConnectionDefinitionImpl(managedconnectionfactoryClass,
connectioDefProperties,
connectionfactoryInterface,
connectionfactoryImplClass,
connectionInterface,
connectionImplClass, id);
cds.add(cd);
OutboundResourceAdapter ora = new OutboundResourceAdapterImpl(cds,
transactionSupport,
authenticationMechanism,
reauthenticationSupport,
id, null, null);
//building and returning object
ResourceAdapter resourceadapter = new ResourceAdapterImpl(null, null, ora, null, null,
securityPermissions, id);
Connector newConnector = new ConnectorImpl(Version.V_10, null, vendorName, eisType, resourceadapterVersion,
license, resourceadapter, null, true,
description, displayNames, icons, id);
return newConnector.merge(connector);
}
else
{
List<ConnectionDefinition> connectionDefinitions = new ArrayList<ConnectionDefinition>(1);
ConnectionDefinition connectionDefinition = new ConnectionDefinitionImpl(managedconnectionfactoryClass,
connectioDefProperties,
connectionfactoryInterface,
connectionfactoryImplClass,
connectionInterface,
connectionImplClass, id);
connectionDefinitions.add(connectionDefinition);
OutboundResourceAdapter outboundResourceadapter = new OutboundResourceAdapterImpl(connectionDefinitions,
transactionSupport,
authenticationMechanism,
reauthenticationSupport,
id, null, null);
String resourceadapterClass = null;
InboundResourceAdapter inboundResourceadapter = null;
ResourceAdapter resourceadapter = new ResourceAdapterImpl(new XsdString(resourceadapterClass, null),
raConfigProperties,
outboundResourceadapter,
inboundResourceadapter, adminobjects,
securityPermissions, id);