org.sakaiproject.tool.assessment.facade
Interface QuestionPoolFacadeQueriesAPI

All Known Implementing Classes:
QuestionPoolFacadeQueries

public interface QuestionPoolFacadeQueriesAPI


Method Summary
 Long add()
           
 void addItemsToSection(Collection ids, long sectionId)
          DOCUMENTATION PENDING
 void addItemToPool(QuestionPoolItemData qpi)
          add 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 pool to a new location.
 void deletePool(Long poolId, String agent, Tree tree)
          Delete pool and questions attached to it plus any subpool under it
 List<AgentFacade> getAgentsWithAccess(Long questionPoolId)
           
 List getAllItemFacades(Long questionPoolId)
           
 List getAllItemFacadesOrderByItemText(Long questionPoolId, String orderBy, String ascending)
           
 List getAllItemFacadesOrderByItemType(Long questionPoolId, String orderBy, String ascending)
           
 List getAllItems(Long questionPoolId)
           
 List getAllPools()
          Get a list of all the pools in the site.
 QuestionPoolIteratorFacade getAllPools(String agentId)
          Get all the pools that the agent has access to.
 QuestionPoolIteratorFacade getAllPoolsWithAccess(String agentId)
           
 ArrayList getBasicInfoOfAllPools(String agentId)
           
 Integer getCountItemFacades(Long questionPoolId)
           
 ItemFacade getItem(String id)
          This method returns an ItemFacade that we can use to construct our ItemImpl
 QuestionPoolFacade getPool(Long poolId, String agent)
          Get a pool based on poolId.
 QuestionPoolFacade getPoolById(Long questionPoolId)
           
 List getPoolIdsByAgent(String agentId)
          Return a list of questionPoolId (java.lang.Long)
 List getPoolIdsByItem(String itemId)
          Return a list of questionPoolId (java.lang.Long)
 QuestionPoolAccessData getQuestionPoolAccessData(Long poolId, String agentId)
           
 IdImpl getQuestionPoolId(long id)
           
 IdImpl getQuestionPoolId(Long id)
           
 IdImpl getQuestionPoolId(String id)
           
 HashMap getQuestionPoolItemMap()
           
 List getSubPools(Long poolId)
          Get all the children pools of a pool.
 int getSubPoolSize(Long poolId)
           
 boolean hasSubPools(Long poolId)
          DOCUMENTATION PENDING
 boolean isDescendantOf(QuestionPoolFacade destPool, QuestionPoolFacade sourcePool)
          Is destination a descendant of the source?
 void moveItemToPool(String itemId, Long sourceId, Long destId)
          DOCUMENTATION PENDING
 void movePool(String agentId, Long sourcePoolId, Long destPoolId)
          Move pool under another pool.
 boolean poolIsUnique(Long questionPoolId, String title, Long parentPoolId, String agentId)
           
 void removeItemFromPool(String itemId, Long poolId)
          DOCUMENTATION PENDING
 void removeQuestionPoolAccess(Tree tree, String user, Long questionPoolId, Long accessTypeId)
           
 QuestionPoolFacade savePool(QuestionPoolFacade pool)
          DOCUMENTATION PENDING
 void setPoolAccessType(QuestionPoolData qpp, String agentId)
           
 

Method Detail

getQuestionPoolId

IdImpl getQuestionPoolId(String id)

getQuestionPoolId

IdImpl getQuestionPoolId(Long id)

getQuestionPoolId

IdImpl getQuestionPoolId(long id)

getAllPools

List getAllPools()
Get a list of all the pools in the site. Note that questions in each pool will not be populated. We must keep this list updated.


getAllPools

QuestionPoolIteratorFacade getAllPools(String agentId)
Get all the pools that the agent has access to. The easiest way seems to be #1. get all the existing pool #2. get all the QuestionPoolAccessData record of the agent #3. go through the existing pools and check it against the QuestionPoolAccessData (qpa) record to see if the agent is granted access to it. qpa record (if exists) always trumps the default access right set up for a pool e.g. if the defaultAccessType for a pool is ACCESS_DENIED but the qpa record say ADMIN, then access=ADMIN e.g. if the defaultAccessType for a pool is ADMIN but the qpa record say ACCESS_DENIED, then access=ACCESS_DENIED e.g. if no qpa record exists, then access rule will follow the defaultAccessType set by the pool


getAllPoolsWithAccess

QuestionPoolIteratorFacade getAllPoolsWithAccess(String agentId)

getBasicInfoOfAllPools

ArrayList getBasicInfoOfAllPools(String agentId)

poolIsUnique

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

getAllItems

List getAllItems(Long questionPoolId)

getAllItemFacadesOrderByItemText

List getAllItemFacadesOrderByItemText(Long questionPoolId,
                                      String orderBy,
                                      String ascending)

getAllItemFacadesOrderByItemType

List getAllItemFacadesOrderByItemType(Long questionPoolId,
                                      String orderBy,
                                      String ascending)

getAllItemFacades

List getAllItemFacades(Long questionPoolId)

getItem

ItemFacade getItem(String id)
This method returns an ItemFacade that we can use to construct our ItemImpl


getPool

QuestionPoolFacade getPool(Long poolId,
                           String agent)
Get a pool based on poolId. I am not sure why agent is not used though is being parsed.

Parameters:
poolid - DOCUMENTATION PENDING
agent - DOCUMENTATION PENDING
Returns:
DOCUMENTATION PENDING

setPoolAccessType

void setPoolAccessType(QuestionPoolData qpp,
                       String agentId)

getQuestionPoolAccessData

QuestionPoolAccessData getQuestionPoolAccessData(Long poolId,
                                                 String agentId)

addItemsToSection

void addItemsToSection(Collection ids,
                       long sectionId)
DOCUMENTATION PENDING

Parameters:
ids - DOCUMENTATION PENDING
sectionId - DOCUMENTATION PENDING

addItemToPool

void addItemToPool(QuestionPoolItemData qpi)
add a question to a pool

Parameters:
itemId - DOCUMENTATION PENDING
poolId - DOCUMENTATION PENDING

deletePool

void deletePool(Long poolId,
                String agent,
                Tree tree)
Delete pool and questions attached to it plus any subpool under it

Parameters:
itemId - DOCUMENTATION PENDING
poolId - DOCUMENTATION PENDING

movePool

void movePool(String agentId,
              Long sourcePoolId,
              Long destPoolId)
Move pool under another pool. The dest pool must not be the descendant of the source nor can they be the same pool .


isDescendantOf

boolean isDescendantOf(QuestionPoolFacade destPool,
                       QuestionPoolFacade sourcePool)
Is destination a descendant of the source?


removeItemFromPool

void removeItemFromPool(String itemId,
                        Long poolId)
DOCUMENTATION PENDING

Parameters:
itemId - DOCUMENTATION PENDING
poolId - DOCUMENTATION PENDING

moveItemToPool

void moveItemToPool(String itemId,
                    Long sourceId,
                    Long destId)
DOCUMENTATION PENDING

Parameters:
itemId - DOCUMENTATION PENDING
poolId - DOCUMENTATION PENDING

savePool

QuestionPoolFacade savePool(QuestionPoolFacade pool)
DOCUMENTATION PENDING

Parameters:
pool - DOCUMENTATION PENDING

getSubPools

List getSubPools(Long poolId)
Get all the children pools of a pool. Return a list of QuestionPoolData should return QuestionPool instead - need fixing, daisyf

Parameters:
itemId - DOCUMENTATION PENDING
poolId - DOCUMENTATION PENDING

getSubPoolSize

int getSubPoolSize(Long poolId)

hasSubPools

boolean hasSubPools(Long poolId)
DOCUMENTATION PENDING

Parameters:
itemId - DOCUMENTATION PENDING
poolId - DOCUMENTATION PENDING

getPoolIdsByAgent

List getPoolIdsByAgent(String agentId)
Return a list of questionPoolId (java.lang.Long)

Parameters:
itemId - DOCUMENTATION PENDING
poolId - DOCUMENTATION PENDING

getPoolIdsByItem

List getPoolIdsByItem(String itemId)
Return a list of questionPoolId (java.lang.Long)

Parameters:
itemId - DOCUMENTATION PENDING
poolId - DOCUMENTATION PENDING

copyPool

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


add

Long add()

getPoolById

QuestionPoolFacade getPoolById(Long questionPoolId)

getQuestionPoolItemMap

HashMap getQuestionPoolItemMap()

copyItemFacade

Long copyItemFacade(ItemDataIfc itemData)

copyItemFacade2

ItemFacade copyItemFacade2(ItemDataIfc itemData)

getCountItemFacades

Integer getCountItemFacades(Long questionPoolId)

addQuestionPoolAccess

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


removeQuestionPoolAccess

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

getAgentsWithAccess

List<AgentFacade> getAgentsWithAccess(Long questionPoolId)


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