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