Author: theute
Date: 2011-10-04 03:09:30 -0400 (Tue, 04 Oct 2011)
New Revision: 7641
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
Log:
JBEPP-1253: Show correct import mode in logger during MOP import
Modified:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
===================================================================
---
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-10-04
07:06:26 UTC (rev 7640)
+++
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-10-04
07:09:30 UTC (rev 7641)
@@ -96,19 +96,18 @@
DescriptionService descriptionService =
operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
if (descriptionService == null) throw new OperationException(operationName,
"Description service was null");
- ImportMode importMode = ImportMode.MERGE;
String mode = operationContext.getAttributes().getValue("importMode");
- if (mode != null)
+ if (mode == null || "".equals(mode)) mode = "merge";
+
+ ImportMode importMode;
+ try
{
- try
- {
- importMode = ImportMode.valueOf(mode.trim().toUpperCase());
- }
- catch (Exception e)
- {
- throw new OperationException(operationName, "Unknown importMode " +
mode);
- }
+ importMode = ImportMode.valueOf(mode.trim().toUpperCase());
}
+ catch (Exception e)
+ {
+ throw new OperationException(operationName, "Unknown importMode " +
mode);
+ }
Map<SiteKey, MopImport> importMap = new HashMap<SiteKey, MopImport>();
final NonCloseableZipInputStream zis = new
NonCloseableZipInputStream(inputStream);