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

java.lang.Object
  extended byorg.sakaiproject.component.legacy.assignment.BaseAssignmentService.BaseAssignment
      extended byorg.sakaiproject.component.legacy.assignment.BaseAssignmentService.BaseAssignmentEdit
All Implemented Interfaces:
Assignment, AssignmentEdit, Comparable, Edit, Entity, EventListener, SessionBindingListener
Enclosing class:
BaseAssignmentService

public class BaseAssignmentService.BaseAssignmentEdit
extends BaseAssignmentService.BaseAssignment
implements AssignmentEdit, SessionBindingListener

BaseAssignmentEdit is an implementation of the CHEF AssignmentEdit 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.BaseAssignment
m_assignmentContent, m_authors, m_closeTime, m_context, m_draft, m_dropDeadTime, m_dueTime, m_id, m_openTime, m_properties, m_section, m_title
 
Fields inherited from interface org.sakaiproject.service.legacy.assignment.Assignment
ASSIGNMENT_SUBMISSION_TYPE_NOT_SET, ATTACHMENT_ONLY_ASSIGNMENT_SUBMISSION, CHECK_GRADE_TYPE, CHECK_GRADE_TYPE_STRING, GRADE_TYPE_NOT_SET, HONOR_PLEDGE_ENGINEERING, HONOR_PLEDGE_NONE, HONOR_PLEDGE_NOT_SET, LETTER_GRADE_TYPE, LETTER_GRADE_TYPE_STRING, PASS_FAIL_GRADE_TYPE, PASS_FAIL_GRADE_TYPE_STRING, SCORE_GRADE_TYPE, SCORE_GRADE_TYPE_STRING, TEXT_AND_ATTACHMENT_ASSIGNMENT_SUBMISSION, TEXT_ONLY_ASSIGNMENT_SUBMISSION, UNGRADED_GRADE_TYPE, UNGRADED_GRADE_TYPE_STRING
 
Fields inherited from interface org.sakaiproject.service.legacy.entity.Entity
SEPARATOR
 
Constructor Summary
BaseAssignmentService.BaseAssignmentEdit(Assignment assignment)
          Construct from another Assignment object.
BaseAssignmentService.BaseAssignmentEdit(Element el)
          Construct from information in XML.
BaseAssignmentService.BaseAssignmentEdit(String id, String context)
          Construct.
 
Method Summary
protected  void activate()
          Enable editing.
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.
protected  void set(Assignment assignment)
          Take all values from this object.
 void setCloseTime(Time closetime)
          Set the time after which this assignment can no longer be viewed, and after which submissions will not be accepted.
 void setContent(AssignmentContent content)
          Set the AssignmentContent of this Assignment.
 void setContentReference(String contentReference)
          Set the reference of the AssignmentContent of this Assignment.
 void setContext(String context)
          Set the context at the time of creation.
 void setDraft(boolean draft)
          Set whether this is a draft or final copy.
 void setDropDeadTime(Time dropdeadtime)
          Set the drop dead time after which responses to this assignment are considered late; may be null.
 void setDueTime(Time duetime)
          Set the time at which the assignment is due; may be null.
protected  void setEvent(String event)
          Set the event code for this edit.
 void setOpenTime(Time opentime)
          Set the first time at which the assignment can be viewed; may be null.
 void setSection(String sectionId)
          Set the section info
 void setTitle(String title)
          Set the title.
 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.BaseAssignment
addAuthor, compareTo, equals, getAuthorLastModified, getAuthors, getCloseTime, getContent, getContentReference, getContext, getCreator, getDraft, getDropDeadTime, getDueTime, getId, getOpenTime, getProperties, getReference, getReference, getSection, getTimeCreated, getTimeLastModified, getTitle, getUrl, getUrl, hashCode, removeAuthor, 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.AssignmentEdit
addAuthor, removeAuthor
 
Methods inherited from interface org.sakaiproject.service.legacy.assignment.Assignment
getAuthorLastModified, getAuthors, getCloseTime, getContent, getContentReference, getContext, getCreator, getDraft, getDropDeadTime, getDueTime, getOpenTime, getSection, getTimeCreated, getTimeLastModified, getTitle
 
Methods inherited from interface org.sakaiproject.service.legacy.entity.Entity
getId, getProperties, getReference, getReference, getUrl, getUrl, toXml
 
Methods inherited from interface java.lang.Comparable
compareTo
 

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.BaseAssignmentEdit

public BaseAssignmentService.BaseAssignmentEdit(Assignment assignment)
Construct from another Assignment object.


BaseAssignmentService.BaseAssignmentEdit

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

Parameters:
id - The assignment id.

BaseAssignmentService.BaseAssignmentEdit

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

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

finalize

protected void finalize()
Clean up.


setTitle

public void setTitle(String title)
Set the title.

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

setContentReference

public void setContentReference(String contentReference)
Set the reference of the AssignmentContent of this Assignment.

Specified by:
setContentReference in interface AssignmentEdit

setContent

public void setContent(AssignmentContent content)
Set the AssignmentContent of this Assignment.

Specified by:
setContent in interface AssignmentEdit
Parameters:
content - - the Assignment's AssignmentContent.

setContext

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

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

setSection

public void setSection(String sectionId)
Set the section info

Specified by:
setSection in interface AssignmentEdit
Parameters:
sectionId - - The section id

setOpenTime

public void setOpenTime(Time opentime)
Set the first time at which the assignment can be viewed; may be null.

Specified by:
setOpenTime in interface AssignmentEdit
Parameters:
opentime - - The Time at which the Assignment opens.

setDueTime

public void setDueTime(Time duetime)
Set the time at which the assignment is due; may be null.

Specified by:
setDueTime in interface AssignmentEdit
Parameters:
duetime - - The Time at which the Assignment is due.

setDropDeadTime

public void setDropDeadTime(Time dropdeadtime)
Set the drop dead time after which responses to this assignment are considered late; may be null.

Specified by:
setDropDeadTime in interface AssignmentEdit
Parameters:
dropdeadtime - - The Time object representing the drop dead time.

setCloseTime

public void setCloseTime(Time closetime)
Set the time after which this assignment can no longer be viewed, and after which submissions will not be accepted. May be null.

Specified by:
setCloseTime in interface AssignmentEdit
Parameters:
closetime - - The Time after which the Assignment is closed, or null if unspecified.

setDraft

public void setDraft(boolean draft)
Set whether this is a draft or final copy.

Specified by:
setDraft in interface AssignmentEdit
Parameters:
draft - - true if this is a draft, false if it is a final copy.

set

protected void set(Assignment assignment)
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