Merged V2.1 to HEAD

6486: Fix for AWC-1134 (Made minimum length for username and password configurable)
   6487: Added "copy.verbose" property to build script to list all files being copied in the 'deploy-tomcat-exploded' and 'deploy-webclient-changes' targets
   6488: Changed default CIFS server to remove underscore as it can cause problems with OpenOffice.
   6489: Fix for WCM-498 (Expired items that are deleted are not represented as such in the change request dialog or submit dialog)
   6490: Fix for WCM-446 and WCM-624. Multi-select and All operations in Modified Files list respect items in workflow and ignore them.
   6491: Fixes profoundly brain dead behavior in AVMLockingService.init().
   6492: Refactoring of LookupCache to be clustering compatible
   6493: Staging and locking changes
   6494: WCM Revert action moved to end of all action lists to avoid accidently clicking it (as it has no confirmation screen!)
   6496: Fixes for WCM-746 and WCM-747 - Edit File Properties and Edit Folder Properties working correctly again for AVM objects.
   6497: Enable virtualization server to be (re)started at any point prior or during the startup of the alfresco webapp (fixes WCM-750).
   6498: WCM-742 - moving locks from the preview sandbox to the main user sandbox.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6739 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-10 23:15:37 +00:00
parent 223934268c
commit cc218b118e
18 changed files with 248 additions and 49 deletions

View File

@@ -42,6 +42,7 @@ 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.workflow.WorkflowTask;
import org.alfresco.util.NameMatcher;
import org.alfresco.util.Pair;
import org.alfresco.util.VirtServerUtils;
@@ -58,6 +59,7 @@ public class RevertAllDialog extends BaseDialogBean
private static final String MSG_REVERTALL_SUCCESS = "revertall_success";
protected AVMBrowseBean avmBrowseBean;
protected AVMService avmService;
protected AVMSyncService avmSyncService;
protected ActionService actionService;
protected NameMatcher nameMatcher;
@@ -69,6 +71,14 @@ public class RevertAllDialog extends BaseDialogBean
private String virtUpdatePath;
/**
* @param avmService the avmService to set
*/
public void setAvmService(AVMService avmService)
{
this.avmService = avmService;
}
/**
* @param avmBrowseBean The AVM BrowseBean to set
*/
@@ -118,23 +128,31 @@ public class RevertAllDialog extends BaseDialogBean
List<Pair<Integer, String>> versionPaths = new ArrayList<Pair<Integer, String>>();
List<WorkflowTask> tasks = null;
for (AVMDifference diff : diffs)
{
String revertPath = diff.getSourcePath();
versionPaths.add(new Pair<Integer, String>(-1, revertPath) );
if ( (this.virtUpdatePath == null) &&
VirtServerUtils.requiresUpdateNotification(revertPath)
)
AVMNodeDescriptor node = avmService.lookup(-1, diff.getSourcePath(), true);
if (tasks == null)
{
this.virtUpdatePath = revertPath;
tasks = AVMWorkflowUtil.getAssociatedTasksForSandbox(AVMUtil.getStoreName(diff.getSourcePath()));
}
if (AVMWorkflowUtil.getAssociatedTasksForNode(node, tasks).size() == 0)
{
String revertPath = diff.getSourcePath();
versionPaths.add(new Pair<Integer, String>(-1, revertPath) );
if ( (this.virtUpdatePath == null) &&
VirtServerUtils.requiresUpdateNotification(revertPath) )
{
this.virtUpdatePath = revertPath;
}
}
}
Map<String, Serializable> args = new HashMap<String, Serializable>(1, 1.0f);
args.put(AVMUndoSandboxListAction.PARAM_NODE_LIST, (Serializable)versionPaths);
Action action = this.actionService.createAction(AVMUndoSandboxListAction.NAME, args);
this.actionService.executeAction(action, null); // dummy action ref
this.actionService.executeAction(action, null); // dummy action ref, list passed as action arg
String msg = MessageFormat.format(Application.getMessage(
context, MSG_REVERTALL_SUCCESS), this.avmBrowseBean.getUsername());