X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=eclipse%2Fruntime%2Forg.argeo.eclipse.ui.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Feclipse%2Fui%2Fjcr%2Fwizards%2FImportFileSystemWizard.java;fp=eclipse%2Fruntime%2Forg.argeo.eclipse.ui.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Feclipse%2Fui%2Fjcr%2Fwizards%2FImportFileSystemWizard.java;h=bbc20fe702682a29d9b9fad0087b039d00afc3aa;hb=a99d11e0c2696ff1a4a258adaa94d137440c8d6c;hp=e52fa6768aba927a95b0b2d6b54d3fc567f5c33e;hpb=e582d16d370908f4ca326ecd04334c301c463072;p=lgpl%2Fargeo-commons.git diff --git a/eclipse/runtime/org.argeo.eclipse.ui.jcr/src/main/java/org/argeo/eclipse/ui/jcr/wizards/ImportFileSystemWizard.java b/eclipse/runtime/org.argeo.eclipse.ui.jcr/src/main/java/org/argeo/eclipse/ui/jcr/wizards/ImportFileSystemWizard.java index e52fa6768..bbc20fe70 100644 --- a/eclipse/runtime/org.argeo.eclipse.ui.jcr/src/main/java/org/argeo/eclipse/ui/jcr/wizards/ImportFileSystemWizard.java +++ b/eclipse/runtime/org.argeo.eclipse.ui.jcr/src/main/java/org/argeo/eclipse/ui/jcr/wizards/ImportFileSystemWizard.java @@ -14,8 +14,7 @@ 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.specific.ImportFileSystemHandler; -import org.argeo.eclipse.ui.specific.ImportFileSystemWizardPage; +import org.argeo.eclipse.ui.specific.ImportToServerWizardPage; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.jface.operation.IRunnableWithProgress; @@ -25,21 +24,19 @@ public class ImportFileSystemWizard extends Wizard { private final static Log log = LogFactory .getLog(ImportFileSystemWizard.class); - private ImportFileSystemWizardPage page1; + private ImportToServerWizardPage page1; private final Node folder; - private ImportFileSystemHandler ifsh = new ImportFileSystemHandler(); - public ImportFileSystemWizard(Node folder) { this.folder = folder; - setNeedsProgressMonitor(ifsh.getNeedsProgressMonitor()); + setNeedsProgressMonitor(page1.getNeedsProgressMonitor()); setWindowTitle("Import from file system"); } @Override public void addPages() { try { - page1 = new ImportFileSystemWizardPage(); + page1 = new ImportToServerWizardPage(); addPage(page1); } catch (Exception e) { e.printStackTrace(); @@ -58,7 +55,7 @@ public class ImportFileSystemWizard extends Wizard { final String objectPath = page1.getObjectPath(); // We do not display a progress bar for one file only - if ("nt:file".equals(objectType)) { + if (page1.FILE_ITEM_TYPE.equals(objectType)) { // In Rap we must force the "real" upload of the file page1.performFinish(); try { @@ -82,7 +79,7 @@ public class ImportFileSystemWizard extends Wizard { return false; } return true; - } else if ("nt:folder".equals(objectType)) { + } else if (page1.FOLDER_ITEM_TYPE.equals(objectType)) { if (objectPath == null || !new File(objectPath).exists()) { Error.show("Directory " + objectPath + " does not exist"); return false;