WCM Locking UI implementation and fixes.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6065 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2007-06-22 11:17:20 +00:00
parent 911327bda2
commit 86c9a9fc7e
6 changed files with 136 additions and 123 deletions

View File

@@ -31,6 +31,7 @@ import javax.faces.context.FacesContext;
import org.alfresco.model.WCMAppModel;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.avm.locking.AVMLockingService;
import org.alfresco.service.cmr.repository.ChildAssociationRef;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.namespace.RegexQNamePattern;
@@ -52,8 +53,12 @@ public class DeleteSandboxDialog extends BaseDialogBean
protected AVMService avmService;
protected AVMBrowseBean avmBrowseBean;
protected AVMLockingService avmLockingService;
// ------------------------------------------------------------------------------
// Bean property getters and setters
/**
* @param avmBrowseBean The avmBrowseBean to set.
*/
@@ -70,6 +75,14 @@ public class DeleteSandboxDialog extends BaseDialogBean
this.avmService = avmService;
}
/**
* @param avmLockingService The AVMLockingService to set
*/
public void setAvmLockingService(AVMLockingService avmLockingService)
{
this.avmLockingService = avmLockingService;
}
// ------------------------------------------------------------------------------
// Dialog implementation
@@ -118,17 +131,21 @@ public class DeleteSandboxDialog extends BaseDialogBean
// accessing a preview layer whose main layer has been torn
// out from under it.
AVMUtil.removeVServerWebapp(path, true);
// TODO: Use the .sandbox-id. property to delete all sandboxes,
// rather than assume a sandbox always had a single preview
// layer attached.
// purge the user main sandbox store from the system
this.avmService.purgeStore(sandbox);
// remove any locks this user may have
this.avmLockingService.removeStoreLocks(sandbox);
// purge the user preview sandbox store from the system
sandbox = AVMUtil.buildUserPreviewStoreName(storeRoot, username);
this.avmService.purgeStore(sandbox);
// remove any locks this user may have
this.avmLockingService.removeStoreLocks(sandbox);
// remove the association to this web project user meta-data
this.nodeService.removeChild(website.getNodeRef(), ref.getChildRef());