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

java.lang.Object
  extended byorg.sakaiproject.component.legacy.assignment.BaseAssignmentService.BaseAssignmentContent
      extended byorg.sakaiproject.component.legacy.assignment.BaseAssignmentService.BaseAssignmentContentEdit
All Implemented Interfaces:
AssignmentContent, AssignmentContentEdit, AttachmentContainer, AttachmentContainerEdit, Edit, Entity, EventListener, SessionBindingListener
Enclosing class:
BaseAssignmentService

public class BaseAssignmentService.BaseAssignmentContentEdit
extends BaseAssignmentService.BaseAssignmentContent
implements AttachmentContainer, AssignmentContentEdit, SessionBindingListener

BaseAssignmentContentEdit is an implementation of the CHEF AssignmentContentEdit 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.BaseAssignmentContent
m_allowAttachments, m_attachments, m_authors, m_context, m_groupProject, m_honorPledge, m_id, m_individuallyGraded, m_instructions, m_maxGradePoint, m_properties, m_releaseGrades, m_timeCreated, m_timeLastModified, m_title, m_typeOfGrade, m_typeOfSubmission
 
Fields inherited from interface org.sakaiproject.service.legacy.entity.Entity
SEPARATOR
 
Constructor Summary
BaseAssignmentService.BaseAssignmentContentEdit(AssignmentContent assignmentContent)
          Construct from another AssignmentContent object.
BaseAssignmentService.BaseAssignmentContentEdit(Element el)
          Construct from information in XML.
BaseAssignmentService.BaseAssignmentContentEdit(String id, String context)
          Construct.
 
Method Summary
protected  void activate()
          Enable editing.
 void addAttachment(Reference ref)
          Add an attachment.
 void addAuthor(User author)
          Add an author to the author list.
 void clearAttachments()
          Clear all attachments.
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 removeAttachment(Reference ref)
          Remove an attachment.
 void removeAuthor(User author)
          Remove an author from the author list.
 void replaceAttachments(List attachments)
          Replace the attachment set.
protected  void set(AssignmentContent assignmentContent)
          Take all values from this object.
 void setAllowAttachments(boolean allow)
          Does this Assignment allow attachments?
 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 setGroupProject(boolean groupProject)
          Set whether this project can be a group project.
 void setHonorPledge(int pledgeType)
          Set the Honor Pledge type; values are NONE and ENGINEERING_HONOR_PLEDGE.
 void setIndividuallyGraded(boolean individGraded)
          Set whether group projects should be individually graded.
 void setInstructions(String instructions)
          Set the instructions.
 void setMaxGradePoint(int maxPoints)
          Set the maximum grade for grade type = SCORE_GRADE_TYPE(3)
 void setReleaseGrades(boolean release)
          Sets whether grades can be released once submissions are graded.
 void setTimeLastModified(Time lastmod)
          Set the time last modified.
 void setTitle(String title)
          Set the title.
 void setTypeOfGrade(int gradeType)
          Set the grade type.
 void setTypeOfSubmission(int type)
          Set the type of valid submission.
 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.BaseAssignmentContent
compareTo, equals, getAllowAttachments, getAttachments, getAuthorLastModified, getAuthors, getContext, getCreator, getGroupProject, getHonorPledge, getId, getInstructions, getMaxGradePoint, getMaxGradePointDisplay, getProperties, getReference, getReference, getTimeCreated, getTimeLastModified, getTitle, getTypeOfGrade, getTypeOfGradeString, getTypeOfSubmission, getUrl, getUrl, hashCode, individuallyGraded, inUse, releaseGrades, 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.entity.AttachmentContainer
getAttachments
 
Methods inherited from interface org.sakaiproject.service.legacy.assignment.AssignmentContent
getAllowAttachments, getAuthorLastModified, getAuthors, getContext, getCreator, getGroupProject, getHonorPledge, getInstructions, getMaxGradePoint, getMaxGradePointDisplay, getTimeCreated, getTimeLastModified, getTitle, getTypeOfGrade, getTypeOfGradeString, getTypeOfSubmission, individuallyGraded, inUse, releaseGrades
 
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.BaseAssignmentContentEdit

public BaseAssignmentService.BaseAssignmentContentEdit(AssignmentContent assignmentContent)
Construct from another AssignmentContent object.


BaseAssignmentService.BaseAssignmentContentEdit

public BaseAssignmentService.BaseAssignmentContentEdit(String id,
                                                       String context)
Construct.

Parameters:
id - The AssignmentContent id.

BaseAssignmentService.BaseAssignmentContentEdit

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

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

finalize

protected void finalize()
Clean up.


addAttachment

public void addAttachment(Reference ref)
Add an attachment.

Specified by:
addAttachment in interface AttachmentContainerEdit
Parameters:
ref - - The attachment Reference.

removeAttachment

public void removeAttachment(Reference ref)
Remove an attachment.

Specified by:
removeAttachment in interface AttachmentContainerEdit
Parameters:
ref - - The attachment Reference to remove (the one removed will equal this, they need not be ==).

replaceAttachments

public void replaceAttachments(List attachments)
Replace the attachment set.

Specified by:
replaceAttachments in interface AttachmentContainerEdit
Parameters:
attachments - - A ReferenceVector that will become the new set of attachments.

clearAttachments

public void clearAttachments()
Clear all attachments.

Specified by:
clearAttachments in interface AttachmentContainerEdit

setTitle

public void setTitle(String title)
Set the title.

Specified by:
setTitle in interface AssignmentContentEdit
Parameters:
title - - The Assignment's title.

setInstructions

public void setInstructions(String instructions)
Set the instructions.

Specified by:
setInstructions in interface AssignmentContentEdit
Parameters:
instructions - - The Assignment's instructions.

setContext

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

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

setTypeOfSubmission

public void setTypeOfSubmission(int type)
Set the type of valid submission.

Specified by:
setTypeOfSubmission in interface AssignmentContentEdit
Parameters:
type - - The type of submission.

setTypeOfGrade

public void setTypeOfGrade(int gradeType)
Set the grade type.

Specified by:
setTypeOfGrade in interface AssignmentContentEdit
Parameters:
gradeType - - The type of grade.

setMaxGradePoint

public void setMaxGradePoint(int maxPoints)
Set the maximum grade for grade type = SCORE_GRADE_TYPE(3)

Specified by:
setMaxGradePoint in interface AssignmentContentEdit
Parameters:
maxPoints - - The maximum grade score.

setGroupProject

public void setGroupProject(boolean groupProject)
Set whether this project can be a group project.

Specified by:
setGroupProject in interface AssignmentContentEdit
Parameters:
groupProject - - True if this can be a group project, false otherwise.

setIndividuallyGraded

public void setIndividuallyGraded(boolean individGraded)
Set whether group projects should be individually graded.

Specified by:
setIndividuallyGraded in interface AssignmentContentEdit
Parameters:
individGraded - - true if projects are individually graded, false if grades are given to the group.

setReleaseGrades

public void setReleaseGrades(boolean release)
Sets whether grades can be released once submissions are graded.

Specified by:
setReleaseGrades in interface AssignmentContentEdit
Parameters:
release - - true if grades can be released once submission are graded, false if they must be released manually.

setHonorPledge

public void setHonorPledge(int pledgeType)
Set the Honor Pledge type; values are NONE and ENGINEERING_HONOR_PLEDGE.

Specified by:
setHonorPledge in interface AssignmentContentEdit
Parameters:
pledgeType - - the Honor Pledge value.

setAllowAttachments

public void setAllowAttachments(boolean allow)
Does this Assignment allow attachments?

Specified by:
setAllowAttachments in interface AssignmentContentEdit
Parameters:
allow - - true if the Assignment allows attachments, false otherwise?

addAuthor

public void addAuthor(User author)
Add an author to the author list.

Specified by:
addAuthor in interface AssignmentContentEdit
Parameters:
author - - The User to add to the author list.

removeAuthor

public void removeAuthor(User author)
Remove an author from the author list.

Specified by:
removeAuthor in interface AssignmentContentEdit
Parameters:
author - - the User to remove from the author list.

setTimeLastModified

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

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

set

protected void set(AssignmentContent assignmentContent)
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