001/** 002 * Copyright 2005-2016 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.rice.kns.service; 017 018import org.kuali.rice.kew.api.WorkflowDocument; 019import org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase; 020import org.kuali.rice.krad.UserSession; 021 022import java.sql.Timestamp; 023 024/** 025 * @author Kuali Rice Team (rice.collab@kuali.org) 026 */ 027@Deprecated 028public interface SessionDocumentService { 029 030 /** 031 * Retrieves a document from the user session for the given document id 032 */ 033 public WorkflowDocument getDocumentFromSession(UserSession userSession, String docId); 034 035 /** 036 * This method places a document into the user session. 037 */ 038 public void addDocumentToUserSession(UserSession userSession, WorkflowDocument document); 039 040 /** 041 * Delete KualiDocumentFormBase from session and database. 042 * 043 * @param documentNumber 044 * @param docFormKey 045 * @param userSession 046 * @throws 047 */ 048 public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress); 049 050 /** 051 * Delete KualiDocumentFormBases from database. 052 * 053 * @param documentNumber 054 * @throws 055 */ 056 public void purgeAllSessionDocuments(Timestamp expirationDate); 057 058 /** 059 * Returns KualiDocumentFormBase object. It will check userSession first, if it failed then check database 060 * 061 * @param documentNumber 062 * @param docFormKey 063 * @param userSession 064 * @return KualiDocumentFormBase 065 * @throws 066 */ 067 public KualiDocumentFormBase getDocumentForm(String documentNumber, String docFormKey, UserSession userSession, 068 String ipAddress); 069 070 /** 071 * Store KualiDocumentFormBase into session and database. 072 * 073 * @param KualiDocumentFormBase 074 * @param userSession 075 * @throws 076 */ 077 public void setDocumentForm(KualiDocumentFormBase form, UserSession userSession, String ipAddress); 078}