ContentData

- The default locale if one is not specified
 - Client code must still handle null locales for backwards compatibility
NodeService
 - Moved support methods for instrinsic properties
Locale
 - The Alfresco String representation of a Locale is x_y_z, even if x, y or z are ""
 - This makes the SQL like function more accurate for searches against locale properties


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4618 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-12-15 14:27:17 +00:00
parent d9a20c4e55
commit 026f9203a8
9 changed files with 200 additions and 63 deletions

View File

@@ -527,50 +527,6 @@ public abstract class AbstractNodeServiceImpl implements NodeService
return uuid;
}
/**
* Remove all properties used by the
* {@link ContentModel#ASPECT_REFERENCEABLE referencable aspect}.
* <p>
* This method can be used to ensure that the information already stored
* by the node key is not duplicated by the properties.
*
* @param properties properties to change
*/
protected void removeReferencableProperties(Map<QName, Serializable> properties)
{
properties.remove(ContentModel.PROP_STORE_PROTOCOL);
properties.remove(ContentModel.PROP_STORE_IDENTIFIER);
properties.remove(ContentModel.PROP_NODE_UUID);
properties.remove(ContentModel.PROP_NODE_DBID);
}
/**
* Adds all properties used by the
* {@link ContentModel#ASPECT_REFERENCEABLE referencable aspect}.
* <p>
* This method can be used to ensure that the values used by the aspect
* are present as node properties.
* <p>
* This method also ensures that the {@link ContentModel#PROP_NAME name property}
* is always present as a property on a node.
*
* @param nodeRef the node reference containing the values required
* @param nodeDbId the database-assigned ID
* @param properties the node properties
*/
protected void addReferencableProperties(NodeRef nodeRef, Long nodeDbId, Map<QName, Serializable> properties)
{
properties.put(ContentModel.PROP_STORE_PROTOCOL, nodeRef.getStoreRef().getProtocol());
properties.put(ContentModel.PROP_STORE_IDENTIFIER, nodeRef.getStoreRef().getIdentifier());
properties.put(ContentModel.PROP_NODE_UUID, nodeRef.getId());
properties.put(ContentModel.PROP_NODE_DBID, nodeDbId);
// add the ID as the name, if required
if (properties.get(ContentModel.PROP_NAME) == null)
{
properties.put(ContentModel.PROP_NAME, nodeRef.getId());
}
}
/**
* Defers to the pattern matching overload
*