mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Various minor fixes, comment removal, etc.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31283 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -18,7 +18,6 @@
|
|||||||
*/
|
*/
|
||||||
package org.alfresco.encryption;
|
package org.alfresco.encryption;
|
||||||
|
|
||||||
import static org.junit.Assert.assertNotNull;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
import static org.junit.Assert.assertTrue;
|
||||||
import static org.junit.Assert.fail;
|
import static org.junit.Assert.fail;
|
||||||
|
|
||||||
|
@@ -50,7 +50,6 @@ import org.apache.commons.logging.LogFactory;
|
|||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.ApplicationContextAware;
|
import org.springframework.context.ApplicationContextAware;
|
||||||
import org.springframework.extensions.surf.util.I18NUtil;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Re-encrypts encryptable repository properties using a new set of encryption keys.
|
* Re-encrypts encryptable repository properties using a new set of encryption keys.
|
||||||
@@ -95,7 +94,6 @@ public class ReEncryptor implements ApplicationContextAware
|
|||||||
{
|
{
|
||||||
this.transactionService = transactionService;
|
this.transactionService = transactionService;
|
||||||
this.transactionHelper = transactionService.getRetryingTransactionHelper();
|
this.transactionHelper = transactionService.getRetryingTransactionHelper();
|
||||||
this.transactionHelper.setForceWritable(true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setMetadataEncryptor(MetadataEncryptor metadataEncryptor)
|
public void setMetadataEncryptor(MetadataEncryptor metadataEncryptor)
|
||||||
|
@@ -41,16 +41,12 @@ import java.util.Map;
|
|||||||
public class AnalysedDirectory
|
public class AnalysedDirectory
|
||||||
{
|
{
|
||||||
private List<File> originalListing = null;
|
private List<File> originalListing = null;
|
||||||
// All importable items (files and directories)
|
|
||||||
// private List<ImportableItem> importableItems = null;
|
|
||||||
private Map<File, ImportableItem> importableItems = null;
|
private Map<File, ImportableItem> importableItems = null;
|
||||||
// keep track of directories in this list as well as importedItems
|
|
||||||
private List<ImportableItem> importableDirectories = null;
|
private List<ImportableItem> importableDirectories = null;
|
||||||
|
|
||||||
public AnalysedDirectory(File[] files)
|
public AnalysedDirectory(File[] files)
|
||||||
{
|
{
|
||||||
originalListing = Arrays.asList(files);
|
originalListing = Arrays.asList(files);
|
||||||
// importableItems = new ArrayList<ImportableItem>();
|
|
||||||
importableItems = new HashMap<File, ImportableItem>();
|
importableItems = new HashMap<File, ImportableItem>();
|
||||||
importableDirectories = new ArrayList<ImportableItem>();
|
importableDirectories = new ArrayList<ImportableItem>();
|
||||||
}
|
}
|
||||||
@@ -59,11 +55,6 @@ public class AnalysedDirectory
|
|||||||
{
|
{
|
||||||
return originalListing;
|
return originalListing;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public List<ImportableItem> getImportableItems()
|
|
||||||
// {
|
|
||||||
// return importableItems;
|
|
||||||
// }
|
|
||||||
|
|
||||||
public Collection<ImportableItem> getImportableItems()
|
public Collection<ImportableItem> getImportableItems()
|
||||||
{
|
{
|
||||||
@@ -77,7 +68,6 @@ public class AnalysedDirectory
|
|||||||
|
|
||||||
public void addImportableItem(ImportableItem importableItem)
|
public void addImportableItem(ImportableItem importableItem)
|
||||||
{
|
{
|
||||||
// importableItems.add(importableItem);
|
|
||||||
if(importableItem.getHeadRevision().contentFileExists() &&
|
if(importableItem.getHeadRevision().contentFileExists() &&
|
||||||
ImportableItem.FileType.DIRECTORY.equals(importableItem.getHeadRevision().getContentFileType()))
|
ImportableItem.FileType.DIRECTORY.equals(importableItem.getHeadRevision().getContentFileType()))
|
||||||
{
|
{
|
||||||
@@ -92,18 +82,7 @@ public class AnalysedDirectory
|
|||||||
public ImportableItem findImportableItem(File contentFile)
|
public ImportableItem findImportableItem(File contentFile)
|
||||||
{
|
{
|
||||||
ImportableItem result = null;
|
ImportableItem result = null;
|
||||||
|
|
||||||
// TODO perhaps a map structure here to make lookups faster?
|
|
||||||
// for (ImportableItem importableItem : importableItems)
|
|
||||||
// {
|
|
||||||
// if (contentFile.equals(importableItem.getHeadRevision().getContentFile()))
|
|
||||||
// {
|
|
||||||
// result = importableItem;
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
result = importableItems.get(contentFile);
|
result = importableItems.get(contentFile);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user