Adds some convenience methods to AttributeService.

Namely two flavors each of addAttributes, for adding attributes to lists,
and setAttributes for adding entries to maps.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5804 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2007-05-29 18:19:00 +00:00
parent 7b5349005c
commit 21742933ec
8 changed files with 258 additions and 2 deletions

View File

@@ -26,6 +26,7 @@
package org.alfresco.service.cmr.attributes;
import java.util.List;
import java.util.Map;
import org.alfresco.repo.attributes.Attribute;
import org.alfresco.util.Pair;
@@ -100,6 +101,20 @@ public interface AttributeService
*/
public void setAttribute(List<String> keys, String name, Attribute value);
/**
* Set a set of attributes on a map.
* @param path The path to the map.
* @param entries The entries to set.
*/
public void setAttributes(String path, Map<String, Attribute> entries);
/**
* Set a set of attributes on a map.
* @param keys The List of path keys to the map.
* @param entries The entries to set.
*/
public void setAttributes(List<String> keys, Map<String, Attribute> entries);
/**
* Set an attribute in a list.
*
@@ -133,6 +148,20 @@ public interface AttributeService
*/
public void addAttribute(List<String> keys, Attribute value);
/**
* Add a list of attributes to the end of a list.
* @param path The path to the list.
* @param values The values to add.
*/
public void addAttributes(String path, List<Attribute> values);
/**
* Add a list of attributes to the end of a list.
* @param keys The List of path keys to the list.
* @param values The values to add.
*/
public void addAttributes(List<String> keys, List<Attribute> values);
/**
* Remove an Attribute.
* @param name The name of the Attribute.