commit
d111d045ef
|
@ -168,6 +168,7 @@ public class BaseValidator implements IValidationContextResourceLoader, IMessagi
|
|||
protected final String TYPE = "type";
|
||||
protected final String BUNDLE = "Bundle";
|
||||
protected final String LAST_UPDATED = "lastUpdated";
|
||||
protected final String VERSION_ID = "versionId";
|
||||
|
||||
protected BaseValidator parent;
|
||||
protected IWorkerContext context;
|
||||
|
@ -1048,8 +1049,9 @@ public class BaseValidator implements IValidationContextResourceLoader, IMessagi
|
|||
if (resource != null) {
|
||||
String et = resource.getType();
|
||||
String eid = resource.getNamedChildValue(ID, false);
|
||||
String rl = null;
|
||||
if (eid != null) {
|
||||
String rl = et+"/"+eid;
|
||||
rl = et+"/"+eid;
|
||||
list = relMap.get(rl);
|
||||
if (list == null) {
|
||||
list = new ArrayList<Element>();
|
||||
|
@ -1057,6 +1059,30 @@ public class BaseValidator implements IValidationContextResourceLoader, IMessagi
|
|||
}
|
||||
list.add(entry);
|
||||
}
|
||||
boolean versionIdPresent = resource.hasChild(META, false)
|
||||
&& resource.getNamedChild(META, false).hasChild(VERSION_ID, false)
|
||||
&& resource.getNamedChild(META, false).getNamedChild(VERSION_ID, false).hasValue();
|
||||
if (versionIdPresent){
|
||||
String versionId = resource.getNamedChild(META).getNamedChild(VERSION_ID).getValue();
|
||||
String fullUrlVersioned = fu + "/_history/" + versionId;
|
||||
List<Element> listMapVersioned = null;
|
||||
listMapVersioned = map.get(fullUrlVersioned);
|
||||
if (listMapVersioned == null) {
|
||||
listMapVersioned = new ArrayList<Element>();
|
||||
map.put(fullUrlVersioned, listMapVersioned);
|
||||
}
|
||||
listMapVersioned.add(entry);
|
||||
if (rl != null) {
|
||||
String relativePathVersioned = rl + "/_history/" + versionId;
|
||||
List<Element> listRelMapVersioned = null;
|
||||
listRelMapVersioned = relMap.get(relativePathVersioned);
|
||||
if (listRelMapVersioned == null) {
|
||||
listRelMapVersioned = new ArrayList<Element>();
|
||||
relMap.put(relativePathVersioned, listRelMapVersioned);
|
||||
}
|
||||
listRelMapVersioned.add(entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue