1 /** 2 * Copyright 2005-2013 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.krad.service; 17 18 import java.sql.Timestamp; 19 20 import org.kuali.rice.kew.api.WorkflowDocument; 21 import org.kuali.rice.krad.UserSession; 22 import org.kuali.rice.krad.web.form.DocumentFormBase; 23 24 /** 25 * Service API for persisting <code>Document</code> form content and 26 * retrieving back 27 * 28 * @deprecated (Deprecated and removed from use in KRAD (KULRICE-9149) 29 * 30 * <p> 31 * Used as an extension to session support. If a session times out, the doucment contents 32 * can be retrieved from the persistence storage and work resumed 33 * </p> 34 * 35 * @author Kuali Rice Team (rice.collab@kuali.org) 36 */ 37 @Deprecated 38 public interface SessionDocumentService { 39 40 /** 41 * Retrieves a document from the user session for the given document id 42 */ 43 public WorkflowDocument getDocumentFromSession(UserSession userSession, String docId); 44 45 /** 46 * This method places a document into the user session. 47 */ 48 public void addDocumentToUserSession(UserSession userSession, WorkflowDocument document); 49 50 /** 51 * Delete DocumentFormBase from session and database. 52 * 53 * @param documentNumber 54 * @param docFormKey 55 * @param userSession 56 * @throws 57 */ 58 public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress); 59 60 /** 61 * Delete KualiDocumentFormBase from session and database. 62 * 63 * @param documentNumber 64 * @throws 65 */ 66 public void purgeAllSessionDocuments(Timestamp expirationDate); 67 68 /** 69 * This method stores a UifFormBase into session and database 70 * 71 * @param form 72 * @param userSession 73 * @param ipAddress 74 */ 75 public void setDocumentForm(DocumentFormBase form, UserSession userSession, String ipAddress); 76 77 /** 78 * Returns DocumentFormBase object from the db 79 * 80 * @param documentNumber 81 * @param docFormKey 82 * @param userSession 83 * @param ipAddress 84 * @return 85 */ 86 public DocumentFormBase getDocumentForm(String documentNumber, String docFormKey, UserSession userSession, 87 String ipAddress); 88 }