org.sakaiproject.tool.assessment.services.assessment
Class AssessmentService

java.lang.Object
  extended byorg.sakaiproject.tool.assessment.services.assessment.AssessmentService

public class AssessmentService
extends Object

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

Author:
Rachel Gollub

Constructor Summary
AssessmentService()
          Creates a new QuestionPoolService object.
 
Method Summary
 SectionFacade addSection(String assessmentId)
          public int checkDelete(long assessmentId){ return assessmentService.checkDelete(assessmentId); } public void deleteAssessment(Id assessmentId) throws osid.assessment.AssessmentException { assessmentService.deleteAssessment(assessmentId); } public AssessmentIterator getAssessments() throws osid.assessment.AssessmentException { return assessmentService.getAssessments(); }
 boolean assessmentTitleIsUnique(String assessmentBaseId, String title, boolean isTemplate)
           
 AssessmentFacade createAssessment(String title, String description, String typeId, String templateId)
           
 AssessmentFacade createAssessmentWithoutDefaultSection(String title, String description, String typeId, String templateId)
           
 void deleteAssessmentTemplate(Long assessmentId)
           
 ArrayList getAllActiveAssessments(String orderBy)
           
 ArrayList getAllActiveAssessmentTemplates()
           
 ArrayList getAllAssessments(int pageSize, int pageNumber, String orderBy)
           
 ArrayList getAllAssessments(String orderBy)
           
 ArrayList getAllAssessmentTemplates()
           
 AssessmentFacade getAssessment(String assessmentId)
           
 List getAssessmentByTemplate(String templateId)
           
 AssessmentTemplateFacade getAssessmentTemplate(String assessmentTemplateId)
           
 ArrayList getBasicInfoOfAllActiveAssessments(String orderBy)
           
 ArrayList getBasicInfoOfAllActiveAssessments(String orderBy, boolean ascending)
           
 ArrayList getBasicInfoOfAllActiveAssessmentTemplates(String orderBy)
           
 AssessmentFacade getBasicInfoOfAnAssessment(String assessmentId)
           
 List getDefaultMetaDataSet()
           
 int getQuestionSize(String assessmentId)
           
 SectionFacade getSection(String sectionId)
           
 ArrayList getSettingsOfAllActiveAssessments(String orderBy)
           
 ArrayList getTitleOfAllActiveAssessmentTemplates()
           
 void moveAllItems(String sourceSectionId, String destSectionId)
           
 void removeAllItems(String sourceSectionId)
           
 void removeAssessment(String assessmentId)
           
 void removeSection(String sectionId)
           
 void save(AssessmentTemplateData template)
           
 void saveAssessment(AssessmentFacade assessment)
           
 void saveOrUpdateSection(SectionFacade section)
           
 void update(AssessmentFacade assessment)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AssessmentService

public AssessmentService()
Creates a new QuestionPoolService object.

Method Detail

getAssessmentTemplate

public AssessmentTemplateFacade getAssessmentTemplate(String assessmentTemplateId)

getAssessment

public AssessmentFacade getAssessment(String assessmentId)

getBasicInfoOfAnAssessment

public AssessmentFacade getBasicInfoOfAnAssessment(String assessmentId)

getAllAssessmentTemplates

public ArrayList getAllAssessmentTemplates()

getAllActiveAssessmentTemplates

public ArrayList getAllActiveAssessmentTemplates()

getTitleOfAllActiveAssessmentTemplates

public ArrayList getTitleOfAllActiveAssessmentTemplates()

getAllAssessments

public ArrayList getAllAssessments(String orderBy)

getAllActiveAssessments

public ArrayList getAllActiveAssessments(String orderBy)

getSettingsOfAllActiveAssessments

public ArrayList getSettingsOfAllActiveAssessments(String orderBy)
Parameters:
orderBy -
Returns:
an ArrayList of AssessmentFacade. It is IMPORTANT to note that the object is a partial object which contains no SectionFacade

getBasicInfoOfAllActiveAssessments

public ArrayList getBasicInfoOfAllActiveAssessments(String orderBy,
                                                    boolean ascending)
Parameters:
orderBy -
Returns:
an ArrayList of AssessmentFacade. It is IMPORTANT to note that the object is a partial object which contains only Assessment basic info such as title, lastModifiedDate. This method is used by Authoring Front Door

getBasicInfoOfAllActiveAssessments

public ArrayList getBasicInfoOfAllActiveAssessments(String orderBy)

getAllAssessments

public ArrayList getAllAssessments(int pageSize,
                                   int pageNumber,
                                   String orderBy)

createAssessment

public AssessmentFacade createAssessment(String title,
                                         String description,
                                         String typeId,
                                         String templateId)
                                  throws Exception
Throws:
Exception

getQuestionSize

public int getQuestionSize(String assessmentId)

update

public void update(AssessmentFacade assessment)

save

public void save(AssessmentTemplateData template)

saveAssessment

public void saveAssessment(AssessmentFacade assessment)

deleteAssessmentTemplate

public void deleteAssessmentTemplate(Long assessmentId)

removeAssessment

public void removeAssessment(String assessmentId)

addSection

public SectionFacade addSection(String assessmentId)
public int checkDelete(long assessmentId){ return assessmentService.checkDelete(assessmentId); } public void deleteAssessment(Id assessmentId) throws osid.assessment.AssessmentException { assessmentService.deleteAssessment(assessmentId); } public AssessmentIterator getAssessments() throws osid.assessment.AssessmentException { return assessmentService.getAssessments(); }


removeSection

public void removeSection(String sectionId)

getSection

public SectionFacade getSection(String sectionId)

saveOrUpdateSection

public void saveOrUpdateSection(SectionFacade section)

moveAllItems

public void moveAllItems(String sourceSectionId,
                         String destSectionId)

removeAllItems

public void removeAllItems(String sourceSectionId)

getBasicInfoOfAllActiveAssessmentTemplates

public ArrayList getBasicInfoOfAllActiveAssessmentTemplates(String orderBy)

createAssessmentWithoutDefaultSection

public AssessmentFacade createAssessmentWithoutDefaultSection(String title,
                                                              String description,
                                                              String typeId,
                                                              String templateId)
                                                       throws Exception
Throws:
Exception

assessmentTitleIsUnique

public boolean assessmentTitleIsUnique(String assessmentBaseId,
                                       String title,
                                       boolean isTemplate)

getAssessmentByTemplate

public List getAssessmentByTemplate(String templateId)

getDefaultMetaDataSet

public List getDefaultMetaDataSet()