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:
David Caruana
2010-05-10 15:26:19 +00:00
parent d3565f67de
commit c2a0a63f04
3 changed files with 13 additions and 7 deletions

View File

@@ -386,7 +386,7 @@
[#macro booleanvalue value]${value?string}[/#macro] [#macro booleanvalue value]${value?string}[/#macro]
[#macro datetimevalue value]${xmldate(value)}[/#macro] [#macro datetimevalue value]${xmldate(value)}[/#macro]
[#macro urivalue value]${value?xml}[/#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 --] [#-- CMIS Relationships --]

View File

@@ -29,10 +29,6 @@ function createNode(parent, entry, slug, versioningState)
if (baseType == DOCUMENT_TYPE_ID) if (baseType == DOCUMENT_TYPE_ID)
{ {
node = parent.createFile(name); node = parent.createFile(name);
if (versioningState != null)
{
node = cmis.applyVersioningState(node, versioningState);
}
} }
else if (baseType == FOLDER_TYPE_ID) 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 exclude = [ PROP_OBJECT_TYPE_ID, PROP_NAME ];
var updated = updateNode(node, entry, exclude, function(propDef) {return patchValidator(propDef, true);}); 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 // only return node if updated successfully
return (updated == null) ? null : node; return (updated == null) ? null : node;
} }

View File

@@ -612,9 +612,13 @@ public class PropertyUtil
if (value instanceof Collection) 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 else