mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -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.
|
||||
|
@@ -26,6 +26,7 @@
|
||||
package org.alfresco.service.cmr.remote;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.alfresco.repo.attributes.Attribute;
|
||||
import org.alfresco.service.cmr.attributes.AttrQuery;
|
||||
@@ -198,4 +199,36 @@ public interface AttributeServiceTransport
|
||||
* @return Whether the attribute exists.
|
||||
*/
|
||||
public boolean exists(String ticket, String path);
|
||||
|
||||
/**
|
||||
* Add a list of attributes.
|
||||
* @param ticket
|
||||
* @param keys
|
||||
* @param values
|
||||
*/
|
||||
public void addAttributes(String ticket, List<String> keys, List<Attribute> values);
|
||||
|
||||
/**
|
||||
* Add a list of attributes.
|
||||
* @param ticket
|
||||
* @param path
|
||||
* @param values
|
||||
*/
|
||||
public void addAttributes(String ticket, String path, List<Attribute> values);
|
||||
|
||||
/**
|
||||
* Add a set of attributes.
|
||||
* @param ticket
|
||||
* @param keys
|
||||
* @param entries
|
||||
*/
|
||||
public void setAttributes(String ticket, List<String> keys, Map<String, Attribute> entries);
|
||||
|
||||
/**
|
||||
* Add a set of attributes.
|
||||
* @param ticket
|
||||
* @param path
|
||||
* @param entries
|
||||
*/
|
||||
public void setAttributes(String ticket, String path, Map<String, Attribute> entries);
|
||||
}
|
||||
|
Reference in New Issue
Block a user