001 /* 002 * Copyright 2011 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 */ 016 package org.kuali.kfs.module.purap.service; 017 018 import java.util.List; 019 020 import org.kuali.kfs.integration.purap.PurchasingAccountsPayableSensitiveData; 021 import org.kuali.kfs.module.purap.businessobject.PurchaseOrderSensitiveData; 022 import org.kuali.kfs.module.purap.businessobject.SensitiveData; 023 import org.kuali.kfs.module.purap.businessobject.SensitiveDataAssignment; 024 import org.kuali.kfs.module.purap.businessobject.SensitiveDataAssignmentDetail; 025 026 public interface SensitiveDataService { 027 028 public List<SensitiveData> getSensitiveDatasAssignedByRelatedDocId(Integer accountsPayablePurchasingDocumentLinkIdentifier); 029 030 /** 031 * Returns a sensitive data record associated with the given code. 032 * @param sensitiveDataCode the code of the sensitive data 033 * @return the sensitive data object with the give code 034 */ 035 public SensitiveData getSensitiveDataByCode(String sensitiveDataCode); 036 037 /** 038 * Returns all sensitive data records stored in the business object table. 039 * @return a list of all sensitive data objects 040 */ 041 public List<SensitiveData> getAllSensitiveDatas(); 042 043 /** 044 * Gets all sensitive data entries assigned to the specified purchase order. 045 * @param poId the ID of the specified purchase order 046 * @return a list of sensitive data entries assigned to the PO 047 */ 048 public List<SensitiveData> getSensitiveDatasAssignedByPoId(Integer poId); 049 050 /** 051 * Gets all sensitive data entries assigned to the specified purchase order. 052 * @param reqId the ID of the requisition that's associated with the purchase order 053 * @return a list of sensitive data entries assigned to the PO 054 */ 055 public List<SensitiveData> getSensitiveDatasAssignedByReqId(Integer reqId); 056 057 /** 058 * Deletes all sensitive data entries assigned to the specified purchase order. 059 * @param poId the ID of the PO 060 */ 061 public void deletePurchaseOrderSensitiveDatas(Integer poId); 062 063 /** 064 * Saves the specified list of PurchaseOrderSensitiveData objects into the database. 065 * @param posds the PurchaseOrderSensitiveData objects to be saved 066 */ 067 public void savePurchaseOrderSensitiveDatas(List<PurchaseOrderSensitiveData> posds); 068 069 /** 070 * Gets the latest sensitive data assignment for the specified purchase order. 071 * @param poId the ID of the specified PO 072 * @return the latest sensitive data assignment for the PO 073 */ 074 public SensitiveDataAssignment getLastSensitiveDataAssignment(Integer poId); 075 076 /** 077 * Gets the latest sensitive data assignment ID for the specified purchase order. 078 * @param poId the ID of the specified PO 079 * @return the latest sensitive data assignment ID for the PO 080 */ 081 public Integer getLastSensitiveDataAssignmentId(Integer poId); 082 083 /** 084 * Saves the specified SensitiveDataAssignment object into the database. 085 * @param sda the SensitiveDataAssignment object to be saved 086 */ 087 public void saveSensitiveDataAssignment(SensitiveDataAssignment sda); 088 089 /** 090 * Gets the latest sensitive data assignment details for the specified purchase order. 091 * @param poId the ID of the specified PO 092 * @return the latest sensitive data assignment details for the PO 093 */ 094 public List<SensitiveDataAssignmentDetail> getLastSensitiveDataAssignmentDetails(Integer poId); 095 096 /** 097 * Saves the specified list of SensitiveDataAssignmentDetail objects into the database. 098 * @param sdads the SensitiveDataAssignmentDetail objects to be saved 099 */ 100 public void saveSensitiveDataAssignmentDetails(List<SensitiveDataAssignmentDetail> sdads); 101 102 //public void savePurchaseOrderSensitiveData(String poId, String reqId, String sensitiveDataCode); 103 //public void savePurchaseOrderSensitiveData(PurchaseOrderSensitiveData posd); 104 //public void saveSensitiveDataAssignment(String sdaId, String poId, String userId, Date date); 105 //public void saveSensitiveDataAssignmentDetail(String sdaId, String sensitiveDataCode); 106 //public void saveSensitiveDataAssignmentDetail(SensitiveDataAssignmentDetail sdad); 107 108 }