if (input == null) {
return;
}
switch (input.getStructureType()) {
case WebServiceRequest: {
WebServiceCall replacement = replaceWebServiceCall((WebServiceStructure) input);
tf.setInputStructure(replacement.getInputStructure());
break;
}
case WebServiceResponse:{
WebServiceCall replacement = replaceWebServiceCall((WebServiceStructure) input);
tf.setInputStructure(replacement.getOutputStructure());
break;
}
case LDAP: {
LdapStructure ldapStruct = (LdapStructure) input;
SourceId ldapSourceId = ldapStruct.getLdapLocation().getSourceId();
Source replacement = (Source) service.getReplacement(ldapSourceId);
if (replacement != null) {
tf.setSourceId(replacement.getID());
ldapStruct.setLdapLocation((LdapLocation) replacement.getLocation());
}
break;
}
case Database: {
DatabaseStructure dbStruct = (DatabaseStructure) input;
SourceId dbSourceId = dbStruct.getSourceId();
Source replacement = (Source) service.getReplacement(dbSourceId);
if (replacement != null) {
tf.setSourceId(replacement.getID());
dbStruct.setSourceId(replacement.getID());
dbStruct.setDbLocation((DatabaseLocation) replacement.getLocation());
}
break;
}
default:
// No processing needed