org.sakaiproject.component.legacy.assignment
Class BaseAssignmentService.BaseAssignmentSubmissionEdit

java.lang.Object
  extended byorg.sakaiproject.component.legacy.assignment.BaseAssignmentService.BaseAssignmentSubmission
      extended byorg.sakaiproject.component.legacy.assignment.BaseAssignmentService.BaseAssignmentSubmissionEdit
All Implemented Interfaces:
AssignmentSubmission, AssignmentSubmissionEdit, Edit, Entity, EventListener, SessionBindingListener
Enclosing class:
BaseAssignmentService

public class BaseAssignmentService.BaseAssignmentSubmissionEdit
extends BaseAssignmentService.BaseAssignmentSubmission
implements AssignmentSubmissionEdit, SessionBindingListener

BaseAssignmentSubmissionEdit is an implementation of the CHEF AssignmentSubmissionEdit object.

Author:
University of Michigan, CHEF Software Development Team

Field Summary
protected  boolean m_active
          Active flag.
protected  String m_event
          The event code for this edit.
 
Fields inherited from class org.sakaiproject.component.legacy.assignment.BaseAssignmentService.BaseAssignmentSubmission
m_assignment, m_context, m_feedbackAttachments, m_feedbackComment, m_feedbackText, m_grade, m_graded, m_gradeReleased, m_honorPledgeFlag, m_id, m_properties, m_returned, m_submitted, m_submittedAttachments, m_submittedText, m_submitters, m_timeLastModified, m_timeReturned, m_timeSubmitted, STATUS_DRAFT, STATUS_GRADED, STATUS_RETURNED, STATUS_SUBMITTED
 
Fields inherited from interface org.sakaiproject.service.legacy.entity.Entity
SEPARATOR
 
Constructor Summary
BaseAssignmentService.BaseAssignmentSubmissionEdit(AssignmentSubmission assignmentSubmission)
          Construct from another AssignmentSubmission object.
BaseAssignmentService.BaseAssignmentSubmissionEdit(Element el)
          Construct from information in XML.
BaseAssignmentService.BaseAssignmentSubmissionEdit(String id, String context, String assignmentId)
          Construct.
 
Method Summary
protected  void activate()
          Enable editing.
 void addFeedbackAttachment(Reference attachment)
          Add an attachment to the list of feedback attachments.
 void addSubmittedAttachment(Reference attachment)
          Add an attachment to the list of submitted attachments.
 void addSubmitter(User submitter)
          Add a User to the submitters list.
 void clearFeedbackAttachments()
          Remove all feedback attachments.
 void clearSubmittedAttachments()
          Remove all submitted attachments.
 void clearSubmitters()
          Remove all user from the submitter list
protected  void closeEdit()
          Close the edit object - it cannot be used after this.
protected  void finalize()
          Clean up.
protected  String getEvent()
          Access the event code for this edit.
 ResourcePropertiesEdit getPropertiesEdit()
          Access the resource's properties for modification
 boolean isActiveEdit()
          Check to see if the edit is still active, or has already been closed.
 void removeFeedbackAttachment(Reference attachment)
          Remove an attachment from the list of feedback attachments.
 void removeSubmittedAttachment(Reference attachment)
          Remove an attachment from the list of submitted attachments
 void removeSubmitter(User submitter)
          Remove an User from the submitter list
protected  void set(AssignmentSubmission assignmentSubmission)
          Take all values from this object.
 void setAssignment(Assignment assignment)
          Set the Assignment for this Submission
 void setContext(String context)
          Set the context at the time of creation.
protected  void setEvent(String event)
          Set the event code for this edit.
 void setFeedbackComment(String value)
          Set the general comments by the grader.
 void setFeedbackText(String value)
          Set the text part of the instructors feedback; usually an annotated copy of the submittedText
 void setGrade(String grade)
          Sets the grade for the Submisssion.
 void setGraded(boolean value)
          Set whether this Submission has been graded.
 void setGradeReleased(boolean released)
          Set whether the grade has been released.
 void setHonorPledgeFlag(boolean honorPledgeFlag)
          Set the checked status of the honor pledge flag.
 void setReturned(boolean value)
          Set whether this Submission was rejected by the grader.
 void setSubmitted(boolean submitted)
          Set whether this is a final submission.
 void setSubmittedText(String value)
          Text submitted in response to the Assignment.
 void setTimeLastModified(Time lastmod)
          Set the time last modified.
 void setTimeReturned(Time timeReturned)
          Set the time at which the graded Submission was returned; setting it to null means it is not yet graded.
 void setTimeSubmitted(Time value)
          Set the time at which this response was submitted; setting it to null signifies the response is unsubmitted.
 void valueBound(SessionBindingEvent event)
          SessionBindingListener implementation
 void valueUnbound(SessionBindingEvent event)
          Notifies the object that it is being unbound from a session.
 
Methods inherited from class org.sakaiproject.component.legacy.assignment.BaseAssignmentService.BaseAssignmentSubmission
compareTo, equals, getAssignment, getAssignmentId, getContext, getFeedbackAttachments, getFeedbackComment, getFeedbackText, getGrade, getGraded, getGradeDisplay, getGradeReleased, getHonorPledgeFlag, getId, getProperties, getReference, getReference, getReturned, getStatus, getSubmitted, getSubmittedAttachments, getSubmittedText, getSubmitterIds, getSubmitters, getTimeLastModified, getTimeReturned, getTimeSubmitted, getUrl, getUrl, hashCode, setAll, toXml
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.service.legacy.assignment.AssignmentSubmission
getAssignment, getAssignmentId, getContext, getFeedbackAttachments, getFeedbackComment, getFeedbackText, getGrade, getGraded, getGradeDisplay, getGradeReleased, getHonorPledgeFlag, getReturned, getStatus, getSubmitted, getSubmittedAttachments, getSubmittedText, getSubmitterIds, getSubmitters, getTimeLastModified, getTimeReturned, getTimeSubmitted
 
Methods inherited from interface org.sakaiproject.service.legacy.entity.Entity
getId, getProperties, getReference, getReference, getUrl, getUrl, toXml
 

Field Detail

m_event

protected String m_event
The event code for this edit.


m_active

protected boolean m_active
Active flag.

Constructor Detail

BaseAssignmentService.BaseAssignmentSubmissionEdit

public BaseAssignmentService.BaseAssignmentSubmissionEdit(AssignmentSubmission assignmentSubmission)
Construct from another AssignmentSubmission object.


BaseAssignmentService.BaseAssignmentSubmissionEdit

public BaseAssignmentService.BaseAssignmentSubmissionEdit(String id,
                                                          String context,
                                                          String assignmentId)
Construct.

Parameters:
id - The AssignmentSubmission id.

BaseAssignmentService.BaseAssignmentSubmissionEdit

public BaseAssignmentService.BaseAssignmentSubmissionEdit(Element el)
Construct from information in XML.

Parameters:
el - The XML DOM Element definining the AssignmentSubmission.
Method Detail

finalize

protected void finalize()
Clean up.


setContext

public void setContext(String context)
Set the context at the time of creation.

Specified by:
setContext in interface AssignmentSubmissionEdit
Parameters:
context - - the context string.

setAssignment

public void setAssignment(Assignment assignment)
Set the Assignment for this Submission

Specified by:
setAssignment in interface AssignmentSubmissionEdit
Parameters:
assignment - - the Assignment

setSubmitted

public void setSubmitted(boolean submitted)
Set whether this is a final submission.

Specified by:
setSubmitted in interface AssignmentSubmissionEdit
Parameters:
submitted - - True if a final submission, false if still a draft.

addSubmitter

public void addSubmitter(User submitter)
Add a User to the submitters list.

Specified by:
addSubmitter in interface AssignmentSubmissionEdit
Parameters:
submitter - - the User to add.

removeSubmitter

public void removeSubmitter(User submitter)
Remove an User from the submitter list

Specified by:
removeSubmitter in interface AssignmentSubmissionEdit
Parameters:
submitter - - the User to remove.

clearSubmitters

public void clearSubmitters()
Remove all user from the submitter list

Specified by:
clearSubmitters in interface AssignmentSubmissionEdit

setTimeSubmitted

public void setTimeSubmitted(Time value)
Set the time at which this response was submitted; setting it to null signifies the response is unsubmitted.

Specified by:
setTimeSubmitted in interface AssignmentSubmissionEdit
Parameters:
value - - Time of submission.

setGradeReleased

public void setGradeReleased(boolean released)
Set whether the grade has been released.

Specified by:
setGradeReleased in interface AssignmentSubmissionEdit
Parameters:
released - - True if the Submissions's grade has been released, false otherwise.

setGrade

public void setGrade(String grade)
Sets the grade for the Submisssion.

Specified by:
setGrade in interface AssignmentSubmissionEdit
Parameters:
grade - - The Submission's grade.

setSubmittedText

public void setSubmittedText(String value)
Text submitted in response to the Assignment.

Specified by:
setSubmittedText in interface AssignmentSubmissionEdit
Parameters:
value - - The text of the submission.

addSubmittedAttachment

public void addSubmittedAttachment(Reference attachment)
Add an attachment to the list of submitted attachments.

Specified by:
addSubmittedAttachment in interface AssignmentSubmissionEdit
Parameters:
attachment - - The Reference object pointing to the attachment.

removeSubmittedAttachment

public void removeSubmittedAttachment(Reference attachment)
Remove an attachment from the list of submitted attachments

Specified by:
removeSubmittedAttachment in interface AssignmentSubmissionEdit
Parameters:
attachment - - The Reference object pointing to the attachment.

clearSubmittedAttachments

public void clearSubmittedAttachments()
Remove all submitted attachments.

Specified by:
clearSubmittedAttachments in interface AssignmentSubmissionEdit

setFeedbackComment

public void setFeedbackComment(String value)
Set the general comments by the grader.

Specified by:
setFeedbackComment in interface AssignmentSubmissionEdit
Parameters:
value - - the text of the grader's comments; may be null.

setFeedbackText

public void setFeedbackText(String value)
Set the text part of the instructors feedback; usually an annotated copy of the submittedText

Specified by:
setFeedbackText in interface AssignmentSubmissionEdit
Parameters:
value - - The text of the grader's feedback.

addFeedbackAttachment

public void addFeedbackAttachment(Reference attachment)
Add an attachment to the list of feedback attachments.

Specified by:
addFeedbackAttachment in interface AssignmentSubmissionEdit
Parameters:
attachment - - The Resource object pointing to the attachment.

removeFeedbackAttachment

public void removeFeedbackAttachment(Reference attachment)
Remove an attachment from the list of feedback attachments.

Specified by:
removeFeedbackAttachment in interface AssignmentSubmissionEdit
Parameters:
attachment - - The Resource pointing to the attachment to remove.

clearFeedbackAttachments

public void clearFeedbackAttachments()
Remove all feedback attachments.

Specified by:
clearFeedbackAttachments in interface AssignmentSubmissionEdit

setReturned

public void setReturned(boolean value)
Set whether this Submission was rejected by the grader.

Specified by:
setReturned in interface AssignmentSubmissionEdit
Parameters:
value - - true if this response was rejected by the grader, false otherwise.

setGraded

public void setGraded(boolean value)
Set whether this Submission has been graded.

Specified by:
setGraded in interface AssignmentSubmissionEdit
Parameters:
value - - true if the submission has been graded, false otherwise.

setTimeReturned

public void setTimeReturned(Time timeReturned)
Set the time at which the graded Submission was returned; setting it to null means it is not yet graded.

Specified by:
setTimeReturned in interface AssignmentSubmissionEdit
Parameters:
timeReturned - - The time at which the graded Submission was returned.

setHonorPledgeFlag

public void setHonorPledgeFlag(boolean honorPledgeFlag)
Set the checked status of the honor pledge flag.

Specified by:
setHonorPledgeFlag in interface AssignmentSubmissionEdit
Parameters:
honorPledgeFlag - - True if the honor pledge is checked, false otherwise.

setTimeLastModified

public void setTimeLastModified(Time lastmod)
Set the time last modified.

Specified by:
setTimeLastModified in interface AssignmentSubmissionEdit
Parameters:
lastmod - - The Time at which the Assignment was last modified.

set

protected void set(AssignmentSubmission assignmentSubmission)
Take all values from this object.


getEvent

protected String getEvent()
Access the event code for this edit.

Returns:
The event code for this edit.

setEvent

protected void setEvent(String event)
Set the event code for this edit.

Parameters:
event - The event code for this edit.

getPropertiesEdit

public ResourcePropertiesEdit getPropertiesEdit()
Access the resource's properties for modification

Specified by:
getPropertiesEdit in interface Edit
Returns:
The resource's properties.

activate

protected void activate()
Enable editing.


isActiveEdit

public boolean isActiveEdit()
Check to see if the edit is still active, or has already been closed.

Specified by:
isActiveEdit in interface Edit
Returns:
true if the edit is active, false if it's been closed.

closeEdit

protected void closeEdit()
Close the edit object - it cannot be used after this.


valueBound

public void valueBound(SessionBindingEvent event)
SessionBindingListener implementation

Specified by:
valueBound in interface SessionBindingListener
Parameters:
event - the event that identifies the session

valueUnbound

public void valueUnbound(SessionBindingEvent event)
Description copied from interface: SessionBindingListener
Notifies the object that it is being unbound from a session.

Specified by:
valueUnbound in interface SessionBindingListener
Parameters:
event - the event that identifies the session