use of com.twinsoft.convertigo.beans.steps.ReadFileStep in project convertigo by convertigo.
the class DatabaseObjectsManager method replaceXpath.
private void replaceXpath(String version, Sequence sequence, List<String> definition) {
if (definition.size() > 0) {
String xpath = definition.get(1);
if (xpath.startsWith("./")) {
Long key = Long.valueOf(definition.get(0));
Step sourceStep = sequence.loadedSteps.get(key);
if (sourceStep != null) {
if (VersionUtils.compare(version, "4.6.0") < 0) {
if (sourceStep instanceof RequestableStep) {
String replace = (sourceStep instanceof TransactionStep) ? "transaction" : "sequence";
xpath = xpath.replaceFirst("./", "./" + replace + "/document/");
definition.set(1, xpath);
}
} else if (VersionUtils.compare(version, "6.2.0") < 0) {
if (sourceStep instanceof ReadFileStep) {
xpath = ((ReadFileStep) sourceStep).migrateSourceXpathFor620(xpath);
definition.set(1, xpath);
}
}
}
}
}
}
Aggregations