]> 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
+ register a default command in both RAP and RCP security base apps to provide generi...
[lgpl/argeo-commons.git] / server / plugins / org.argeo.jcr.ui.explorer / src / main / java / org / argeo / jcr / ui / explorer / wizards / ImportFileSystemWizard.java
index 34ce3325a523f474cd5276bc9f29a390c77d82a9..127c2cd54a0669032406b7717ff2008218bbfbe8 100644 (file)
@@ -1,3 +1,18 @@
+/*
+ * Copyright (C) 2007-2012 Argeo GmbH
+ *
+ * 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;
@@ -15,6 +30,7 @@ import org.apache.commons.logging.LogFactory;
 import org.argeo.ArgeoException;
 import org.argeo.eclipse.ui.ErrorFeedback;
 import org.argeo.eclipse.ui.specific.ImportToServerWizardPage;
+import org.argeo.eclipse.ui.specific.UploadFileWizardPage;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.jface.operation.IRunnableWithProgress;
@@ -24,7 +40,7 @@ public class ImportFileSystemWizard extends Wizard {
        private final static Log log = LogFactory
                        .getLog(ImportFileSystemWizard.class);
 
-       private ImportToServerWizardPage importPage;
+       private UploadFileWizardPage importPage;
        private final Node folder;
 
        public ImportFileSystemWizard(Node folder) {
@@ -34,7 +50,7 @@ public class ImportFileSystemWizard extends Wizard {
 
        @Override
        public void addPages() {
-               importPage = new ImportToServerWizardPage();
+               importPage = new UploadFileWizardPage();
                addPage(importPage);
                setNeedsProgressMonitor(importPage.getNeedsProgressMonitor());
        }
@@ -77,7 +93,8 @@ public class ImportFileSystemWizard extends Wizard {
                        return true;
                } else if (ImportToServerWizardPage.FOLDER_ITEM_TYPE.equals(objectType)) {
                        if (objectPath == null || !new File(objectPath).exists()) {
-                               ErrorFeedback.show("Directory " + objectPath + " does not exist");
+                               ErrorFeedback.show("Directory " + objectPath
+                                               + " does not exist");
                                return false;
                        }