public class AttributeServiceImpl extends java.lang.Object implements AttributeService
PropertyValueDAOAttributeService.AttributeQueryCallback| Constructor and Description |
|---|
AttributeServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
createAttribute(java.io.Serializable value,
java.io.Serializable[] keys)
Create an attribute with an optional value, assuming there is no existing attribute
using the same keys.
|
boolean |
exists(java.io.Serializable[] keys)
Determine if a particular attribute exists.
|
java.io.Serializable |
getAttribute(java.io.Serializable[] keys)
Get an attribute using a list of unique keys
|
void |
getAttributes(AttributeService.AttributeQueryCallback callback,
java.io.Serializable[] keys)
Get all attributes that share the starter keys provided.
|
void |
removeAttribute(java.io.Serializable[] keys)
Remove a specific attribute.
|
void |
removeAttributes(java.io.Serializable[] keys)
Remove all attributes that share a set of keys (in order)
|
void |
setAttribute(java.io.Serializable value,
java.io.Serializable[] keys)
Set an attribute, overwriting its prior value if it already existed.
|
void |
setPropertyValueDAO(PropertyValueDAO propertyValueDAO)
Set the DAO that handles the unique property persistence
|
void |
updateOrCreateAttribute(java.io.Serializable keyBefore1,
java.io.Serializable keyBefore2,
java.io.Serializable keyBefore3,
java.io.Serializable keyAfter1,
java.io.Serializable keyAfter2,
java.io.Serializable keyAfter3)
Update an attribute key whilst preserving the associated value (if any).
|
public void setPropertyValueDAO(PropertyValueDAO propertyValueDAO)
public boolean exists(java.io.Serializable[] keys)
exists in interface AttributeServicekeys - List of 1 to 3 keys to uniquely identify the attributepublic java.io.Serializable getAttribute(java.io.Serializable[] keys)
getAttribute in interface AttributeServicekeys - List of 1 to 3 keys to uniquely identify the attributepublic void getAttributes(AttributeService.AttributeQueryCallback callback, java.io.Serializable[] keys)
getAttributes in interface AttributeServicecallback - the callback that handles the resultskeys - 0 to 3 key values to search againstpublic void setAttribute(java.io.Serializable value,
java.io.Serializable[] keys)
#exists(String...) will still return true. If the attribute doesn't
exist, it will be created otherwise it will be modified.setAttribute in interface AttributeServicevalue - The value to store (can be a collection or null)keys - List of 1 to 3 keys to uniquely identify the attributepublic void createAttribute(java.io.Serializable value,
java.io.Serializable[] keys)
createAttribute in interface AttributeServicevalue - The value to store (can be a collection or null)keys - List of 1 to 3 keys to uniquely identify the attributepublic void updateOrCreateAttribute(java.io.Serializable keyBefore1,
java.io.Serializable keyBefore2,
java.io.Serializable keyBefore3,
java.io.Serializable keyAfter1,
java.io.Serializable keyAfter2,
java.io.Serializable keyAfter3)
updateOrCreateAttribute in interface AttributeServicekeyBefore1 - the first part of the original unique key (never null)keyBefore2 - the second part of the original unique key (null allowed)keyBefore3 - the third part of the original unique key (null allowed)keyAfter1 - the first part of the new unique key (never null)keyAfter2 - the second part of the new unique key (null allowed)keyAfter3 - the third part of the new unique key (null allowed)public void removeAttribute(java.io.Serializable[] keys)
removeAttribute in interface AttributeServicekeys - up to 3 keys to uniquely identify the attributepublic void removeAttributes(java.io.Serializable[] keys)
removeAttributes in interface AttributeServicekeys - up to 3 keys to identify attributes to removeCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.