Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
SessionDocumentService |
|
| 1.0;1 |
1 | /* | |
2 | * Copyright 2005-2008 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.sql.Timestamp; | |
19 | ||
20 | import org.kuali.rice.kns.UserSession; | |
21 | import org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase; | |
22 | ||
23 | ||
24 | ||
25 | /** | |
26 | * Defines the methods common to all AttachmentService implementations | |
27 | * | |
28 | * | |
29 | */ | |
30 | ||
31 | public interface SessionDocumentService { | |
32 | ||
33 | /** | |
34 | * Returns KualiDocumentFormBase object. It will check userSession first, if it failed then check database | |
35 | * | |
36 | * @param documentNumber | |
37 | * @param docFormKey | |
38 | * @param userSession | |
39 | * @return KualiDocumentFormBase | |
40 | * @throws | |
41 | */ | |
42 | ||
43 | public KualiDocumentFormBase getDocumentForm( String documentNumber, String docFormKey, UserSession userSession, String ipAddress); | |
44 | ||
45 | /** | |
46 | * Delete KualiDocumentFormBase from session and database. | |
47 | * | |
48 | * @param documentNumber | |
49 | * @param docFormKey | |
50 | * @param userSession | |
51 | * @throws | |
52 | */ | |
53 | public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress); | |
54 | ||
55 | /** | |
56 | * Store KualiDocumentFormBase into session and database. | |
57 | * | |
58 | * @param KualiDocumentFormBase | |
59 | * @param userSession | |
60 | * @throws | |
61 | */ | |
62 | public void setDocumentForm(KualiDocumentFormBase form, UserSession userSession, String ipAddress); | |
63 | ||
64 | ||
65 | //public void purgeAllSessionDocumentsFromMemory(); | |
66 | ||
67 | /** | |
68 | * Delete KualiDocumentFormBases from database. | |
69 | * | |
70 | * @param documentNumber | |
71 | * @throws | |
72 | */ | |
73 | public void purgeAllSessionDocuments(Timestamp expirationDate); | |
74 | ||
75 | ||
76 | } |