org.sakaiproject.tool.assessment.facade
Class QuestionPoolFacade

java.lang.Object
  extended byorg.sakaiproject.tool.assessment.facade.QuestionPoolFacade
All Implemented Interfaces:
QuestionPoolDataIfc, Serializable

public class QuestionPoolFacade
extends Object
implements QuestionPoolDataIfc

Author:
Ed Smiley
See Also:
Serialized Form

Field Summary
static Long ACCESS_DENIED
           
static Long ADMIN
           
static Long DEFAULT_INTELLECTUAL_PROPERTYID
           
static Long DEFAULT_TYPEID
           
static Long READ_COPY
           
static Long READ_ONLY
           
static Long READ_WRITE
           
static Long ROOT_POOL
           
 
Constructor Summary
QuestionPoolFacade()
          Creates a new QuestionPoolFacade object.
QuestionPoolFacade(org.osid.shared.Id id, org.osid.shared.Id parentId)
          Constructor.
QuestionPoolFacade(Long id, Long parentId)
          Constructor.
QuestionPoolFacade(Long id, String title)
          IMPORTANT: this constructor do not have "data", this constructor is merely used for holding questionPoolId, Title for displaying purpose (used by the pulldown list in authoring).
QuestionPoolFacade(Long id, String title, Long parentId)
          IMPORTANT: this constructor do not have "data", this constructor is merely used for holding questionPoolId, Title, parentId for validation question pool This constructor does not persist data (which it has none) to DB
QuestionPoolFacade(QuestionPoolDataIfc data)
           
 
Method Summary
 void addQuestionPoolItem(QuestionPoolItemIfc queestionPoolItem)
           
 TypeIfc getAccessType()
           
 Long getAccessTypeId()
           
 QuestionPoolDataIfc getData()
          Get the data for this QuestionPoolFacade.
 Date getDateCreated()
           
 String getDescription()
           
 String getDisplayName()
           
 Long getIntellectualPropertyId()
           
 String getKeywords()
           
 Date getLastModified()
           
 AgentDataIfc getLastModifiedBy()
           
 String getLastModifiedById()
           
 String getObjectives()
           
 String getOrganizationName()
           
 AgentDataIfc getOwner()
           
 String getOwnerId()
           
 org.osid.shared.Id getParentId()
           
 QuestionPoolFacade getParentPool()
           
 Long getParentPoolId()
           
 Long getQuestionPoolId()
           
 Set getQuestionPoolItems()
          This is a list of association between an item (question) and a pool.
 TypeIfc getQuestionPoolType()
           
 Collection getQuestions()
           
 Integer getQuestionSize()
           
 String getRubric()
           
 Integer getSubPoolSize()
           
 String getTitle()
           
 TypeIfc getType()
           
 Long getTypeId()
           
 void setAccessType(TypeIfc accessType)
           
 void setAccessTypeId(Long accessTypeId)
           
 void setData(QuestionPoolDataIfc data)
          Set data for ItemFacade
 void setDateCreated(Date dateCreated)
           
 void setDescription(String description)
           
 void setIntellectualPropertyId(Long intellectualPropertyId)
           
 void setKeywords(String keywords)
           
 void setLastModified(Date lastModified)
           
 void setLastModifiedBy(AgentDataIfc lastModifiedBy)
           
 void setLastModifiedById(String lastModifiedById)
           
 void setObjectives(String objectives)
           
 void setOrganizationName(String organizationName)
           
 void setOwner(AgentDataIfc owner)
           
 void setOwnerId(String ownerId)
           
 void setParentId(org.osid.shared.Id parentId)
          Sets the parent id object for the question pool
 void setParentPoolId(Long parentPoolId)
           
 void setQuestionPoolId(Long questionPoolId)
          Set itemId for ItemFacade
 void setQuestionPoolItems(Set questionPoolItems)
           
 void setQuestions(Collection items)
           
 void setRubric(String rubric)
           
 void setSubPoolSize(Integer subPoolSize)
           
 void setTitle(String title)
           
 void setType(TypeIfc type)
           
 void setTypeId(Long typeId)
           
 void updateData(QuestionPoolDataIfc data)
          Call setDate() to update data in ItemFacade
 void updateDescription(String description)
           
 void updateDisplayName(String displayName)
           
 void updateQuestionPoolType(TypeIfc questionPoolType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACCESS_DENIED

public static Long ACCESS_DENIED

READ_ONLY

public static Long READ_ONLY

READ_COPY

public static Long READ_COPY

READ_WRITE

public static Long READ_WRITE

ADMIN

public static Long ADMIN

DEFAULT_TYPEID

public static Long DEFAULT_TYPEID

DEFAULT_INTELLECTUAL_PROPERTYID

public static Long DEFAULT_INTELLECTUAL_PROPERTYID

ROOT_POOL

public static Long ROOT_POOL
Constructor Detail

QuestionPoolFacade

public QuestionPoolFacade()
Creates a new QuestionPoolFacade object.


QuestionPoolFacade

public QuestionPoolFacade(org.osid.shared.Id id,
                          org.osid.shared.Id parentId)
Constructor. Each question pool has a unique Id object and owns the Id of its parent. See getId(), getParentId()


QuestionPoolFacade

public QuestionPoolFacade(Long id,
                          Long parentId)
Constructor. Each question pool has a unique Id object and owns the Id of its parent. See getId(), getParentId()


QuestionPoolFacade

public QuestionPoolFacade(QuestionPoolDataIfc data)

QuestionPoolFacade

public QuestionPoolFacade(Long id,
                          String title)
IMPORTANT: this constructor do not have "data", this constructor is merely used for holding questionPoolId, Title for displaying purpose (used by the pulldown list in authoring). This constructor does not persist data (which it has none) to DB

Parameters:
id -
title -

QuestionPoolFacade

public QuestionPoolFacade(Long id,
                          String title,
                          Long parentId)
IMPORTANT: this constructor do not have "data", this constructor is merely used for holding questionPoolId, Title, parentId for validation question pool This constructor does not persist data (which it has none) to DB

Parameters:
id -
title -
Method Detail

getDisplayName

public String getDisplayName()
                      throws DataFacadeException
Returns:
the display name for the question pool
Throws:
DataFacadeException

updateDisplayName

public void updateDisplayName(String displayName)
                       throws DataFacadeException
Throws:
DataFacadeException

getDescription

public String getDescription()
Specified by:
getDescription in interface QuestionPoolDataIfc

updateDescription

public void updateDescription(String description)
                       throws DataFacadeException
Throws:
DataFacadeException

setDescription

public void setDescription(String description)
Specified by:
setDescription in interface QuestionPoolDataIfc

getData

public QuestionPoolDataIfc getData()
Get the data for this QuestionPoolFacade.

Returns:
QuestionPoolDataIfc

updateData

public void updateData(QuestionPoolDataIfc data)
Call setDate() to update data in ItemFacade

Parameters:
data -

setData

public void setData(QuestionPoolDataIfc data)
Set data for ItemFacade

Parameters:
data -

getQuestionPoolType

public TypeIfc getQuestionPoolType()
                            throws DataFacadeException
Returns:
the type of pool for the question pool
Throws:
DataFacadeException

updateQuestionPoolType

public void updateQuestionPoolType(TypeIfc questionPoolType)
                            throws DataFacadeException
Throws:
DataFacadeException

getParentId

public org.osid.shared.Id getParentId()
                               throws DataFacadeException
Returns:
the id object for the question pool
Throws:
QuestionPoolException
DataFacadeException

setParentId

public void setParentId(org.osid.shared.Id parentId)
                 throws DataFacadeException
Sets the parent id object for the question pool

Throws:
DataFacadeException

getParentPool

public QuestionPoolFacade getParentPool()
                                 throws DataFacadeException
Returns:
the parent pool for the question pool
Throws:
DataFacadeException

getQuestionPoolId

public Long getQuestionPoolId()
                       throws DataFacadeException
Specified by:
getQuestionPoolId in interface QuestionPoolDataIfc
Throws:
DataFacadeException

setQuestionPoolId

public void setQuestionPoolId(Long questionPoolId)
Set itemId for ItemFacade

Specified by:
setQuestionPoolId in interface QuestionPoolDataIfc

getTitle

public String getTitle()
Specified by:
getTitle in interface QuestionPoolDataIfc

setTitle

public void setTitle(String title)
Specified by:
setTitle in interface QuestionPoolDataIfc

getParentPoolId

public Long getParentPoolId()
Specified by:
getParentPoolId in interface QuestionPoolDataIfc

setParentPoolId

public void setParentPoolId(Long parentPoolId)
Specified by:
setParentPoolId in interface QuestionPoolDataIfc

getOwnerId

public String getOwnerId()
Specified by:
getOwnerId in interface QuestionPoolDataIfc

setOwnerId

public void setOwnerId(String ownerId)
Specified by:
setOwnerId in interface QuestionPoolDataIfc

getOwner

public AgentDataIfc getOwner()
Specified by:
getOwner in interface QuestionPoolDataIfc

setOwner

public void setOwner(AgentDataIfc owner)
Specified by:
setOwner in interface QuestionPoolDataIfc

getDateCreated

public Date getDateCreated()
Specified by:
getDateCreated in interface QuestionPoolDataIfc

setDateCreated

public void setDateCreated(Date dateCreated)
Specified by:
setDateCreated in interface QuestionPoolDataIfc

getLastModified

public Date getLastModified()
Specified by:
getLastModified in interface QuestionPoolDataIfc

setLastModified

public void setLastModified(Date lastModified)
Specified by:
setLastModified in interface QuestionPoolDataIfc

getLastModifiedById

public String getLastModifiedById()
Specified by:
getLastModifiedById in interface QuestionPoolDataIfc

setLastModifiedById

public void setLastModifiedById(String lastModifiedById)
Specified by:
setLastModifiedById in interface QuestionPoolDataIfc

getLastModifiedBy

public AgentDataIfc getLastModifiedBy()
Specified by:
getLastModifiedBy in interface QuestionPoolDataIfc

setLastModifiedBy

public void setLastModifiedBy(AgentDataIfc lastModifiedBy)
Specified by:
setLastModifiedBy in interface QuestionPoolDataIfc

getAccessTypeId

public Long getAccessTypeId()
Specified by:
getAccessTypeId in interface QuestionPoolDataIfc

setAccessTypeId

public void setAccessTypeId(Long accessTypeId)
Specified by:
setAccessTypeId in interface QuestionPoolDataIfc

getAccessType

public TypeIfc getAccessType()
Specified by:
getAccessType in interface QuestionPoolDataIfc

setAccessType

public void setAccessType(TypeIfc accessType)
Specified by:
setAccessType in interface QuestionPoolDataIfc

getObjectives

public String getObjectives()
Specified by:
getObjectives in interface QuestionPoolDataIfc

setObjectives

public void setObjectives(String objectives)
Specified by:
setObjectives in interface QuestionPoolDataIfc

getKeywords

public String getKeywords()
Specified by:
getKeywords in interface QuestionPoolDataIfc

setKeywords

public void setKeywords(String keywords)
Specified by:
setKeywords in interface QuestionPoolDataIfc

getRubric

public String getRubric()
Specified by:
getRubric in interface QuestionPoolDataIfc

setRubric

public void setRubric(String rubric)
Specified by:
setRubric in interface QuestionPoolDataIfc

getTypeId

public Long getTypeId()
Specified by:
getTypeId in interface QuestionPoolDataIfc

setTypeId

public void setTypeId(Long typeId)
Specified by:
setTypeId in interface QuestionPoolDataIfc

getType

public TypeIfc getType()
Specified by:
getType in interface QuestionPoolDataIfc

setType

public void setType(TypeIfc type)
Specified by:
setType in interface QuestionPoolDataIfc

getIntellectualPropertyId

public Long getIntellectualPropertyId()
Specified by:
getIntellectualPropertyId in interface QuestionPoolDataIfc

setIntellectualPropertyId

public void setIntellectualPropertyId(Long intellectualPropertyId)
Specified by:
setIntellectualPropertyId in interface QuestionPoolDataIfc

getOrganizationName

public String getOrganizationName()
Specified by:
getOrganizationName in interface QuestionPoolDataIfc

setOrganizationName

public void setOrganizationName(String organizationName)
Specified by:
setOrganizationName in interface QuestionPoolDataIfc

getQuestionPoolItems

public Set getQuestionPoolItems()
This is a list of association between an item (question) and a pool. This does not represent a list of items. use getQuestions() to get a list of items

Specified by:
getQuestionPoolItems in interface QuestionPoolDataIfc

setQuestionPoolItems

public void setQuestionPoolItems(Set questionPoolItems)
Specified by:
setQuestionPoolItems in interface QuestionPoolDataIfc

addQuestionPoolItem

public void addQuestionPoolItem(QuestionPoolItemIfc queestionPoolItem)
Specified by:
addQuestionPoolItem in interface QuestionPoolDataIfc

getQuestions

public Collection getQuestions()
Specified by:
getQuestions in interface QuestionPoolDataIfc

setQuestions

public void setQuestions(Collection items)
Specified by:
setQuestions in interface QuestionPoolDataIfc

getQuestionSize

public Integer getQuestionSize()
Specified by:
getQuestionSize in interface QuestionPoolDataIfc

setSubPoolSize

public void setSubPoolSize(Integer subPoolSize)
Specified by:
setSubPoolSize in interface QuestionPoolDataIfc

getSubPoolSize

public Integer getSubPoolSize()
Specified by:
getSubPoolSize in interface QuestionPoolDataIfc