Merged BRANCHES/V3.2 to HEAD:

18363: WCM clustering - ETHREEOH-3962 (duplicate root node entry)
   19091: Fix Part 1 ALF-726: v3.1.x Content Cleaner Job needs to be ported to v3.2
   19159: Fixed ALF-726: Migrate pre-3.2 content URLs to new format and pick up tag existing orphaned content
   19169: Fix fallout from 19159 for ALF-726: Migrate pre-3.2 content URLs to new format and pick up tag existing orphaned content
   19262: ALF-726 Multithreading for content URL conversion



git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@19267 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-03-12 19:11:12 +00:00
parent a2c2e215a8
commit fdc8f6f331
33 changed files with 2589 additions and 1175 deletions

View File

@@ -127,7 +127,18 @@ public class NodePropertyValue implements Cloneable, Serializable
@Override
Serializable convert(Serializable value)
{
return DefaultTypeConverter.INSTANCE.convert(Long.class, value);
if (value == null)
{
return null;
}
else if (value instanceof ContentDataId)
{
return ((ContentDataId)value).getId();
}
else
{
return DefaultTypeConverter.INSTANCE.convert(Long.class, value);
}
}
},
FLOAT
@@ -467,6 +478,41 @@ public class NodePropertyValue implements Cloneable, Serializable
{
return DefaultTypeConverter.INSTANCE.convert(Period.class, value);
}
},
CONTENT_DATA_ID
{
@Override
public Integer getOrdinalNumber()
{
return Integer.valueOf(21);
}
@Override
protected ValueType getPersistedType(Serializable value)
{
return ValueType.LONG;
}
@Override
Serializable convert(Serializable value)
{
if (value == null)
{
return null;
}
else if (value instanceof Long)
{
return value;
}
else if (value instanceof ContentDataId)
{
return ((ContentDataId)value).getId();
}
else
{
return DefaultTypeConverter.INSTANCE.convert(ContentData.class, value);
}
}
}
;
@@ -566,6 +612,10 @@ public class NodePropertyValue implements Cloneable, Serializable
{
return ValueType.PERIOD;
}
else if (value instanceof ContentDataId)
{
return ValueType.CONTENT_DATA_ID;
}
else
{
// type is not recognised as belonging to any particular slot
@@ -592,7 +642,7 @@ public class NodePropertyValue implements Cloneable, Serializable
valueTypesByPropertyType.put(DataTypeDefinition.DATE, ValueType.DATE);
valueTypesByPropertyType.put(DataTypeDefinition.DATETIME, ValueType.DATE);
valueTypesByPropertyType.put(DataTypeDefinition.CATEGORY, ValueType.NODEREF);
valueTypesByPropertyType.put(DataTypeDefinition.CONTENT, ValueType.CONTENT);
valueTypesByPropertyType.put(DataTypeDefinition.CONTENT, ValueType.CONTENT_DATA_ID);
valueTypesByPropertyType.put(DataTypeDefinition.TEXT, ValueType.STRING);
valueTypesByPropertyType.put(DataTypeDefinition.MLTEXT, ValueType.MLTEXT);
valueTypesByPropertyType.put(DataTypeDefinition.NODE_REF, ValueType.NODEREF);