View Javadoc

1   /**
2    * Copyright 2005-2012 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.devtools.pdle;
17  
18  import org.kuali.rice.krad.bo.PersistableBusinessObject;
19  
20  import java.util.List;
21  import java.util.Map;
22  import java.util.Set;
23  
24  public interface PostDataLoadEncryptionService {
25  
26      static final String POST_DATA_LOAD_ENCRYPTION_SERVICE = "postDataLoadEncryptionService";
27  	
28  	void checkArguments(Class<? extends PersistableBusinessObject> businessObjectClass, Set<String> attributeNames);
29  	
30      void checkArguments(Class<? extends PersistableBusinessObject> businessObjectClass, Set<String> attributeNames, boolean checkOjbEncryptConfig);
31  
32      void createBackupTable(Class<? extends PersistableBusinessObject> businessObjectClass);
33  
34      void prepClassDescriptor(Class<? extends PersistableBusinessObject> businessObjectClass, Set<String> attributeNames);
35  
36      void truncateTable(Class<? extends PersistableBusinessObject> businessObjectClass);
37  
38      void encrypt(PersistableBusinessObject businessObject, Set<String> attributeNames);
39  
40      void restoreClassDescriptor(Class<? extends PersistableBusinessObject> businessObjectClass, Set<String> attributeNames);
41  
42      void restoreTableFromBackup(Class<? extends PersistableBusinessObject> businessObjectClass);
43  
44      void dropBackupTable(Class<? extends PersistableBusinessObject> businessObjectClass);
45      
46      boolean doesBackupTableExist(String tableName);
47      
48      void truncateTable(String tableName);
49      
50      void createBackupTable(String tableName);
51  
52      List<Map<String, String>> retrieveUnencryptedColumnValuesFromBackupTable(String tableName, final List<String> columnNames, int numberOfRowsToCommitAfter);
53      
54      boolean performEncryption(String tableName, List<Map<String, String>> columnsToEncrypt) throws Exception ;
55      
56      void restoreTableFromBackup(String tableName);
57  
58      void dropBackupTable(String tableName);
59  }