001: /**********************************************************************************
002: * $URL: https://source.sakaiproject.org/svn/assignment/tags/sakai_2-4-1/assignment-api/api/src/java/org/sakaiproject/assignment/api/AssignmentEdit.java $
003: * $Id: AssignmentEdit.java 11433 2006-06-30 18:28:49Z zqian@umich.edu $
004: ***********************************************************************************
005: *
006: * Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
007: *
008: * Licensed under the Educational Community License, Version 1.0 (the "License");
009: * you may not use this file except in compliance with the License.
010: * You may obtain a copy of the License at
011: *
012: * http://www.opensource.org/licenses/ecl1.php
013: *
014: * Unless required by applicable law or agreed to in writing, software
015: * distributed under the License is distributed on an "AS IS" BASIS,
016: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017: * See the License for the specific language governing permissions and
018: * limitations under the License.
019: *
020: **********************************************************************************/package org.sakaiproject.assignment.api;
021:
022: import java.util.Collection;
023:
024: import org.sakaiproject.entity.api.Edit;
025: import org.sakaiproject.exception.PermissionException;
026: import org.sakaiproject.site.api.Group;
027: import org.sakaiproject.time.api.Time;
028: import org.sakaiproject.user.api.User;
029:
030: /**
031: * <p>
032: * Assignment is an interface for the Sakai assignments module. It represents a specific assignment (as for a specific section or class).
033: * </p>
034: */
035: public interface AssignmentEdit extends Assignment, Edit {
036: /**
037: * Set the reference of the AssignmentContent of this Assignment.
038: *
039: * @param String -
040: * the reference of the AssignmentContent.
041: */
042: public void setContentReference(String contentReference);
043:
044: /**
045: * Set the AssignmentContent of this Assignment.
046: *
047: * @param content -
048: * the Assignment's AssignmentContent.
049: */
050: public void setContent(AssignmentContent content);
051:
052: /**
053: * Set the first time at which the assignment can be viewed; may be null.
054: *
055: * @param openTime -
056: * The Time at which the Assignment opens.
057: */
058: public void setOpenTime(Time openTime);
059:
060: /**
061: * Set the time at which the assignment is due; may be null.
062: *
063: * @param dueTime -
064: * The Time at which the Assignment is due.
065: */
066: public void setDueTime(Time dueTime);
067:
068: /**
069: * Set the drop dead time after which responses to this assignment are considered late; may be null.
070: *
071: * @param dropDeadTime -
072: * The Time object representing the drop dead time.
073: */
074: public void setDropDeadTime(Time dropDeadTime);
075:
076: /**
077: * Set the time after which this assignment can no longer be viewed, and after which submissions will not be accepted. May be null.
078: *
079: * @param closeTime -
080: * The Time after which the Assignment is closed, or null if unspecified.
081: */
082: public void setCloseTime(Time closeTime);
083:
084: /**
085: * Set the section info
086: *
087: * @param sectionId -
088: * The section id.
089: */
090: public void setSection(String sectionId);
091:
092: /**
093: * Set the Assignment's context at the time of creation.
094: *
095: * @param context -
096: * The context string.
097: */
098: public void setContext(String context);
099:
100: /**
101: * Set whether this is a draft or final copy.
102: *
103: * @param draft -
104: * true if this is a draft, false if it is a final copy.
105: */
106: public void setDraft(boolean draft);
107:
108: /**
109: * Add an author to the author list.
110: *
111: * @param author -
112: * The User to add to the author list.
113: */
114: public void addAuthor(User author);
115:
116: /**
117: * Remove an author from the author list.
118: *
119: * @param author -
120: * the User to remove from the author list.
121: */
122: public void removeAuthor(User author);
123:
124: /**
125: * Set the title.
126: *
127: * @param title -
128: * The Assignment's title.
129: */
130: public void setTitle(String title);
131:
132: /**
133: * Set these as the message's groups, replacing the access and groups already defined.
134: *
135: * @param Collection
136: * groups The colelction of Group objects to use for this message.
137: * @throws PermissionException
138: * if the end user does not have permission to remove from the groups that would be removed or add to the groups that would be added.
139: */
140: void setGroupAccess(Collection groups) throws PermissionException;
141:
142: /**
143: * Remove any grouping for this message; the access mode reverts to channel and any groups are removed.
144: *
145: * @throws PermissionException
146: * if the end user does not have permission to do this.
147: */
148: void clearGroupAccess() throws PermissionException;
149:
150: /**
151: * Set the access mode for the assignment - how we compute who has access to the assignment.
152: *
153: * @param access
154: * The AssignmentAccess access mode for the message.
155: */
156: void setAccess(AssignmentAccess access);
157: }
|