org.sakaiproject.tool.assessment.shared.impl.assessment
Class ItemServiceImpl

java.lang.Object
  extended byorg.sakaiproject.tool.assessment.shared.impl.assessment.ItemServiceImpl
All Implemented Interfaces:
ItemServiceAPI

public class ItemServiceImpl
extends Object
implements ItemServiceAPI

AssessmentServiceImpl implements a shared interface to get/set item information.

Author:
Ed Smiley

Constructor Summary
ItemServiceImpl()
           
 
Method Summary
 void addItemMetaData(Long itemId, String label, String value, String agentId)
          Add metadata for an item, used for modify param: itemid, label, value, agentId
 void deleteItem(Long itemId, String agentId)
          Delete a item.
 void deleteItemContent(Long itemId, String agentId)
          Delete itemtextset for an item, used for modify
 void deleteItemMetaData(Long itemId, String label, String agentId)
          Delete metadata for an item, used for modify.
 ItemDataIfc getItem(Long itemId, String agentId)
          Get a particular item.
 ItemDataIfc getItem(String itemId)
          Get item.
 Map getItemsByKeyword(String keyword)
          Search for items.
 ItemDataIfc saveItem(ItemDataIfc item)
          Save item.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemServiceImpl

public ItemServiceImpl()
Method Detail

getItem

public ItemDataIfc getItem(Long itemId,
                           String agentId)
Get a particular item.

Specified by:
getItem in interface ItemServiceAPI
Parameters:
itemId - the item id
agentId - the agent id
Returns:
the item data interface

deleteItem

public void deleteItem(Long itemId,
                       String agentId)
Delete a item.

Specified by:
deleteItem in interface ItemServiceAPI
Parameters:
itemId - the item id
agentId - the agent id

deleteItemContent

public void deleteItemContent(Long itemId,
                              String agentId)
Delete itemtextset for an item, used for modify

Specified by:
deleteItemContent in interface ItemServiceAPI
Parameters:
itemId - the item id
agentId - the agent id

deleteItemMetaData

public void deleteItemMetaData(Long itemId,
                               String label,
                               String agentId)
Delete metadata for an item, used for modify. param: itemid, label, agentId

Specified by:
deleteItemMetaData in interface ItemServiceAPI
Parameters:
itemId - the item id
label - the metadata label
agentId - the agent id

addItemMetaData

public void addItemMetaData(Long itemId,
                            String label,
                            String value,
                            String agentId)
Add metadata for an item, used for modify param: itemid, label, value, agentId

Specified by:
addItemMetaData in interface ItemServiceAPI
Parameters:
itemId - the item id
label - the metadata label
value - the value for the label
agentId - the agent id

saveItem

public ItemDataIfc saveItem(ItemDataIfc item)
Save item.

Specified by:
saveItem in interface ItemServiceAPI
Parameters:
item - interface
Returns:
item interface

getItem

public ItemDataIfc getItem(String itemId)
Get item.

Specified by:
getItem in interface ItemServiceAPI
Parameters:
itemId - the item id
Returns:
item interface

getItemsByKeyword

public Map getItemsByKeyword(String keyword)
Search for items.

Specified by:
getItemsByKeyword in interface ItemServiceAPI
Parameters:
keyword - the keyword to search by.
Returns:
Map of ItemDataIfcs with item id strings as keys.