]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - server/plugins/org.argeo.jcr.ui.explorer/src/main/java/org/argeo/jcr/ui/explorer/wizards/ImportFileSystemWizard.java
Update license headers
[lgpl/argeo-commons.git] / server / plugins / org.argeo.jcr.ui.explorer / src / main / java / org / argeo / jcr / ui / explorer / wizards / ImportFileSystemWizard.java
index 9e9168e4faa3be48cabcbc633a3bd0e67c73e097..b5d13c131c067ea409ce2075fae5c778737e2eb2 100644 (file)
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2007-2012 Mathieu Baudier
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *         http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
 package org.argeo.jcr.ui.explorer.wizards;
 
 import java.io.File;
@@ -13,7 +28,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.argeo.ArgeoException;
-import org.argeo.eclipse.ui.dialogs.Error;
+import org.argeo.eclipse.ui.ErrorFeedback;
 import org.argeo.eclipse.ui.specific.ImportToServerWizardPage;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.MessageDialog;
@@ -51,7 +66,7 @@ public class ImportFileSystemWizard extends Wizard {
                final String objectPath = importPage.getObjectPath();
 
                // We do not display a progress bar for one file only
-               if (importPage.FILE_ITEM_TYPE.equals(objectType)) {
+               if (ImportToServerWizardPage.FILE_ITEM_TYPE.equals(objectType)) {
                        // In Rap we must force the "real" upload of the file
                        importPage.performFinish();
                        try {
@@ -75,9 +90,9 @@ public class ImportFileSystemWizard extends Wizard {
                                return false;
                        }
                        return true;
-               } else if (importPage.FOLDER_ITEM_TYPE.equals(objectType)) {
+               } else if (ImportToServerWizardPage.FOLDER_ITEM_TYPE.equals(objectType)) {
                        if (objectPath == null || !new File(objectPath).exists()) {
-                               Error.show("Directory " + objectPath + " does not exist");
+                               ErrorFeedback.show("Directory " + objectPath + " does not exist");
                                return false;
                        }
 
@@ -104,7 +119,7 @@ public class ImportFileSystemWizard extends Wizard {
                                        }
                                });
                        } catch (Exception e) {
-                               Error.show("Cannot import " + objectPath, e);
+                               ErrorFeedback.show("Cannot import " + objectPath, e);
                                failed = true;
                        }