Merged V2.1 to HEAD

6817: Fix for a resource bundle isue with regen renditions wizard and snapshot labels.
   6809: Fixes for locking and permission related issues relating to forms.
   6808: Uunit test update
   6799: AR-1760: Office webscript : property is undefined when opening a document
   6799: WCM submit dialog now sets focus to first field (label) rather than second (comment)
   6795: Fix to line break encoder.
   6781: WebDAV auth to return HTTP 401 instead of exception when user is null
   6775: Fix for appserver shutdown hang
   6761: Using avmService instead of nodeService to avoid a permission error MIT is seeing.
   6742: Fix for MIT locking issue for content contributors
   6706: Fixes to make wizard pages work in standards compliant mode.



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6823 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2007-09-18 23:18:09 +00:00
parent ad43a4c904
commit 6e1e59e951
15 changed files with 216 additions and 56 deletions

View File

@@ -37,7 +37,6 @@ import org.alfresco.service.ServiceRegistry;
import org.alfresco.service.cmr.avm.AVMService;
import org.alfresco.service.cmr.dictionary.DataTypeDefinition;
import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.util.Pair;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.bean.wcm.AVMUtil;
@@ -71,8 +70,10 @@ import org.xml.sax.SAXException;
{
throw new NullPointerException();
}
final NodeService nodeService = this.getServiceRegistry().getNodeService();
if (!nodeService.hasAspect(nodeRef, WCMAppModel.ASPECT_RENDITION))
final AVMService avmService = this.getServiceRegistry().getAVMService();
if (!avmService.hasAspect(AVMNodeConverter.ToAVMVersionPath(nodeRef).getFirst(),
AVMNodeConverter.ToAVMVersionPath(nodeRef).getSecond(),
WCMAppModel.ASPECT_RENDITION))
{
throw new IllegalArgumentException("node " + nodeRef +
" does not have aspect " + WCMAppModel.ASPECT_RENDITION);
@@ -91,17 +92,20 @@ import org.xml.sax.SAXException;
/** the name of this rendition */
public String getName()
{
final NodeService nodeService = this.getServiceRegistry().getNodeService();
return (String)
nodeService.getProperty(this.nodeRef, ContentModel.PROP_NAME);
// final AVMService avmService = this.getServiceRegistry().getAVMService();
// return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
// AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
// ContentModel.PROP_NAME).getStringValue();
return AVMNodeConverter.SplitBase(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond())[1];
}
/** the description of this rendition */
public String getDescription()
{
final NodeService nodeService = this.getServiceRegistry().getNodeService();
return (String)
nodeService.getProperty(this.nodeRef, ContentModel.PROP_DESCRIPTION);
final AVMService avmService = this.getServiceRegistry().getAVMService();
return avmService.getNodeProperty(AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getFirst(),
AVMNodeConverter.ToAVMVersionPath(this.nodeRef).getSecond(),
ContentModel.PROP_DESCRIPTION).getStringValue();
}
public String getWebappRelativePath()