001 /** 002 * Copyright 2005-2014 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.rice.devtools.pdle; 017 018 import org.kuali.rice.krad.bo.PersistableBusinessObject; 019 020 import java.util.List; 021 import java.util.Map; 022 import java.util.Set; 023 024 public interface PostDataLoadEncryptionService { 025 026 static final String POST_DATA_LOAD_ENCRYPTION_SERVICE = "postDataLoadEncryptionService"; 027 028 void checkArguments(Class<? extends PersistableBusinessObject> businessObjectClass, Set<String> attributeNames); 029 030 void checkArguments(Class<? extends PersistableBusinessObject> businessObjectClass, Set<String> attributeNames, boolean checkOjbEncryptConfig); 031 032 void createBackupTable(Class<? extends PersistableBusinessObject> businessObjectClass); 033 034 void prepClassDescriptor(Class<? extends PersistableBusinessObject> businessObjectClass, Set<String> attributeNames); 035 036 void truncateTable(Class<? extends PersistableBusinessObject> businessObjectClass); 037 038 void encrypt(PersistableBusinessObject businessObject, Set<String> attributeNames); 039 040 void restoreClassDescriptor(Class<? extends PersistableBusinessObject> businessObjectClass, Set<String> attributeNames); 041 042 void restoreTableFromBackup(Class<? extends PersistableBusinessObject> businessObjectClass); 043 044 void dropBackupTable(Class<? extends PersistableBusinessObject> businessObjectClass); 045 046 boolean doesBackupTableExist(String tableName); 047 048 void truncateTable(String tableName); 049 050 void createBackupTable(String tableName); 051 052 List<Map<String, String>> retrieveUnencryptedColumnValuesFromBackupTable(String tableName, final List<String> columnNames, int numberOfRowsToCommitAfter); 053 054 boolean performEncryption(String tableName, List<Map<String, String>> columnsToEncrypt) throws Exception ; 055 056 void restoreTableFromBackup(String tableName); 057 058 void dropBackupTable(String tableName); 059 }