]> git.argeo.org Git - lgpl/argeo-commons.git/blob - ImportToServerWizardPage.java
e37fb915573e4f0998d1d50f33768dd61d321ffd
[lgpl/argeo-commons.git] / ImportToServerWizardPage.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 ImportToServerWizardPage extends WizardPage {
10
11 public final static String FILE_ITEM_TYPE = "FILE";
12 public final static String FOLDER_ITEM_TYPE = "FOLDER";
13
14 private DirectoryFieldEditor dfe;
15
16 public ImportToServerWizardPage() {
17 super("Import from file system");
18 setDescription("Import files from the local file system into the JCR repository");
19 }
20
21 public void createControl(Composite parent) {
22 dfe = new DirectoryFieldEditor("directory", "From", parent);
23 setControl(dfe.getTextControl(parent));
24 }
25
26 public String getObjectPath() {
27 return dfe.getStringValue();
28 }
29
30 public String getObjectType() {
31 return FOLDER_ITEM_TYPE;
32 }
33
34 public boolean getNeedsProgressMonitor() {
35 return true;
36 }
37
38 // Dummy methods : useless in RCP context but useful for RAP
39 /** WARNING : always return null in RCP context */
40 public String getObjectName() {
41 return null;
42 }
43
44 /** WARNING : do nothing in RCP context */
45 public void performFinish() {
46 }
47
48 /** WARNING : always return null in RCP context */
49 public InputStream getFileInputStream() {
50 return null;
51 }
52 }