Author: nscavell
Date: 2011-09-30 16:55:57 -0400 (Fri, 30 Sep 2011)
New Revision: 7577
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
Log:
GTNPORTAL-2141: Show correct import mode in logger during MOP import.
Modified:
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
===================================================================
---
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-09-30
14:06:15 UTC (rev 7576)
+++
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-09-30
20:55:57 UTC (rev 7577)
@@ -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);
Show replies by date