001: /**********************************************************************************
002: *
003: * $URL: https://source.sakaiproject.org/svn/gradebook/tags/sakai_2-4-1/service/api/src/java/org/sakaiproject/service/gradebook/shared/Assignment.java $
004: * $Id: Assignment.java 20758 2007-01-29 18:07:03Z ray@media.berkeley.edu $
005: *
006: ***********************************************************************************
007: *
008: * Copyright (c) 2006 The Regents of the University of California
009: *
010: * Licensed under the Educational Community License Version 1.0 (the "License");
011: * By obtaining, using and/or copying this Original Work, you agree that you have read,
012: * understand, and will comply with the terms and conditions of the Educational Community License.
013: * You may obtain a copy of the License at:
014: *
015: * http://www.opensource.org/licenses/ecl1.php
016: *
017: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
018: * INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
019: * AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
020: * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
021: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
022: *
023: **********************************************************************************/package org.sakaiproject.service.gradebook.shared;
024:
025: import java.io.Serializable;
026: import java.util.Date;
027:
028: /**
029: * JavaBean to hold data associated with a Gradebook assignment.
030: * The Course Grade is not considered an assignment.
031: */
032: public class Assignment implements Serializable {
033: private static final long serialVersionUID = 1L;
034:
035: private String name;
036: private Double points;
037: private Date dueDate;
038: private boolean counted;
039: private boolean externallyMaintained;
040: private String externalId;
041: private String externalAppName;
042: private boolean released;
043:
044: public Assignment() {
045: }
046:
047: /**
048: * @return Returns the name of the assignment. The assignment name is unique among
049: * currently defined assignments. However, it is not a safe UID for persistance,
050: * since an assignment can be renamed. Also, an assignment can be deleted and a
051: * new assignment can be created re-using the old name.
052: */
053: public String getName() {
054: return name;
055: }
056:
057: /**
058: * @return Returns the total points the assignment is worth.
059: */
060: public Double getPoints() {
061: return points;
062: }
063:
064: /**
065: * @return Returns the due date for the assignment, or null if none is defined.
066: */
067: public Date getDueDate() {
068: return dueDate;
069: }
070:
071: /**
072: * @return Returns true if the assignment is maintained by some software
073: * other than the Gradebook itself.
074: */
075: public boolean isExternallyMaintained() {
076: return externallyMaintained;
077: }
078:
079: /**
080: *
081: * @return true if the assignment has been released for view to students
082: */
083: public boolean isReleased() {
084: return released;
085: }
086:
087: /**
088: *
089: * @return Returns the externalAppName, or null if the assignment is
090: * maintained by the Gradebook
091: */
092: public String getExternalAppName() {
093: return externalAppName;
094: }
095:
096: /**
097: *
098: * @return Returns the external Id, or null if the assignment is
099: * maintained by the Gradebook
100: */
101: public String getExternalId() {
102: return externalId;
103: }
104:
105: public boolean isCounted() {
106: return counted;
107: }
108:
109: public void setCounted(boolean notCounted) {
110: this .counted = notCounted;
111: }
112:
113: public void setPoints(Double points) {
114: this .points = points;
115: }
116:
117: public void setDueDate(Date dueDate) {
118: this .dueDate = dueDate;
119: }
120:
121: public void setExternalAppName(String externalAppName) {
122: this .externalAppName = externalAppName;
123: }
124:
125: public void setExternalId(String externalId) {
126: this .externalId = externalId;
127: }
128:
129: public void setExternallyMaintained(boolean externallyMaintained) {
130: this .externallyMaintained = externallyMaintained;
131: }
132:
133: public void setName(String name) {
134: this .name = name;
135: }
136:
137: public void setReleased(boolean released) {
138: this.released = released;
139: }
140:
141: }
|