Coverage Report - org.kuali.rice.kns.service.SessionDocumentService
 
Classes in this File Line Coverage Branch Coverage Complexity
SessionDocumentService
N/A
N/A
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  
 import org.kuali.rice.kns.workflow.service.KualiWorkflowDocument;
 23  
 
 24  
 
 25  
 
 26  
 /**
 27  
  * Defines the methods common to all AttachmentService implementations
 28  
  *
 29  
  *
 30  
  */
 31  
 
 32  
 public interface SessionDocumentService {
 33  
 
 34  
         /**
 35  
      * Returns KualiDocumentFormBase object. It will check userSession first, if it failed then check database
 36  
      *
 37  
      * @param documentNumber
 38  
      * @param docFormKey
 39  
      * @param userSession
 40  
      * @return KualiDocumentFormBase
 41  
      * @throws
 42  
      */
 43  
         public KualiDocumentFormBase getDocumentForm( String documentNumber, String docFormKey, UserSession userSession, String ipAddress);
 44  
         
 45  
         /**
 46  
          * This method retrieve's a document from the user session from the given docId. 
 47  
          */
 48  
         public KualiWorkflowDocument getDocumentFromSession(UserSession userSession, String docId);
 49  
         
 50  
         /**
 51  
          * This method places a document into the user session. 
 52  
          */
 53  
         public void addDocumentToUserSession(UserSession userSession, KualiWorkflowDocument document);
 54  
         
 55  
         /**
 56  
      * Delete KualiDocumentFormBase from session and database.
 57  
      *
 58  
      * @param documentNumber
 59  
      * @param docFormKey
 60  
      * @param userSession
 61  
      * @throws
 62  
      */
 63  
         public void purgeDocumentForm(String documentNumber, String docFormKey, UserSession userSession, String ipAddress); 
 64  
         
 65  
         /**
 66  
      * Store KualiDocumentFormBase into session and database.
 67  
      *
 68  
      * @param KualiDocumentFormBase
 69  
      * @param userSession
 70  
      * @throws
 71  
      */
 72  
         public void setDocumentForm(KualiDocumentFormBase form, UserSession userSession, String ipAddress);
 73  
         
 74  
         
 75  
         //public void purgeAllSessionDocumentsFromMemory(); 
 76  
         
 77  
         /**
 78  
      * Delete KualiDocumentFormBases from database.
 79  
      *
 80  
      * @param documentNumber
 81  
      * @throws
 82  
      */
 83  
         public void purgeAllSessionDocuments(Timestamp expirationDate); 
 84  
 
 85  
 
 86  
 }