diff --git a/config/alfresco/model/contentModel.xml b/config/alfresco/model/contentModel.xml index f916388c92..dc35262083 100644 --- a/config/alfresco/model/contentModel.xml +++ b/config/alfresco/model/contentModel.xml @@ -79,6 +79,11 @@ + + AVM Content + cm:content + + Dictionary Model cm:content @@ -138,6 +143,11 @@ cm:folder + + AVM Folder + cm:folder + + Person sys:base diff --git a/config/alfresco/node-services-context.xml b/config/alfresco/node-services-context.xml index cc97823ad2..1f4cf52b9f 100644 --- a/config/alfresco/node-services-context.xml +++ b/config/alfresco/node-services-context.xml @@ -68,7 +68,7 @@ - + diff --git a/source/java/org/alfresco/model/ContentModel.java b/source/java/org/alfresco/model/ContentModel.java index 72ec93e28b..f24f634ab4 100644 --- a/source/java/org/alfresco/model/ContentModel.java +++ b/source/java/org/alfresco/model/ContentModel.java @@ -97,7 +97,7 @@ public interface ContentModel // content type and aspect constants static final QName TYPE_CONTENT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "content"); static final QName PROP_CONTENT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "content"); - static final QName PROP_READONLY = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "readonly"); + static final QName TYPE_AVM_CONTENT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmcontent"); // title aspect static final QName ASPECT_TITLED = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "titled"); @@ -115,7 +115,7 @@ public interface ContentModel // author aspect static final QName ASPECT_AUTHOR = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "author"); static final QName PROP_AUTHOR = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "author"); - + // categories static final QName TYPE_CATEGORYROOT = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "category_root"); static final QName ASPECT_CLASSIFIABLE = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "classifiable"); @@ -143,6 +143,7 @@ public interface ContentModel static final QName TYPE_FOLDER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "folder"); /** child association type supported by {@link #TYPE_FOLDER} */ static final QName ASSOC_CONTAINS = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "contains"); + static final QName TYPE_AVM_FOLDER = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "avmfolder"); // person static final QName TYPE_PERSON = QName.createQName(NamespaceService.CONTENT_MODEL_1_0_URI, "person"); diff --git a/source/java/org/alfresco/repo/avm/AVMContext.java b/source/java/org/alfresco/repo/avm/AVMContext.java index 3fc8ae8f6f..ba294be1b1 100644 --- a/source/java/org/alfresco/repo/avm/AVMContext.java +++ b/source/java/org/alfresco/repo/avm/AVMContext.java @@ -280,7 +280,7 @@ public class AVMContext implements ApplicationContextAware { if (fNodeService == null) { - fNodeService = (NodeService)fAppContext.getBean("NodeService"); + fNodeService = (NodeService)fAppContext.getBean("nodeService"); } return fNodeService; } diff --git a/source/java/org/alfresco/repo/avm/AVMNodeService.java b/source/java/org/alfresco/repo/avm/AVMNodeService.java index 9acb834d45..e368088da5 100644 --- a/source/java/org/alfresco/repo/avm/AVMNodeService.java +++ b/source/java/org/alfresco/repo/avm/AVMNodeService.java @@ -268,11 +268,11 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi // Do the creates for supported types, or error out. try { - if (nodeTypeQName.equals(ContentModel.TYPE_FOLDER)) + if (nodeTypeQName.equals(ContentModel.TYPE_AVM_FOLDER)) { fAVMService.createDirectory(avmPath, nodeName); } - else if (nodeTypeQName.equals(ContentModel.TYPE_CONTENT)) + else if (nodeTypeQName.equals(ContentModel.TYPE_AVM_CONTENT)) { fAVMService.createFile(avmPath, nodeName); } @@ -450,11 +450,11 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi (String)avmVersionPath[1]); if (desc.isDirectory()) { - return ContentModel.TYPE_FOLDER; + return ContentModel.TYPE_AVM_FOLDER; } else { - return ContentModel.TYPE_CONTENT; + return ContentModel.TYPE_AVM_CONTENT; } } catch (AVMNotFoundException e) @@ -1153,6 +1153,7 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi */ public List getChildAssocs(NodeRef nodeRef) throws InvalidNodeRefException { + Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef); int version = (Integer)avmVersionPath[0]; String path = (String)avmVersionPath[1]; diff --git a/source/java/org/alfresco/repo/avm/AVMServiceTest.java b/source/java/org/alfresco/repo/avm/AVMServiceTest.java index 6853c6de5b..3b73a89a72 100644 --- a/source/java/org/alfresco/repo/avm/AVMServiceTest.java +++ b/source/java/org/alfresco/repo/avm/AVMServiceTest.java @@ -2300,7 +2300,7 @@ public class AVMServiceTest extends AVMServiceTestBase setupBasicTree(); FileFolderService ffs = (FileFolderService)fContext.getBean("FileFolderService"); assertTrue(ffs.create(AVMNodeConverter.ToNodeRef(-1, "main:/a/b/c"), - "banana", ContentModel.TYPE_CONTENT) != null); + "banana", ContentModel.TYPE_AVM_CONTENT) != null); fService.createSnapshot("main"); System.out.println(recursiveList("main", -1, true)); }