return i;
return -1;
}
+
/**
* verify that newr version is really an intact version of the
* @param newVersion (may be modified)
_registerObject(newVersion); // TODO: check - this call hasn't been tested.
// Should retrieve original version and compare - unless local hashes can be used to determine if resultSet has been truncated.
// just do internal validation for moment.
- if (newVersion.isValid())
+ try {
+ if (SimpleClientConfig.validateUpdatedRoots())
+ newVersion.validate();
return true;
+ }
+ catch (Exception e)
+ {
+ log.error("Validation Exception for new vamsas root :"+newVersion.getVorbaId(),e);
+ }
return false;
} else {
// redundant ? if (oldVersion.is__stored_in_document())
if (!newVersion.isRegistered())
_registerObject(newVersion);
- if (newVersion.isValid())
+ try {
+ if (SimpleClientConfig.validateMergedRoots())
+ newVersion.validate();
return true;
+ }
+ catch (Exception e)
+ {
+ log.error("Validation Exception for new vamsas root :"+newVersion.getVorbaId(),e);
+ }
}
return false;
/**
}
return null;
}
+ /**
+ * called by vamsas api to write updated document to session
+ * @return true if update was successful
+ * @throws java.io.IOException
+ */
protected boolean updateSessionDocument() throws java.io.IOException {
boolean docupdate = true; // 'non-serious' problems below set this false
if (doc==null) {