Skip to content

Commit

Permalink
Update selectOneWithSearchAndReplace to fallback to non-draft repository
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerjmchugh committed Nov 29, 2024
1 parent 8d09f1c commit debe439
Showing 1 changed file with 15 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -693,16 +693,28 @@ public Set<String> getListOfStatusCreatingDraft() {

@Override
public String selectOneWithSearchAndReplace(String uuid, String search, String replace) {
return metadataDraftRepository.selectOneWithSearchAndReplace(uuid, search, replace);
String updatedXml = metadataDraftRepository.selectOneWithSearchAndReplace(uuid, search, replace);
if (updatedXml == null) {
updatedXml = super.selectOneWithSearchAndReplace(uuid, search, replace);
}
return updatedXml;
}

@Override
public String selectOneWithRegexSearchAndReplaceWithFlags(String uuid, String search, String replace, String flags) {
return metadataDraftRepository.selectOneWithRegexSearchAndReplaceWithFlags(uuid, search, replace, flags);
String updatedXml = metadataDraftRepository.selectOneWithRegexSearchAndReplaceWithFlags(uuid, search, replace, flags);
if (updatedXml == null) {
updatedXml = super.selectOneWithRegexSearchAndReplaceWithFlags(uuid, search, replace, flags);
}
return updatedXml;
}

@Override
public String selectOneWithRegexSearchAndReplace(String uuid, String search, String replace) {
return metadataDraftRepository.selectOneWithSearchAndReplace(uuid, search, replace);
String updatedXml = metadataDraftRepository.selectOneWithRegexSearchAndReplace(uuid, search, replace);
if (updatedXml == null) {
updatedXml = super.selectOneWithRegexSearchAndReplace(uuid, search, replace);
}
return updatedXml;
}
}

0 comments on commit debe439

Please sign in to comment.