001/** 002 * Copyright 2005-2018 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 Only used by KNS classes, no KRAD equivalent available. 028 */ 029@Deprecated 030public interface SessionDocumentService { 031 032 /** 033 * Retrieves a document from the user session for the given document id 034 */ 035 public WorkflowDocument getDocumentFromSession(UserSession userSession, String docId); 036 037 /** 038 * This method places a document into the user session. 039 */ 040 public void addDocumentToUserSession(UserSession userSession, WorkflowDocument document); 041 042 /** 043 * Delete KualiDocumentFormBase from session and database. 044 * 045 * @param documentNumber 046 * @param docFormKey 047 * @param userSession 048 * @throws 049 */ 050 public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress); 051 052 /** 053 * Delete KualiDocumentFormBases from database. 054 * 055 * @param documentNumber 056 * @throws 057 */ 058 public void purgeAllSessionDocuments(Timestamp expirationDate); 059 060 /** 061 * Returns KualiDocumentFormBase object. It will check userSession first, if it failed then check database 062 * 063 * @param documentNumber 064 * @param docFormKey 065 * @param userSession 066 * @return KualiDocumentFormBase 067 * @throws 068 */ 069 public KualiDocumentFormBase getDocumentForm(String documentNumber, String docFormKey, UserSession userSession, 070 String ipAddress); 071 072 /** 073 * Store KualiDocumentFormBase into session and database. 074 * 075 * @param KualiDocumentFormBase 076 * @param userSession 077 * @throws 078 */ 079 public void setDocumentForm(KualiDocumentFormBase form, UserSession userSession, String ipAddress); 080}