001: /*
002: * Copyright 2005-2006 The Kuali Foundation.
003: *
004: *
005: * Licensed under the Educational Community License, Version 1.0 (the "License");
006: * you may not use this file except in compliance with the License.
007: * You may obtain a copy of the License at
008: *
009: * http://www.opensource.org/licenses/ecl1.php
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017: package edu.iu.uis.eden.notes.web;
018:
019: import java.util.List;
020:
021: import org.apache.struts.action.ActionForm;
022:
023: import edu.iu.uis.eden.EdenConstants;
024: import edu.iu.uis.eden.notes.Note;
025: import edu.iu.uis.eden.util.Utilities;
026:
027: /**
028: * Struts ActionForm for {@link NoteAction}.
029: *
030: * @author temay
031: * @author rkirkend
032: */
033: public class NoteForm extends ActionForm {
034:
035: private static final long serialVersionUID = 1L;
036: private Note note;
037: private Note existingNote;
038: private String methodToCall = "";
039: private String showEdit;
040: private Boolean showAdd;
041: private Long docId;
042: private Long noteIdNumber;
043: private Integer numberOfNotes;
044: private String sortOrder = "DESCENDING";
045: private Boolean sortNotes;
046: private String currentUserName;
047: private String currentDate;
048: private Boolean authorizedToAdd;
049: private List noteList;
050: private String addText;
051: private Long idInEdit;
052: private Boolean showAttachments;
053: private String attachmentTarget;
054:
055: private Object file;
056:
057: public NoteForm() {
058: note = new Note();
059: }
060:
061: public String getMethodToCall() {
062: return methodToCall;
063: }
064:
065: public void setMethodToCall(String methodToCall) {
066: this .methodToCall = methodToCall;
067: }
068:
069: public Note getNote() {
070: return note;
071: }
072:
073: public void setNote(Note note) {
074: this .note = note;
075: }
076:
077: public Note getExistingNote() {
078: return existingNote;
079: }
080:
081: public void setExistingNote(Note existingNote) {
082: this .existingNote = existingNote;
083: }
084:
085: public String getShowEdit() {
086: return showEdit;
087: }
088:
089: public void setShowEdit(String showEdit) {
090: this .showEdit = showEdit;
091: }
092:
093: public String getInstructionForCreateNew() {
094: return Utilities
095: .getApplicationConstant(EdenConstants.NOTE_CREATE_NEW_INSTRUCTION_KEY);
096: }
097:
098: public Long getDocId() {
099: return docId;
100: }
101:
102: public void setDocId(Long docId) {
103: this .docId = docId;
104: }
105:
106: public Integer getNumberOfNotes() {
107: return numberOfNotes;
108: }
109:
110: public void setNumberOfNotes(Integer numberOfNotes) {
111: this .numberOfNotes = numberOfNotes;
112: }
113:
114: public Boolean getShowAdd() {
115: return showAdd;
116: }
117:
118: public void setShowAdd(Boolean showAdd) {
119: this .showAdd = showAdd;
120: }
121:
122: public Long getNoteIdNumber() {
123: return noteIdNumber;
124: }
125:
126: public void setNoteIdNumber(Long noteIdNumber) {
127: this .noteIdNumber = noteIdNumber;
128: }
129:
130: public String getSortOrder() {
131: return sortOrder;
132: }
133:
134: public void setSortOrder(String sortOrder) {
135: this .sortOrder = sortOrder;
136: }
137:
138: public Boolean getSortNotes() {
139: return sortNotes;
140: }
141:
142: public void setSortNotes(Boolean sortNotes) {
143: this .sortNotes = sortNotes;
144: }
145:
146: public String getCurrentDate() {
147: return currentDate;
148: }
149:
150: public void setCurrentDate(String currentDate) {
151: this .currentDate = currentDate;
152: }
153:
154: public String getCurrentUserName() {
155: return currentUserName;
156: }
157:
158: public void setCurrentUserName(String currentUserName) {
159: this .currentUserName = currentUserName;
160: }
161:
162: public Boolean getAuthorizedToAdd() {
163: return authorizedToAdd;
164: }
165:
166: public void setAuthorizedToAdd(Boolean authorizedToAdd) {
167: this .authorizedToAdd = authorizedToAdd;
168: }
169:
170: public List getNoteList() {
171: return noteList;
172: }
173:
174: public void setNoteList(List noteList) {
175: this .noteList = noteList;
176: }
177:
178: public String getAddText() {
179: return addText;
180: }
181:
182: public void setAddText(String addText) {
183: this .addText = addText;
184: }
185:
186: public Long getIdInEdit() {
187: return idInEdit;
188: }
189:
190: public void setIdInEdit(Long idInEdit) {
191: this .idInEdit = idInEdit;
192: }
193:
194: public Object getFile() {
195: return file;
196: }
197:
198: public void setFile(Object file) {
199: this .file = file;
200: }
201:
202: public Boolean getShowAttachments() {
203: return showAttachments;
204: }
205:
206: public void setShowAttachments(Boolean showAttachments) {
207: this .showAttachments = showAttachments;
208: }
209:
210: public String getAttachmentTarget() {
211: return attachmentTarget;
212: }
213:
214: public void setAttachmentTarget(String attachmentTarget) {
215: this.attachmentTarget = attachmentTarget;
216: }
217: }
|