View Javadoc

1   /**
2    * Copyright 2005-2013 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.krad.devtools.pdle;
17  
18  import java.util.List;
19  import java.util.Map;
20  
21  
22  /**
23   * This interface defines the DB access methods required by the PostDataLoadEncryptionService
24   */
25  public interface PostDataLoadEncryptionDao {
26      
27      final int UNENCRYPTED_VALUE_INDEX = 0;
28      final int ENCRYPTED_VALUE_INDEX = 1;
29      
30      void createBackupTable(String tableName);
31  
32      void truncateTable(String tableName);
33  
34      void restoreTableFromBackup(String tableName);
35  
36      void dropBackupTable(String tableName);
37            
38      boolean doesBackupTableExist(String tableName);
39  
40      void addEncryptionIndicatorToBackupTable(String tableName);
41  
42      void dropEncryptionIndicatorFromBackupTable(String tableName);
43  
44      void updateColumnValuesInBackupTable(String tableName, Map<String, List<String>> columnNameOldNewValuesMap);
45  
46      List<Map<String, String>> retrieveUnencryptedColumnValuesFromBackupTable(String tableName, final List<String> columnNames, int numberOfRowsToCommitAfter);
47  
48      String getUpdateBackupTableColumnsSql(String tableName, Map<String, List<String>> columnNameOldNewValuesMap);
49  
50      boolean performEncryption(final String tableName, final List<Map<String, List<String>>> rowsToEncryptColumnNameOldNewValuesMap) throws Exception;
51          
52  }