diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties
index 088f7238db..bf61efd79f 100644
--- a/config/alfresco/messages/webclient.properties
+++ b/config/alfresco/messages/webclient.properties
@@ -1158,6 +1158,7 @@ sandbox_browse=Browse Website
sandbox_revert=Undo
sandbox_revertall=Undo All
sandbox_submitall=Submit All
+count_conflicted_items={0} file(s) conflict with changes made by other users
sandbox_submitselected=Submit Selected
sandbox_revertselected=Undo Selected
sandbox_icon=Browse Website
@@ -1295,6 +1296,7 @@ revert_selected_title=Undo Selected Items
revert_selected_desc=To undo the changes to the selected files in the sandbox, click OK.
revert_selected_confirm=Are you sure you want to undo the changes to the selected files in from the sandbox?
revert_all_title=Undo All Items
+revert_all_conflicts=Revert all Conflicts
revert_all_desc=To undo the changes to all the files in the sandbox, click OK.
revert_all_confirm=Are you sure you want to undo the changes to all files in the sandbox?
deploy_snapshot_title=Deploy Snapshot
diff --git a/config/alfresco/web-client-config-wcm-actions.xml b/config/alfresco/web-client-config-wcm-actions.xml
index e05e2331fd..114e00a8c0 100644
--- a/config/alfresco/web-client-config-wcm-actions.xml
+++ b/config/alfresco/web-client-config-wcm-actions.xml
@@ -97,7 +97,7 @@
Write
- org.alfresco.web.action.evaluator.WCMWorkflowDeletedEvaluator
+ org.alfresco.web.action.evaluator.WCMConflictEvaluatorsubmit/images/icons/submit.gif#{AVMBrowseBean.setupContentAction}
diff --git a/source/java/org/alfresco/web/action/evaluator/WCMConflictEvaluator.java b/source/java/org/alfresco/web/action/evaluator/WCMConflictEvaluator.java
new file mode 100644
index 0000000000..6a105debed
--- /dev/null
+++ b/source/java/org/alfresco/web/action/evaluator/WCMConflictEvaluator.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2005-2009 Alfresco Software Limited.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ * As a special exception to the terms and conditions of version 2.0 of
+ * the GPL, you may redistribute this Program in connection with Free/Libre
+ * and Open Source Software ("FLOSS") applications as described in Alfresco's
+ * FLOSS exception. You should have recieved a copy of the text describing
+ * the FLOSS exception, and it is also available here:
+ * http://www.alfresco.com/legal/licensing"
+ */
+package org.alfresco.web.action.evaluator;
+
+import org.alfresco.service.cmr.avmsync.AVMDifference;
+import org.alfresco.web.bean.repository.Node;
+
+public class WCMConflictEvaluator extends WCMWorkflowDeletedEvaluator
+{
+
+ /* (non-Javadoc)
+ * @see org.alfresco.web.action.evaluator.WCMWorkflowDeletedEvaluator#evaluate(org.alfresco.web.bean.repository.Node)
+ */
+ public boolean evaluate(final Node node)
+ {
+ if (!super.evaluate(node))
+ {
+ return false;
+ }
+ Integer diff = (Integer)node.getProperties().get("avmDiff");
+ if (diff == null)
+ {
+ return true;
+ }
+ if (diff == AVMDifference.CONFLICT)
+ {
+ return false;
+ }
+ return true;
+ }
+}
diff --git a/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java b/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java
index 5640fc79fb..fefb6f06a4 100644
--- a/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java
+++ b/source/java/org/alfresco/web/bean/wcm/AVMBrowseBean.java
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005-2007 Alfresco Software Limited.
+ * Copyright (C) 2005-2009 Alfresco Software Limited.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -36,6 +36,8 @@ import java.util.Map;
import java.util.ResourceBundle;
import javax.faces.application.FacesMessage;
+import javax.faces.component.UIParameter;
+import javax.faces.component.html.HtmlCommandButton;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
import javax.faces.model.SelectItem;
@@ -56,6 +58,8 @@ import org.alfresco.service.cmr.action.Action;
import org.alfresco.service.cmr.action.ActionService;
import org.alfresco.service.cmr.avm.AVMNodeDescriptor;
import org.alfresco.service.cmr.avm.AVMService;
+import org.alfresco.service.cmr.avmsync.AVMDifference;
+import org.alfresco.service.cmr.avmsync.AVMSyncService;
import org.alfresco.service.cmr.repository.FileTypeImageSize;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
@@ -70,6 +74,8 @@ import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.cmr.security.PermissionService;
import org.alfresco.service.cmr.workflow.WorkflowService;
+import org.alfresco.service.cmr.workflow.WorkflowTask;
+import org.alfresco.util.NameMatcher;
import org.alfresco.util.Pair;
import org.alfresco.util.VirtServerUtils;
import org.alfresco.wcm.sandbox.SandboxInfo;
@@ -226,6 +232,9 @@ public class AVMBrowseBean implements IContextListener
/** AVM service bean reference */
transient protected AVMService avmService;
+ /** AVM sync service bean reference */
+ transient protected AVMSyncService avmSyncService;
+
/** Action service bean reference */
transient protected ActionService actionService;
@@ -306,6 +315,23 @@ public class AVMBrowseBean implements IContextListener
return avmService;
}
+ /**
+ * @param avmSyncService The AVMSyncService to set.
+ */
+ public void setAvmSyncService(AVMSyncService avmSyncService)
+ {
+ this.avmSyncService = avmSyncService;
+ }
+
+ protected AVMSyncService getAvmSyncService()
+ {
+ if (avmSyncService == null)
+ {
+ avmSyncService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getAVMSyncService();
+ }
+ return avmSyncService;
+ }
+
/**
* @param nodeService The NodeService to set.
*/
@@ -2125,4 +2151,57 @@ public class AVMBrowseBean implements IContextListener
this.formName));
}
}
+
+ /**
+ * Revert All Conflicts
+ *
+ * @param event
+ */
+ public void revertAllConflict(ActionEvent event)
+ {
+ final HtmlCommandButton button = (HtmlCommandButton) event.getComponent();
+
+ List