Rejiggering of wiring to allow CIFS not to go through the lockin layer.

AVMNodeService doesn't point at AVMLockingAwareService.
Web Client now points at AVMLockingAwareService.
Forced a couple of places in the Web Client that were going through NodeService
to use AVMLockingAwareService to get proper locking behavior.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6234 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2007-07-12 16:26:02 +00:00
parent 7a02ff8a4d
commit c86d38b820
5 changed files with 53 additions and 36 deletions

View File

@@ -26,6 +26,7 @@ package org.alfresco.web.bean.wcm;
import java.io.Serializable;
import java.text.MessageFormat;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -33,6 +34,7 @@ import javax.faces.context.FacesContext;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
@@ -156,8 +158,14 @@ public class EditFilePropertiesDialog extends EditContentPropertiesDialog
repoProps.put(qname, propValue);
}
// Translate to what AVMService wants to take.
Map<QName, PropertyValue> avmProps = new HashMap<QName, PropertyValue>();
for (Map.Entry<QName, Serializable> entry : repoProps.entrySet())
{
avmProps.put(entry.getKey(), new PropertyValue(entry.getKey(), entry.getValue()));
}
// send the properties back to the repository
this.nodeService.setProperties(nodeRef, repoProps);
this.avmService.setNodeProperties(AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond(), avmProps);
// perform the rename last as for an AVM it changes the NodeRef
if (name != null)

View File

@@ -28,6 +28,7 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -37,6 +38,7 @@ import javax.faces.context.FacesContext;
import org.alfresco.model.ApplicationModel;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.avm.AVMNodeConverter;
import org.alfresco.repo.domain.PropertyValue;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.dictionary.PropertyDefinition;
@@ -141,9 +143,16 @@ public class EditFolderPropertiesDialog extends EditSpaceDialog
repoProps.put(qname, propValue);
}
// Translate to what AVMService wants to take.
Map<QName, PropertyValue> avmProps = new HashMap<QName, PropertyValue>();
for (Map.Entry<QName, Serializable> entry : repoProps.entrySet())
{
avmProps.put(entry.getKey(), new PropertyValue(entry.getKey(), entry.getValue()));
}
// send the properties back to the repository
this.nodeService.setProperties(nodeRef, repoProps);
this.avmService.setNodeProperties(AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond(), avmProps);
// perform the rename last as for an AVM it changes the NodeRef
if (name != null)

View File

@@ -564,7 +564,7 @@ public class UISandboxSnapshots extends SelfRenderingComponent
private AVMService getAVMService(FacesContext fc)
{
return (AVMService)FacesContextUtils.getRequiredWebApplicationContext(fc).getBean("AVMService");
return (AVMService)FacesContextUtils.getRequiredWebApplicationContext(fc).getBean("AVMLockingAwareService");
}

View File

@@ -1132,7 +1132,7 @@ public class UIUserSandboxes extends SelfRenderingComponent
private AVMService getAVMService(FacesContext fc)
{
return (AVMService)FacesContextUtils.getRequiredWebApplicationContext(fc).getBean("AVMService");
return (AVMService)FacesContextUtils.getRequiredWebApplicationContext(fc).getBean("AVMLockingAwareService");
}
private NodeService getNodeService(FacesContext fc)