Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/service/SimpleRepository.java =================================================================== RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/service/SimpleRepository.java,v diff -u -r1.4 -r1.5 --- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/service/SimpleRepository.java 6 Oct 2005 06:38:03 -0000 1.4 +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/service/SimpleRepository.java 7 Oct 2005 00:07:53 -0000 1.5 @@ -738,7 +738,7 @@ // check that the previous version was a file node - error otherwise SimpleVersionedNode node = getNode(ticket.getWorkspaceId(),uuid,versionId); node.setProperty(name, value, type); - node.validateSaveDB(null); + node.saveDB(null); } /* (non-Javadoc) @@ -757,7 +757,6 @@ +"Please delete the parent. Node UUID "+uuid); } List problemPaths = latestNodeVersion.deleteNode(); - latestNodeVersion.saveDB(null); return problemPaths != null ? (String[]) problemPaths.toArray(new String[problemPaths.size()]) : new String[0]; @@ -776,7 +775,6 @@ // get the first version of the node and delete from there. SimpleVersionedNode nodeVersion = getNode(ticket.getWorkspaceId(),uuid,version); List problemPaths = nodeVersion.deleteVersion(); - nodeVersion.saveDB(null); return problemPaths != null ? (String[]) problemPaths.toArray(new String[problemPaths.size()]) : new String[0]; Index: lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/service/SimpleVersionedNode.java =================================================================== RCS file: /usr/local/cvsroot/lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/service/SimpleVersionedNode.java,v diff -u -r1.5 -r1.6 --- lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/service/SimpleVersionedNode.java 6 Oct 2005 06:38:03 -0000 1.5 +++ lams_contentrepository/src/java/org/lamsfoundation/lams/contentrepository/service/SimpleVersionedNode.java 7 Oct 2005 00:07:53 -0000 1.6 @@ -686,23 +686,13 @@ } - /** Validate the node and save the db changes to the current node. - * Do not use if there are files that have been updated - the validation may fail and we - * would end up in an odd state. - *
- * If files have been added, please call Long save(String versionDescription, List childNodes). + /** Validate the node and save the db changes to the current node. * @param versionDescription optional. If supplied will set the version description */ - protected void validateSaveDB(String versionDescription) throws ValidationException { + protected void saveDB(String versionDescription) throws ValidationException { + validateNode(); - saveDB(versionDescription); - } - /** Just save the db changes to the current node. See validateSaveDB() - * @param versionDescription optional. If supplied will set the version description - */ - protected void saveDB(String versionDescription) { - // nodeDAO to take care of insert or update (uses saveOrUpdate) // the nodeVersion and nodeVersionProperty collections cascade // updates and deletes, so we can just save the node!