mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Added types cm:avmcontent (derived from cm:content) TYPE_AVM_CONTENT and
cm:avmfolder (derived from cm:folder) TYPE_AVM_FOLDER as handles for UI. Fixed configuration goofs I introduced recently that caused Node Browsing to barf on content nodes. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3725 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -280,7 +280,7 @@ public class AVMContext implements ApplicationContextAware
|
||||
{
|
||||
if (fNodeService == null)
|
||||
{
|
||||
fNodeService = (NodeService)fAppContext.getBean("NodeService");
|
||||
fNodeService = (NodeService)fAppContext.getBean("nodeService");
|
||||
}
|
||||
return fNodeService;
|
||||
}
|
||||
|
@@ -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<ChildAssociationRef> getChildAssocs(NodeRef nodeRef) throws InvalidNodeRefException
|
||||
{
|
||||
|
||||
Object [] avmVersionPath = AVMNodeConverter.ToAVMVersionPath(nodeRef);
|
||||
int version = (Integer)avmVersionPath[0];
|
||||
String path = (String)avmVersionPath[1];
|
||||
|
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user