org.sakaiproject.tool.assessment.services
Class QuestionPoolService

java.lang.Object
  extended by org.sakaiproject.tool.assessment.services.QuestionPoolService

public class QuestionPoolService
extends Object

The QuestionPoolService calls the service locator to reach the manager on the back end.

Author:
Rachel Gollub

Constructor Summary
QuestionPoolService()
          Creates a new QuestionPoolService object.
 
Method Summary
 void addItemToPool(String itemId, Long poolId)
          Save a question to a pool.
 void addQuestionPoolAccess(Tree tree, String user, Long questionPoolId, Long accessTypeId)
          Shared Pools with other user
 Long copyItemFacade(ItemDataIfc itemData)
           
 ItemFacade copyItemFacade2(ItemDataIfc itemData)
           
 void copyPool(Tree tree, String agentId, Long sourceId, Long destId, String prependString1, String prependString2)
          Copy a subpool to a pool.
 void copyQuestion(osid.shared.Id questionId, osid.shared.Id destId)
          Copy a question to a pool
 void copyQuestion(osid.shared.Id questionId, osid.shared.Id destId, boolean duplicateCopy)
          Copy a question to a pool
 void deletePool(Long poolId, String agentId, Tree tree)
          Delete a pool
 String exportQuestion(osid.shared.Id questionId)
           
 List<AgentFacade> getAgentsWithAccess(Long questionPoolId)
           
 List<AgentFacade> getAgentsWithoutAccess(Long questionPoolId, String realmId)
           
 ArrayList getAllItems(Long poolId)
          Get all scores for a published assessment from the back end.
 ArrayList getAllItemsSorted(Long poolId, String orderBy, String ascending)
          Get all items sorted by orderby
 QuestionPoolIteratorFacade getAllPools(String agentId)
          Get all pools from the back end.
 QuestionPoolIteratorFacade getAllPoolsWithAccess(String agentId)
           
 ArrayList getBasicInfoOfAllPools(String agentId)
          Get basic info for pools(just id and title) for displaying in pulldown .
 int getCountItems(Long poolId)
          Get the count of items for a published assessment from the back end.
 QuestionPoolFacade getPool(Long poolId, String agentId)
          Get a particular pool from the backend, with all questions.
 List getPoolIdsByAgent(String agentId)
          Get pool id's by agent.
 List getPoolIdsByItem(String itemId)
          Get a list of pools that have a specific Agent
 HashMap getQuestionPoolItemMap()
           
 List getSubPools(Long poolId)
          Get a list of pools that have a specific parent
 int getSubPoolSize(Long poolId)
          Get the size of a subpool.
 boolean hasItem(String itemId, Long poolId)
           
 boolean hasSubPools(Long poolId)
          Checks to see if a pool has subpools
 boolean isDescendantOf(Long poolA, Long poolB, String agentId)
          Is a pool a descendant of the other?
 void moveItemToPool(String itemId, Long sourceId, Long destId)
          Move a question to a pool.
 void movePool(String agentId, Long sourceId, Long destId)
          Move a subpool to a pool.
 boolean poolIsUnique(String questionPoolId, String title, String parentPoolId, String agentId)
           
 void removeQuestionFromPool(String questionId, Long poolId)
          removes a Question from the question pool.
 void removeQuestionPoolAccess(Tree tree, String user, Long questionPoolId, Long accessTypeId)
           
 QuestionPoolFacade savePool(QuestionPoolFacade pool)
          Save a question pool.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QuestionPoolService

public QuestionPoolService()
Creates a new QuestionPoolService object.

Method Detail

getAllPools

public QuestionPoolIteratorFacade getAllPools(String agentId)
Get all pools from the back end.


getAllPoolsWithAccess

public QuestionPoolIteratorFacade getAllPoolsWithAccess(String agentId)

getBasicInfoOfAllPools

public ArrayList getBasicInfoOfAllPools(String agentId)
Get basic info for pools(just id and title) for displaying in pulldown .


getPool

public QuestionPoolFacade getPool(Long poolId,
                                  String agentId)
Get a particular pool from the backend, with all questions.


getPoolIdsByItem

public List getPoolIdsByItem(String itemId)
Get a list of pools that have a specific Agent


hasItem

public boolean hasItem(String itemId,
                       Long poolId)

getPoolIdsByAgent

public List getPoolIdsByAgent(String agentId)
Get pool id's by agent.


getSubPools

public List getSubPools(Long poolId)
Get a list of pools that have a specific parent


getSubPoolSize

public int getSubPoolSize(Long poolId)
Get the size of a subpool.


hasSubPools

public boolean hasSubPools(Long poolId)
Checks to see if a pool has subpools


getAllItemsSorted

public ArrayList getAllItemsSorted(Long poolId,
                                   String orderBy,
                                   String ascending)
Get all items sorted by orderby


getAllItems

public ArrayList getAllItems(Long poolId)
Get all scores for a published assessment from the back end.


addItemToPool

public void addItemToPool(String itemId,
                          Long poolId)
Save a question to a pool.


moveItemToPool

public void moveItemToPool(String itemId,
                           Long sourceId,
                           Long destId)
Move a question to a pool.


isDescendantOf

public boolean isDescendantOf(Long poolA,
                              Long poolB,
                              String agentId)
Is a pool a descendant of the other?


movePool

public void movePool(String agentId,
                     Long sourceId,
                     Long destId)
Move a subpool to a pool.


deletePool

public void deletePool(Long poolId,
                       String agentId,
                       Tree tree)
Delete a pool


removeQuestionFromPool

public void removeQuestionFromPool(String questionId,
                                   Long poolId)
removes a Question from the question pool. This does not *delete* the question itself


copyPool

public void copyPool(Tree tree,
                     String agentId,
                     Long sourceId,
                     Long destId,
                     String prependString1,
                     String prependString2)
Copy a subpool to a pool.


copyQuestion

public void copyQuestion(osid.shared.Id questionId,
                         osid.shared.Id destId)
Copy a question to a pool


copyQuestion

public void copyQuestion(osid.shared.Id questionId,
                         osid.shared.Id destId,
                         boolean duplicateCopy)
Copy a question to a pool


exportQuestion

public String exportQuestion(osid.shared.Id questionId)

savePool

public QuestionPoolFacade savePool(QuestionPoolFacade pool)
Save a question pool.


getQuestionPoolItemMap

public HashMap getQuestionPoolItemMap()

poolIsUnique

public boolean poolIsUnique(String questionPoolId,
                            String title,
                            String parentPoolId,
                            String agentId)

copyItemFacade

public Long copyItemFacade(ItemDataIfc itemData)

copyItemFacade2

public ItemFacade copyItemFacade2(ItemDataIfc itemData)

getCountItems

public int getCountItems(Long poolId)
Get the count of items for a published assessment from the back end.


addQuestionPoolAccess

public void addQuestionPoolAccess(Tree tree,
                                  String user,
                                  Long questionPoolId,
                                  Long accessTypeId)
Shared Pools with other user


removeQuestionPoolAccess

public void removeQuestionPoolAccess(Tree tree,
                                     String user,
                                     Long questionPoolId,
                                     Long accessTypeId)

getAgentsWithAccess

public List<AgentFacade> getAgentsWithAccess(Long questionPoolId)

getAgentsWithoutAccess

public List<AgentFacade> getAgentsWithoutAccess(Long questionPoolId,
                                                String realmId)


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