mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
AVMNodeService accepts cm:content, and cm:folder, as types for createNode as
well as cm:avmcontent and cm:avmfolder. It also spoofs a name property which should make other service happier with it. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3734 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -268,11 +268,13 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
|||||||
// Do the creates for supported types, or error out.
|
// Do the creates for supported types, or error out.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (nodeTypeQName.equals(ContentModel.TYPE_AVM_FOLDER))
|
if (nodeTypeQName.equals(ContentModel.TYPE_AVM_FOLDER) ||
|
||||||
|
nodeTypeQName.equals(ContentModel.TYPE_FOLDER))
|
||||||
{
|
{
|
||||||
fAVMService.createDirectory(avmPath, nodeName);
|
fAVMService.createDirectory(avmPath, nodeName);
|
||||||
}
|
}
|
||||||
else if (nodeTypeQName.equals(ContentModel.TYPE_AVM_CONTENT))
|
else if (nodeTypeQName.equals(ContentModel.TYPE_AVM_CONTENT)
|
||||||
|
||nodeTypeQName.equals(ContentModel.TYPE_CONTENT))
|
||||||
{
|
{
|
||||||
fAVMService.createFile(avmPath, nodeName);
|
fAVMService.createFile(avmPath, nodeName);
|
||||||
}
|
}
|
||||||
@@ -838,6 +840,7 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
|||||||
result.put(ContentModel.PROP_MODIFIED, new Date(desc.getModDate()));
|
result.put(ContentModel.PROP_MODIFIED, new Date(desc.getModDate()));
|
||||||
result.put(ContentModel.PROP_MODIFIER, desc.getLastModifier());
|
result.put(ContentModel.PROP_MODIFIER, desc.getLastModifier());
|
||||||
result.put(ContentModel.PROP_OWNER, desc.getOwner());
|
result.put(ContentModel.PROP_OWNER, desc.getOwner());
|
||||||
|
result.put(ContentModel.PROP_NAME, desc.getName());
|
||||||
if (desc.isFile())
|
if (desc.isFile())
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -942,6 +945,10 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
|||||||
{
|
{
|
||||||
return desc.getOwner();
|
return desc.getOwner();
|
||||||
}
|
}
|
||||||
|
else if (qName.equals(ContentModel.PROP_NAME))
|
||||||
|
{
|
||||||
|
return desc.getName();
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fgLogger.error("Invalid Built In Property: " + qName);
|
fgLogger.error("Invalid Built In Property: " + qName);
|
||||||
@@ -979,7 +986,11 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
|||||||
// For AVM nodes is in place.
|
// For AVM nodes is in place.
|
||||||
if (isBuiltInProperty(qName))
|
if (isBuiltInProperty(qName))
|
||||||
{
|
{
|
||||||
continue;
|
if (qName.equals(ContentModel.PROP_CONTENT))
|
||||||
|
{
|
||||||
|
fAVMService.setContentData((String)avmVersionPath[1],
|
||||||
|
(ContentData)properties.get(qName));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
values.put(qName, new PropertyValue(null, properties.get(qName)));
|
values.put(qName, new PropertyValue(null, properties.get(qName)));
|
||||||
}
|
}
|
||||||
@@ -1000,7 +1011,8 @@ public class AVMNodeService extends AbstractNodeServiceImpl implements NodeServi
|
|||||||
ContentModel.PROP_MODIFIED,
|
ContentModel.PROP_MODIFIED,
|
||||||
ContentModel.PROP_MODIFIER,
|
ContentModel.PROP_MODIFIER,
|
||||||
ContentModel.PROP_OWNER,
|
ContentModel.PROP_OWNER,
|
||||||
ContentModel.PROP_CONTENT
|
ContentModel.PROP_CONTENT,
|
||||||
|
ContentModel.PROP_NAME
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user