org.sakaiproject.entitybroker.entityprovider.extension
Interface TagProvider

All Known Subinterfaces:
EntityBroker, TagProvideable, TagSearchService

public interface TagProvider

Defines the methods related to tagging entities (shared between interfaces)

Author:
Aaron Zeckoski (aaron@caret.cam.ac.uk)

Method Summary
 void addTagsToEntity(String reference, String[] tags)
          Add these tags to the an entity, will have no effect if the entity already has these tags
 List<String> getTagsForEntity(String reference)
          Get the set of tags which are associated with this entity
 void removeTagsFromEntity(String reference, String[] tags)
          Removes these tags from this entity, will have no effect if the tags do not exist on this entity
 void setTagsForEntity(String reference, String[] tags)
          Sets the tags which are associated with this entity, this overwrites any current tags and makes the input tags the only current tags for this entity
 

Method Detail

getTagsForEntity

List<String> getTagsForEntity(String reference)
Get the set of tags which are associated with this entity

Parameters:
reference - a globally unique reference to an entity (e.g. /myprefix/myid), consists of the entity prefix and optional segments (normally the id at least)
Returns:
a set of the tags which are associated with this entity
Throws:
UnsupportedOperationException - if this reference cannot be tagged

addTagsToEntity

void addTagsToEntity(String reference,
                     String[] tags)
Add these tags to the an entity, will have no effect if the entity already has these tags

Parameters:
reference - a globally unique reference to an entity (e.g. /myprefix/myid), consists of the entity prefix and optional segments (normally the id at least)
tags - a set of the tags to associate with this entity
Throws:
UnsupportedOperationException - if this reference cannot be tagged

setTagsForEntity

void setTagsForEntity(String reference,
                      String[] tags)
Sets the tags which are associated with this entity, this overwrites any current tags and makes the input tags the only current tags for this entity

Parameters:
reference - a globally unique reference to an entity (e.g. /myprefix/myid), consists of the entity prefix and optional segments (normally the id at least)
tags - a set of the tags to associate with this entity, setting this to an empty set will remove all tags from this entity
Throws:
UnsupportedOperationException - if this reference cannot be tagged

removeTagsFromEntity

void removeTagsFromEntity(String reference,
                          String[] tags)
Removes these tags from this entity, will have no effect if the tags do not exist on this entity

Parameters:
reference - a globally unique reference to an entity (e.g. /myprefix/myid), consists of the entity prefix and optional segments (normally the id at least)
tags - a set of the tags to remove from this entity, if this is empty then nothing happens, if this includes tags that do not exist on this entity then they are ignored
Throws:
UnsupportedOperationException - if this reference cannot be tagged


Copyright © 2007-2012 Sakai Project. All Rights Reserved.