org.sakaiproject.tool.gradebook
Class GradebookArchive

java.lang.Object
  extended byorg.sakaiproject.tool.gradebook.GradebookArchive

public class GradebookArchive
extends Object

Models a gradebook and all of its dependent objects, which can all be serialized as xml for archiving.

Author:
Josh Holtzman

Constructor Summary
GradebookArchive()
           
GradebookArchive(Gradebook gradebook, GradeMapping selectedGradeMapping, Collection gradeMappings, CourseGrade courseGrade, Collection assignments)
           
 
Method Summary
 String archive()
          Serializes this gradebook archive into an xml document
 Collection getAssignments()
           
 CourseGrade getCourseGrade()
           
 Gradebook getGradebook()
           
 Collection getGradeMappings()
           
 GradeMapping getSelectedGradeMapping()
           
 void readArchive(String xml)
          Read a gradebook archive from an xml input stream.
 void setAssignments(Collection assignments)
           
 void setCourseGrade(CourseGrade courseGrade)
           
 void setGradebook(Gradebook gradebook)
           
 void setGradeMappings(Collection gradeMappings)
           
 void setSelectedGradeMapping(GradeMapping selectedGradeMapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GradebookArchive

public GradebookArchive()

GradebookArchive

public GradebookArchive(Gradebook gradebook,
                        GradeMapping selectedGradeMapping,
                        Collection gradeMappings,
                        CourseGrade courseGrade,
                        Collection assignments)
Parameters:
gradebook -
selectedGradeMapping -
gradeMappings -
courseGrade -
assignments -
Method Detail

archive

public String archive()
Serializes this gradebook archive into an xml document


readArchive

public void readArchive(String xml)
Read a gradebook archive from an xml input stream.

Parameters:
xml - The input stream containing the serialized gradebook archive
Returns:
A gradebook archive object modeling the data in the xml stream

getAssignments

public Collection getAssignments()

setAssignments

public void setAssignments(Collection assignments)

getCourseGrade

public CourseGrade getCourseGrade()

setCourseGrade

public void setCourseGrade(CourseGrade courseGrade)

getGradebook

public Gradebook getGradebook()

setGradebook

public void setGradebook(Gradebook gradebook)

getGradeMappings

public Collection getGradeMappings()

setGradeMappings

public void setGradeMappings(Collection gradeMappings)

getSelectedGradeMapping

public GradeMapping getSelectedGradeMapping()

setSelectedGradeMapping

public void setSelectedGradeMapping(GradeMapping selectedGradeMapping)