mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/V3.2 to HEAD:
19177: (RECORD ONLY) Updated record-only entries for V3.1 branch 19321: (RECORD ONLY) Removed deep svn:mergeinfo 19331: (RECORD ONLY) Merged HEAD to BRANCHES/V3.2: 19324: Follow-up on ALF-765 by upgrading EHCache to 2.0.0Performing merge across the whole of the branch 19526: Moved ContentServicePolicy static QNames onto policy classes 19539: (RECORD ONLY) Merged HEAD to V3.2 19538: Build fix - fix build speed 19541: Added extraction of custom, mapped metadata from PDF documents 19543: (RECORD ONLY) Removed deep svn:mergeinfo 19598: (RECORD ONLY) Backported (merge not possible) HEAD rev 18790 for IndexInfo fixes 19626: Fix for ALF-732: Possible memory leak using the .getNodeRefs() method against a ResultSet ... 19629: (RECORD ONLY) Merged HEAD to V3.2 19625: Fix to allow Share logo to swapped out for a different one without having to modify the header CSS. 19628: Corrected Share header component height. 19649: ALF-885: Cannot retrieve cm:title from an AVM node in FreeMarker (if persisted with actual type set to MLText) 19694: (RECORD ONLY) Merged V3.2 to HEAD: r19310 bad back merge - record-only 19713: (RECORD ONLY) Removed svn:mergeinfo git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19719 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -44,6 +44,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.cmr.repository.Period;
|
||||
import org.alfresco.service.cmr.repository.datatype.DefaultTypeConverter;
|
||||
import org.alfresco.service.cmr.repository.datatype.TypeConverter.Converter;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.EqualsHelper;
|
||||
import org.alfresco.util.VersionNumber;
|
||||
@@ -268,12 +269,36 @@ public class PropertyValue implements Cloneable, Serializable
|
||||
return ValueType.STRING;
|
||||
}
|
||||
}
|
||||
else if (value instanceof String)
|
||||
{
|
||||
return ValueType.STRING;
|
||||
}
|
||||
return ValueType.DB_ATTRIBUTE;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
Serializable convert(Serializable value)
|
||||
{
|
||||
// NOTE: since 2.2.1, PropertyValue is only used by AVM (which does not natively support MLText, other than single/default string)
|
||||
if (value != null)
|
||||
{
|
||||
if (value instanceof String)
|
||||
{
|
||||
return value;
|
||||
}
|
||||
else if (value instanceof MLText)
|
||||
{
|
||||
if (((MLText)value).size() <= 1)
|
||||
{
|
||||
return (String)((Converter<MLText, String>)DefaultTypeConverter.INSTANCE.getConverter(MLText.class, String.class)).convert((MLText)value);
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new UnsupportedOperationException("PropertyValue MLText is not supported for AVM");
|
||||
}
|
||||
}
|
||||
}
|
||||
return DefaultTypeConverter.INSTANCE.convert(MLText.class, value);
|
||||
}
|
||||
},
|
||||
|
Reference in New Issue
Block a user