Removing filed with key mapped as none

feature/21995
Luca Frosini 3 years ago
parent 9105f4ba52
commit 1f60fa9f12

@ -70,6 +70,9 @@ public abstract class HelperMethods {
public static final String PREVALIDATE_CONTEX_KEY = "PreValidateVRE";
public static final String PUBLIC_CONTEX_KEY = "PublicVRE";
private static final String PATH_SEPARATOR = "/";
// This key is used in replaceFieldsKey() function to indicate to remove the metadata field
private static final String NONE_KEY = "none";
// caches
private static CacheInterface<String, String> userEmailCache = new CacheImpl<String, String>(1000 * 60 * 60 * 24);
@ -571,16 +574,18 @@ public abstract class HelperMethods {
if(namespaces.containsKey(entry.getKey())){
usedKey = namespaces.get(entry.getKey());
}
else{
} else{
usedKey = entry.getKey();
}
if(isSourceRecord)
if(isSourceRecord) {
usedKey = usedKey.replace("GRSF", "").trim();
}
toReturn.put(usedKey, entry.getValue());
// When the replaced key is none the metadata field must be removed
if(usedKey.compareTo(NONE_KEY)!=0) {
toReturn.put(usedKey, entry.getValue());
}
}
return toReturn;

Loading…
Cancel
Save