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.krad.service; 017 018import java.sql.Timestamp; 019 020import org.kuali.rice.kew.api.WorkflowDocument; 021import org.kuali.rice.krad.UserSession; 022import org.kuali.rice.krad.web.form.DocumentFormBase; 023 024/** 025 * Service API for persisting <code>Document</code> form content and 026 * retrieving back 027 * 028 * @deprecated (Deprecated and removed from use in KRAD (KULRICE-9149) 029 * 030 * <p> 031 * Used as an extension to session support. If a session times out, the doucment contents 032 * can be retrieved from the persistence storage and work resumed 033 * </p> 034 * 035 * @author Kuali Rice Team (rice.collab@kuali.org) 036 */ 037@Deprecated 038public interface SessionDocumentService { 039 040 /** 041 * Retrieves a document from the user session for the given document id 042 */ 043 public WorkflowDocument getDocumentFromSession(UserSession userSession, String docId); 044 045 /** 046 * This method places a document into the user session. 047 */ 048 public void addDocumentToUserSession(UserSession userSession, WorkflowDocument document); 049 050 /** 051 * Delete DocumentFormBase from session and database. 052 * 053 * @param documentNumber 054 * @param docFormKey 055 * @param userSession 056 * @throws 057 */ 058 public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress); 059 060 /** 061 * Delete KualiDocumentFormBase from session and database. 062 * 063 * @param documentNumber 064 * @throws 065 */ 066 public void purgeAllSessionDocuments(Timestamp expirationDate); 067 068 /** 069 * This method stores a UifFormBase into session and database 070 * 071 * @param form 072 * @param userSession 073 * @param ipAddress 074 */ 075 public void setDocumentForm(DocumentFormBase form, UserSession userSession, String ipAddress); 076 077 /** 078 * Returns DocumentFormBase object from the db 079 * 080 * @param documentNumber 081 * @param docFormKey 082 * @param userSession 083 * @param ipAddress 084 * @return 085 */ 086 public DocumentFormBase getDocumentForm(String documentNumber, String docFormKey, UserSession userSession, 087 String ipAddress); 088}