if (getTargetDataSet() instanceof ScriptDataSet) {
try{
Map attributes = getTargetDataSet().getUserProfileAttributes(); // to be cancelled, now substitutution inline
statement = substituteProfileAttributes(statement, attributes);
} catch (Throwable e) {
throw new ProfileAttributeDsException("An error occurred while excuting query [" + statement + "]",e);
}
} else if (getTargetDataSet() instanceof JDBCDataSet) {
try {
statement = StringUtilities.substituteParametersInString(statement, getTargetDataSet().getUserProfileAttributes() );
} catch (Exception e) {
List list = checkProfileAttributesUnfilled(statement);
String atts = "";
for (Iterator iterator = list.iterator(); iterator.hasNext();) {
String string = (String) iterator.next();
atts += string;
if(iterator.hasNext()){
atts += ", ";
}
}
throw new ProfileAttributeDsException("The following profile attributes have no value[" + atts + "]",e);
}
}
logger.debug("Dataset statement after profile attributes substitution [" + statement + "]");