| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| NoteService |
|
| 1.0;1 |
| 1 | /* | |
| 2 | * Copyright 2007 The Kuali Foundation | |
| 3 | * | |
| 4 | * Licensed under the Educational Community License, Version 2.0 (the "License"); | |
| 5 | * you may not use this file except in compliance with the License. | |
| 6 | * You may obtain a copy of the License at | |
| 7 | * | |
| 8 | * http://www.opensource.org/licenses/ecl2.php | |
| 9 | * | |
| 10 | * Unless required by applicable law or agreed to in writing, software | |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 13 | * See the License for the specific language governing permissions and | |
| 14 | * limitations under the License. | |
| 15 | */ | |
| 16 | package org.kuali.rice.kns.service; | |
| 17 | ||
| 18 | import java.util.ArrayList; | |
| 19 | import java.util.List; | |
| 20 | ||
| 21 | import org.kuali.rice.kew.exception.WorkflowException; | |
| 22 | import org.kuali.rice.kim.bo.Person; | |
| 23 | import org.kuali.rice.kns.bo.Note; | |
| 24 | import org.kuali.rice.kns.bo.PersistableBusinessObject; | |
| 25 | import org.kuali.rice.kns.document.Document; | |
| 26 | ||
| 27 | ||
| 28 | /** | |
| 29 | * This interface defines methods that a Note service must provide | |
| 30 | * | |
| 31 | * @author Kuali Rice Team (rice.collab@kuali.org) | |
| 32 | */ | |
| 33 | public interface NoteService { | |
| 34 | /** | |
| 35 | * Retrieves a list of notes for a object id | |
| 36 | * | |
| 37 | * @param remoteObjectId | |
| 38 | * @return A list of Notes | |
| 39 | * @throws Exception | |
| 40 | */ | |
| 41 | public ArrayList<Note> getByRemoteObjectId(String remoteObjectId); | |
| 42 | ||
| 43 | /** | |
| 44 | * Retrieves the notes for a note identifier | |
| 45 | * | |
| 46 | * @param noteId | |
| 47 | * @return A Note | |
| 48 | */ | |
| 49 | public Note getNoteByNoteId(Long noteId); | |
| 50 | ||
| 51 | /** | |
| 52 | * | |
| 53 | * This method saves a list of notes | |
| 54 | * @param noteValues | |
| 55 | */ | |
| 56 | public void saveNoteList(List notes); | |
| 57 | ||
| 58 | /** | |
| 59 | * Saves a note | |
| 60 | * | |
| 61 | * @param note | |
| 62 | * @return The note | |
| 63 | * @throws Exception | |
| 64 | */ | |
| 65 | public Note save(Note note) throws Exception; | |
| 66 | ||
| 67 | /** | |
| 68 | * Deletes a note | |
| 69 | * | |
| 70 | * @param Note | |
| 71 | * @throws Exception | |
| 72 | */ | |
| 73 | public void deleteNote(Note note) throws Exception; | |
| 74 | ||
| 75 | public Note createNote(Note note, PersistableBusinessObject bo) throws Exception; | |
| 76 | ||
| 77 | public String extractNoteProperty(Note note); | |
| 78 | ||
| 79 | /** | |
| 80 | * Builds an workflow notification request for the note and sends it to note recipient. | |
| 81 | * | |
| 82 | * @param document - document that contains the note | |
| 83 | * @param note - note to notify | |
| 84 | * @param sender - user who is sending the notification | |
| 85 | * @throws WorkflowException | |
| 86 | */ | |
| 87 | public void sendNoteRouteNotification(Document document, Note note, Person sender) throws WorkflowException; | |
| 88 | } |