X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=plugins%2Forg.argeo.slc.client.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fmodel%2FResultParentUtils.java;h=d569167dc9c1b0e9e6e435fed81f153a1f3b5aa5;hb=ebd53b4434140425f5ed3d10d3059ff95c0dba0f;hp=e8f10bffa2d2580ef9c5b5133d13028965b4356a;hpb=78a1f1f21b5785919ffe25ddb9baf12aadff5f37;p=gpl%2Fargeo-slc.git diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParentUtils.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParentUtils.java index e8f10bffa..d569167dc 100644 --- a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParentUtils.java +++ b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParentUtils.java @@ -165,46 +165,4 @@ public class ResultParentUtils { throw new SlcException("Cannot update result passed status", e); } } - - public static void updateStatusOnRemoval(Node node) { - try { - if (!node.hasNode(SlcNames.SLC_STATUS)) - // nothing to do - return; - boolean pStatus = node.getNode(SlcNames.SLC_STATUS) - .getProperty(SlcNames.SLC_SUCCESS).getBoolean(); - if (pStatus == true) - // nothing to update - return; - else { - // success we must first check if all siblings have also - // successfully completed - boolean success = true; - NodeIterator ni = node.getNodes(); - children: while (ni.hasNext()) { - Node currNode = ni.nextNode(); - if ((currNode.isNodeType(SlcTypes.SLC_DIFF_RESULT) || currNode - .isNodeType(SlcTypes.SLC_RESULT_FOLDER)) - && !currNode.getNode(SlcNames.SLC_STATUS) - .getProperty(SlcNames.SLC_SUCCESS) - .getBoolean()) { - success = false; - break children; - } - } - if (success) { - node.getNode(SlcNames.SLC_STATUS).setProperty( - SlcNames.SLC_SUCCESS, true); - updatePassedStatus(node, true); - } else - // one of the siblings had also the failed status so - // above tree remains unchanged. - return; - } - } catch (RepositoryException e) { - throw new SlcException( - "Unexpected error while updating status on removal", e); - } - } - }