Update of 
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/recyclebin/forms
In directory 
james.mmbase.org:/tmp/cvs-serv27508/contentrepository/src/java/com/finalist/cmsc/recyclebin/forms

Modified Files:
        DeleteAction.java 
Log Message:
CMSC-681 Asset Maintenance upload zip file and trash listing


See also: 
http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/recyclebin/forms
See also: http://www.mmbase.org/jira/browse/CMSC-681


Index: DeleteAction.java
===================================================================
RCS file: 
/var/cvs/contributions/CMSContainer/cmsc/contentrepository/src/java/com/finalist/cmsc/recyclebin/forms/DeleteAction.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- DeleteAction.java   3 Mar 2008 10:32:18 -0000       1.8
+++ DeleteAction.java   11 Dec 2008 09:19:55 -0000      1.9
@@ -1,11 +1,9 @@
 /*
-
-This software is OSI Certified Open Source Software.
-OSI Certified is a certification mark of the Open Source Initiative.
-
-The license (Mozilla version 1.0) can be read at the MMBase site.
-See http://www.MMBase.org/license
-
+ * 
+ * This software is OSI Certified Open Source Software. OSI Certified is a 
certification mark of the Open Source
+ * Initiative.
+ * 
+ * The license (Mozilla version 1.0) can be read at the MMBase site. See 
http://www.MMBase.org/license
  */
 package com.finalist.cmsc.recyclebin.forms;
 
@@ -27,7 +25,6 @@
 
    private static Log log = LogFactory.getLog(DeleteAction.class);
 
-
    @Override
    public ActionForward execute(ActionMapping mapping, HttpServletRequest 
request, Cloud cloud) throws Exception {
 
@@ -36,6 +33,7 @@
       }       
        
       String action = getParameter(request, "action");
+      String type = request.getParameter("type");
 
       if ("deleteall".equals(action)) {
          Node objectNode = null;
@@ -49,13 +47,11 @@
                   Workflow.complete(objectNode);
                }
                objectNode.delete(true);
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                log.warn("Unable to remove from trash " + ((objectNode == null) 
? null : objectNode.getNumber()));
             }
          }
-      }
-      else {
+      } else {
          String objectnumber = getParameter(request, "objectnumber");
          Node objectNode = cloud.getNode(objectnumber);
          if (Workflow.hasWorkflow(objectNode)) {
@@ -64,6 +60,11 @@
          }
          objectNode.delete(true);
       }
-      return mapping.findForward(SUCCESS);
+      if (type.equalsIgnoreCase("content")) {
+         return mapping.findForward("content");
+      } else {
+         return mapping.findForward("asset");
    }
+   }
+
 }
_______________________________________________
Cvs mailing list
Cvs@lists.mmbase.org
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to