mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged BRANCHES/V3.3 to HEAD:
20155: Fix ALF-2755: AtomPub create document with versioning state major (and supplied content stream) does not version the content stream, Fix ALF-2756: AtomPub create document with versioning state checkedout cause duplicate name exception 20161: Fix ALF-2760: AtomPub binding renders aspect multi-valued id properties incorrectly 20162: FIx ALF-2705: ClassCastException in getProperties() git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20163 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -386,7 +386,7 @@
|
||||
[#macro booleanvalue value]${value?string}[/#macro]
|
||||
[#macro datetimevalue value]${xmldate(value)}[/#macro]
|
||||
[#macro urivalue value]${value?xml}[/#macro]
|
||||
[#macro idvalue value]${value?xml}[/#macro]
|
||||
[#macro idvalue value][#if value?is_hash && value.nodeRef??]${value.nodeRef?xml}[#else]${value?xml}[/#if][/#macro]
|
||||
|
||||
[#-- --]
|
||||
[#-- CMIS Relationships --]
|
||||
|
@@ -29,10 +29,6 @@ function createNode(parent, entry, slug, versioningState)
|
||||
if (baseType == DOCUMENT_TYPE_ID)
|
||||
{
|
||||
node = parent.createFile(name);
|
||||
if (versioningState != null)
|
||||
{
|
||||
node = cmis.applyVersioningState(node, versioningState);
|
||||
}
|
||||
}
|
||||
else if (baseType == FOLDER_TYPE_ID)
|
||||
{
|
||||
@@ -66,6 +62,12 @@ function createNode(parent, entry, slug, versioningState)
|
||||
var exclude = [ PROP_OBJECT_TYPE_ID, PROP_NAME ];
|
||||
var updated = updateNode(node, entry, exclude, function(propDef) {return patchValidator(propDef, true);});
|
||||
|
||||
// apply versioning state
|
||||
if (baseType == DOCUMENT_TYPE_ID && versioningState != null)
|
||||
{
|
||||
node = cmis.applyVersioningState(node, versioningState);
|
||||
}
|
||||
|
||||
// only return node if updated successfully
|
||||
return (updated == null) ? null : node;
|
||||
}
|
||||
|
@@ -612,9 +612,13 @@ public class PropertyUtil
|
||||
|
||||
if (value instanceof Collection)
|
||||
{
|
||||
for (String propertyValue : (Collection<String>) value)
|
||||
for (Serializable propertyValue : (Collection<Serializable>) value)
|
||||
{
|
||||
property.getValue().add(propertyValue);
|
||||
// NOTE: CMIS multi-valued values cannot contain null
|
||||
if (propertyValue != null)
|
||||
{
|
||||
property.getValue().add(propertyValue.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user