]> git.argeo.org Git - lgpl/argeo-commons.git/blob - eclipse/runtime/org.argeo.eclipse.ui.rcp/src/main/java/org/argeo/eclipse/ui/specific/ImportFileSystemWizardPage.java
Implementation of file handlers for both RCP & RAP
[lgpl/argeo-commons.git] / eclipse / runtime / org.argeo.eclipse.ui.rcp / src / main / java / org / argeo / eclipse / ui / specific / ImportFileSystemWizardPage.java
1 package org.argeo.eclipse.ui.specific;
2
3 import java.io.InputStream;
4
5 import org.eclipse.jface.preference.DirectoryFieldEditor;
6 import org.eclipse.jface.wizard.WizardPage;
7 import org.eclipse.swt.widgets.Composite;
8
9 public class ImportFileSystemWizardPage extends WizardPage {
10 private DirectoryFieldEditor dfe;
11
12 public ImportFileSystemWizardPage() {
13 super("Import from file system");
14 setDescription("Import files from the local file system into the JCR repository");
15 }
16
17 public void createControl(Composite parent) {
18 dfe = new DirectoryFieldEditor("directory", "From", parent);
19 setControl(dfe.getTextControl(parent));
20 }
21
22 public String getObjectPath() {
23 System.out.println("dfe.getStringValue() : " + dfe.getStringValue());
24 return dfe.getStringValue();
25 }
26
27 public String getObjectType() {
28 return "nt:folder";
29 }
30
31 // Dummy methods : useless in RCP context but useful for RAP
32 /** WARNING : always return null in RCP context */
33 public String getObjectName() {
34 return null;
35 }
36
37 /** WARNING : di nothing in RCP context */
38 public void performFinish() {
39 }
40
41 /** WARNING : always return null in RCP context */
42 public InputStream getFileInputStream() {
43 return null;
44 }
45
46 }