Merged BRANCHES/DEV/V3.3-BUG-FIX to HEAD:

21646: ALF-3752: Getting Parent on a specific version throws exception
   21655: Fix ALF-4006: Incorrect search result after renaming a folder
   21634: Fix ALF-3822: Storing of datetime does not work

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21662 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
David Caruana
2010-08-06 14:24:02 +00:00
parent a36decbb8e
commit 681c9b6785
4 changed files with 20 additions and 63 deletions

View File

@@ -136,8 +136,16 @@ function updateNode(node, entry, exclude, validator)
// update node values // update node values
for (val in vals) for (val in vals)
{
if (val == "{http://www.alfresco.org/model/content/1.0}name")
{
// force rename
node.setName(vals[val]);
}
else
{ {
node.properties[val] = vals[val]; node.properties[val] = vals[val];
}
updated = true; updated = true;
} }

View File

@@ -1,61 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<model name="cmiscustom:model" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>CMIS Custom Model</description>
<author>Alfresco</author>
<version>1.0</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
<import uri="http://www.alfresco.org/model/system/1.0" prefix="sys"/>
</imports>
<namespaces>
<namespace uri="http://www.alfresco.org/model/cmis/custom" prefix="cmiscustom"/>
</namespaces>
<types>
<type name="cmiscustom:folder">
<title>Custom Folder</title>
<parent>cm:folder</parent>
<properties>
<property name="cmiscustom:folderprop_string">
<title>Custom Folder Property (string)</title>
<type>d:text</type>
</property>
</properties>
</type>
<type name="cmiscustom:document">
<title>Custom Document</title>
<parent>cm:content</parent>
<properties>
<property name="cmiscustom:docprop_string">
<title>Custom Document Property (string)</title>
<type>d:text</type>
</property>
<property name="cmiscustom:docprop_boolean_multi">
<title>Custom Document Property (multi-valued boolean)</title>
<type>d:boolean</type>
<multiple>true</multiple>
</property>
</properties>
<associations>
<association name="cmiscustom:assoc">
<source>
<mandatory>false</mandatory>
<many>false</many>
</source>
<target>
<class>cm:content</class>
<mandatory>false</mandatory>
<many>true</many>
</target>
</association>
</associations>
</type>
</types>
</model>

View File

@@ -347,7 +347,11 @@ public class DMNavigationServicePort extends DMAbstractServicePort implements Na
List<NodeRef> parents = new LinkedList<NodeRef>(); List<NodeRef> parents = new LinkedList<NodeRef>();
for (ChildAssociationRef childParentAssociation : nodeService.getParentAssocs(objectId)) for (ChildAssociationRef childParentAssociation : nodeService.getParentAssocs(objectId))
{ {
parents.add(childParentAssociation.getParentRef()); NodeRef parentRef = childParentAssociation.getParentRef();
if (!parentRef.equals(nodeService.getRootNode(parentRef.getStoreRef())))
{
parents.add(parentRef);
}
} }
return parents; return parents;
} }

View File

@@ -208,6 +208,12 @@ public class PropertyUtil
else if (cmisProperty instanceof CmisPropertyDateTime) else if (cmisProperty instanceof CmisPropertyDateTime)
{ {
convertedValue = ((CmisPropertyDateTime) cmisProperty).getValue(); convertedValue = ((CmisPropertyDateTime) cmisProperty).getValue();
List<GregorianCalendar> dates = new ArrayList<GregorianCalendar>(convertedValue.size());
for (Object date : convertedValue)
{
dates.add(((XMLGregorianCalendar)date).toGregorianCalendar());
}
convertedValue = dates;
} }
else if (cmisProperty instanceof CmisPropertyDecimal) else if (cmisProperty instanceof CmisPropertyDecimal)
{ {