Author: nscavell
Date: 2011-07-29 22:15:53 -0400 (Fri, 29 Jul 2011)
New Revision: 6959
Modified:
portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
Log:
Add debug message and throw exception for unknown zip entry.
Modified:
portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
===================================================================
---
portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-07-29
21:04:11 UTC (rev 6958)
+++
portal/branches/gatein-management/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-07-30
02:15:53 UTC (rev 6959)
@@ -115,6 +115,8 @@
// Skip directories
if (entry.isDirectory()) continue;
+ log.debug("Parsing zip entry: " + entry);
+
// Parse zip entry
String[] parts = parseEntry(entry);
SiteKey siteKey = Utils.siteKey(parts[0], parts[1]);
@@ -166,6 +168,10 @@
// Add import task to run later
mopImport.navigationTask = new NavigationImportTask(navigation, siteKey,
navigationService, descriptionService, dataStorage);
}
+ else
+ {
+ throw new OperationException(operationName, "Invalid zip entry:
" + entry);
+ }
}
resultHandler.completed(NoResultModel.INSTANCE);