parser.parse(in);
in.close();
- for (Integer i : lines.keySet()) {
- Map<String, String> curLine = lines.get(i);
- System.out.println("i : " + i.toString() + " - ID :"
- + curLine.get("ID"));
- }
assertEquals(5, lines.size());
}
}
public byte[] getByteArrayFileFromId(String fileId) {
+ InputStream fis = null;
+ byte[] ba = null;
+ Node child = getFileNodeFromId(fileId);
try {
- Object[] nodes = repositoryNode.getChildren();
+ fis = (InputStream) child.getProperty("jcr:data").getBinary()
+ .getStream();
+ ba = IOUtils.toByteArray(fis);
+
+ } catch (Exception e) {
+ throw new ArgeoException("Stream error while opening file", e);
+ } finally {
+ IOUtils.closeQuietly(fis);
+ }
+ return ba;
+ }
+
+ public InputStream getInputStreamFromFileId(String fileId) {
+ try {
+ InputStream fis = null;
+
+ Node child = getFileNodeFromId(fileId);
+ fis = (InputStream) child.getProperty("jcr:data").getBinary()
+ .getStream();
+ return fis;
+ } catch (RepositoryException re) {
+ throw new ArgeoException("Cannot get stream from file node for Id "
+ + fileId, re);
+ }
+ }
+
+ /**
+ * Throws an exception if the node is not found in the current repository (a
+ * bit like a FileNotFoundException)
+ *
+ * @param fileId
+ * @return Returns the child node of the nt:file node. It is the child node
+ * that have the jcr:data property where actual file is stored.
+ * never null
+ */
+ private Node getFileNodeFromId(String fileId) {
+ Object[] nodes = repositoryNode.getChildren();
+ try {
+ Node result = null;
repos: for (int i = 0; i < nodes.length; i++) {
WorkspaceNode wNode = (WorkspaceNode) nodes[i];
- Node node = null;
- node = wNode.getSession().getNodeByIdentifier(fileId);
+ result = wNode.getSession().getNodeByIdentifier(fileId);
- if (node == null)
+ if (result == null)
continue repos;
- if (!node.isNodeType("nt:file"))
+ // Ensure that the node have the correct type.
+ if (!result.isNodeType("nt:file"))
throw new ArgeoException(
"Cannot open file children Node that are not of 'nt:resource' type.");
- Node child = node.getNodes().nextNode();
- if (!child.isNodeType("nt:resource"))
+ Node child = result.getNodes().nextNode();
+ if (child == null || !child.isNodeType("nt:resource"))
throw new ArgeoException(
- "Cannot open file children Node that are not of 'nt:resource' type.");
+ "ERROR: IN the current implemented model, nt:file file node must have one and only one child of the nt:ressource, where actual data is stored");
- InputStream fis = null;
- byte[] ba = null;
- try {
- fis = (InputStream) child.getProperty("jcr:data")
- .getBinary().getStream();
- ba = IOUtils.toByteArray(fis);
-
- } catch (Exception e) {
- throw new ArgeoException("Stream error while opening file",
- e);
- } finally {
- IOUtils.closeQuietly(fis);
- }
- if (ba != null)
- return ba;
+ return child;
}
-
} catch (RepositoryException re) {
- throw new ArgeoException("RepositoryException while reading file ",
- re);
+ throw new ArgeoException("Erreur while getting file node of ID "
+ + fileId, re);
}
- throw new ArgeoException("File not found for ID " + fileId);
+ throw new ArgeoException("File node not found for ID" + fileId);
}
}
package org.argeo.eclipse.ui.jcr.views;
-import java.io.InputStream;
import java.util.Arrays;
import javax.jcr.Node;
import javax.jcr.PropertyType;
import javax.jcr.RepositoryException;
-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.jcr.browser.NodeContentProvider;
import org.argeo.eclipse.ui.jcr.browser.NodeLabelProvider;
import org.argeo.eclipse.ui.jcr.browser.PropertiesContentProvider;
@Override
public void createPartControl(Composite parent) {
- /*
- * TEST
- */
// Instantiate the generic object that fits for
// both RCP & RAP, must be final to be accessed in the double click
final JcrFileProvider jfp = new JcrFileProvider();
final FileHandler fh = new FileHandler(jfp);
- /*
- * TEST END
- */
-
parent.setLayout(new FillLayout());
SashForm sashForm = new SashForm(parent, SWT.VERTICAL);
if (obj instanceof RepositoryNode) {
RepositoryNode rpNode = (RepositoryNode) obj;
rpNode.login();
- // For the file provider to be able to browse the repo.
+ // For the file provider to be able to browse the various
+ // repository.
// TODO : enhanced that.
jfp.setRepositoryNode(rpNode);
-
nodesViewer.refresh(obj);
+
} else if (obj instanceof WorkspaceNode) {
((WorkspaceNode) obj).login();
nodesViewer.refresh(obj);
- } // call the openFile commands on node
- else if (obj instanceof Node) {
- // Shell shell =
- // aup.getWorkbench().getActiveWorkbenchWindow()
- // .getShell();
- // we can also do
- // event.getViewer().getControl().getShell();
-
- // Browser browser = new Browser(shell, SWT.NONE);
- // browser.setText(encodedURL);
- // boolean check = browser.setUrl(encodedURL);
- // System.out.println("soo ?? : " + check);
- // System.out.println("script : " + browser.executeScript);
-
- // try {
- // RWT.getResponse().sendRedirect(encodedURL);
- // } catch (IOException e1) {
- // // TODO Auto-generated catch block
- // e1.printStackTrace();
- // }
-
- // final Browser browser = new Browser(parent, SWT.NONE);
- // browser.setText(createDownloadHtml("test.pdf",
- // "Download file"));
-
+ } else if (obj instanceof Node) {
Node node = (Node) obj;
+
+ // double clic on a file node triggers its opening
try {
if (node.isNodeType("nt:file")) {
String name = node.getName();
String id = node.getIdentifier();
-
- Node child = node.getNodes().nextNode();
- if (!child.isNodeType("nt:resource")) {
- Error.show("Cannot open file children Node that are not of 'nt:resource' type.");
- return;
- }
-
- InputStream fis = null;
-
- try {
- fis = (InputStream) child
- .getProperty("jcr:data").getBinary()
- .getStream();
- // Instantiate the generic object that fits for
- // both RCP & RAP.
- fh.openFile(name, id, fis);
- } catch (Exception e) {
- throw new ArgeoException(
- "Stream error while opening file", e);
- } finally {
- IOUtils.closeQuietly(fis);
- }
+ fh.openFile(name, id);
}
} catch (RepositoryException re) {
- re.printStackTrace();
-
+ throw new ArgeoException(
+ "Repository error while getting Node file info",
+ re);
}
-
}
-
}
});
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;
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();
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 {
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;
package org.argeo.eclipse.ui.specific;
-import java.io.InputStream;
import java.net.URL;
import org.apache.commons.logging.Log;
IServiceManager manager = RWT.getServiceManager();
IServiceHandler handler = new DownloadServiceHandler(provider);
manager.registerServiceHandler("downloadServiceHandler", handler);
-
}
- public void openFile(String fileName, String fileId, InputStream is) {
+ public void openFile(String fileName, String fileId) {
+
+ // See RAP FAQ:
+ // http://wiki.eclipse.org/RAP/FAQ#How_to_provide_download_link.3F
+ // And forum discussion :
+ // http://www.eclipse.org/forums/index.php?t=msg&th=205487&start=0&S=43d85dacc88b505402420592109c7240
+
try {
if (log.isDebugEnabled())
log.debug("URL : " + createFullDownloadUrl(fileName, fileId));
URL url = new URL(createFullDownloadUrl(fileName, fileId));
PlatformUI.getWorkbench().getBrowserSupport()
.createBrowser("DownloadDialog").openURL(url);
-
- /*
- * // New try : must define a service handler for the current file,
- * // register it and redirect the URL to it.
- *
- * // workaround : create a tmp file. String prefix = "", suffix =
- * ""; if (fileName != null) { int ind = fileName.lastIndexOf('.');
- * if (ind > 0) { prefix = fileName.substring(0, ind); suffix =
- * fileName.substring(ind); } }
- *
- * File tmpFile = createTmpFile(prefix, suffix, is);
- * HttpServletResponse response = RWT.getResponse();
- *
- * DownloadHandler dh = new DownloadHandler(tmpFile.getName(),
- * tmpFile, "application/pdf", fileName);
- *
- * log.debug("Got a DH : " + dh.toString());
- *
- * // TODO : should try with that. // String encodedURL =
- * RWT.getResponse().encodeURL(url.toString());
- * response.sendRedirect(dh.getURL());
- */
-
- // final Browser browser = new Browser(parent, SWT.NONE);
- // browser.setText(createDownloadHtml("test.pdf", "Download file"));
-
} catch (Exception e) {
e.printStackTrace();
}
- // // Which file to download?
- // String fileName = RWT.getRequest().getParameter( "filename" );
- // // Get the file content
- // byte[] download = MyDataStore.getByteArrayData( fileName );
- // // Send the file in the response
- // HttpServletResponse response = RWT.getResponse();
- // response.setContentType( "application/octet-stream" );
- // response.setContentLength( download.length );
- // String contentDisposition = "attachment; filename=\"" + fileName +
- // "\"";
- // response.setHeader( "Content-Disposition", contentDisposition );
- // try {
- // response.getOutputStream().write( download );
- // } catch( IOException e1 ) {
- // e1.printStackTrace();
- // }
- //
- //
-
- /**
- * try {
- *
- * // / workaround : create a tmp file. String prefix = "", suffix = "";
- * if (fileName != null) { int ind = fileName.lastIndexOf('.'); if (ind
- * > 0) { prefix = fileName.substring(0, ind); suffix =
- * fileName.substring(ind); } }
- *
- * File tmpFile = createTmpFile(prefix, suffix, is);
- *
- * // Send the file in the response HttpServletResponse response =
- * RWT.getResponse(); byte[] ba = null; ba =
- * FileUtils.readFileToByteArray(tmpFile);
- *
- * long l = tmpFile.length();
- *
- * if (l < Integer.MIN_VALUE || l > Integer.MAX_VALUE) throw new
- * ArgeoException("IllegalArgumentException : " + l +
- * " cannot be cast to int without changing its value.");
- * response.setContentLength((int) l);
- *
- * // response.setContentLength(ba.length);
- *
- * // String contentDisposition = "attachment; filename=\"" + fileName
- * // + "\""; String contentDisposition = "attachment; filename=\"" +
- * fileName + "\"";
- * response.setContentType("application/force-download");
- * response.setHeader("Content-Disposition", contentDisposition);
- * response.setHeader("Content-Transfer-Encoding", "binary");
- * response.setHeader("Pragma", "no-cache");
- * response.setHeader("Cache-Control", "no-cache, must-revalidate");
- *
- * // must-revalidate");
- *
- * if (log.isDebugEnabled()) { log.debug("Header Set "); }
- *
- * // header("Content-Type: application/force-download; name=\"".
- * $localName."\""); // 852 header("Content-Transfer-Encoding: binary");
- * // 853 if($gzip){ // 854 header("Content-Encoding: gzip"); // 855 //
- * If gzip, recompute data size! // 856 $gzippedData = //
- * ($data?gzencode
- * ($filePathOrData,9):gzencode(file_get_contents($filePathOrData), //
- * 9)); // 857 $size = strlen($gzippedData); // 858 } // 859
- * header("Content-Length: ".$size); // 860 if ($isFile && ($size != 0))
- * header("Content-Range: bytes 0-" // . ($size - 1) . "/" . $size .
- * ";"); // 861 //
- * header("Content-Disposition: attachment; filename=\"".
- * $localName."\""); // 862 header("Expires: 0"); // 863
- * header("Cache-Control: no-cache, must-revalidate"); // 864
- * header("Pragma: no-cache");
- *
- * // IOUtils.copy(is, response.getOutputStream());
- * response.getOutputStream().write(ba); //
- * Error.show("In Open File for RAP.");
- *
- *
- *
- *
- * } catch (IOException ioe) {
- *
- * throw new ArgeoException("Cannot copy input stream from file " +
- * fileName + " to HttpServletResponse", ioe); }
- */
-
+ // These lines are useless in the current use case but might be
+ // necessary with new browsers. Stored here for memo
+ // response.setContentType("application/force-download");
+ // response.setHeader("Content-Disposition", contentDisposition);
+ // response.setHeader("Content-Transfer-Encoding", "binary");
+ // response.setHeader("Pragma", "no-cache");
+ // response.setHeader("Cache-Control", "no-cache, must-revalidate");
}
- // private File createTmpFile(String prefix, String suffix, InputStream is)
- // {
- // File tmpFile = null;
- // OutputStream os = null;
- // try {
- // tmpFile = File.createTempFile(prefix, suffix);
- // os = new FileOutputStream(tmpFile);
- // IOUtils.copy(is, os);
- // } catch (IOException e) {
- // throw new ArgeoException("Cannot open file " + prefix + "."
- // + suffix, e);
- // } finally {
- // IOUtils.closeQuietly(os);
- // }
- // return tmpFile;
- // }
-
private String createFullDownloadUrl(String fileName, String fileId) {
StringBuilder url = new StringBuilder();
url.append(RWT.getRequest().getRequestURL());
package org.argeo.eclipse.ui.specific;
+import java.io.InputStream;
+
/**
* Used for file download : subclasses must implement model specific methods to
* get a byte array representing a file given is ID.
public interface FileProvider {
public byte[] getByteArrayFileFromId(String fileId);
+ public InputStream getInputStreamFromFileId(String fileId);
}
+++ /dev/null
-package org.argeo.eclipse.ui.specific;
-
-public class ImportFileSystemHandler {
- public boolean getNeedsProgressMonitor() {
- return false;
- }
-}
+++ /dev/null
-package org.argeo.eclipse.ui.specific;
-
-import java.io.InputStream;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.argeo.ArgeoException;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.rwt.widgets.Upload;
-import org.eclipse.swt.SWT;
-import org.eclipse.swt.layout.GridData;
-import org.eclipse.swt.layout.GridLayout;
-import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Label;
-
-public class ImportFileSystemWizardPage extends WizardPage {
- private final static Log log = LogFactory.getLog(ImportFileSystemWizardPage.class);
-
- private Upload uploadFile;
-
- public ImportFileSystemWizardPage() {
- super("Import from file system");
- setDescription("Import files from the local file system into the JCR repository");
- }
-
- public void createControl(Composite parent) {
- Composite composite = new Composite(parent, SWT.NONE);
- composite.setLayout(new GridLayout(2, false));
- composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- new Label(composite, SWT.NONE).setText("Pick up a file");
- uploadFile = new Upload(composite, SWT.BORDER);
- uploadFile.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- uploadFile.setBrowseButtonText("Open...");
- setControl(composite);
- }
-
- public String getObjectPath() {
- // NOTE Returns the full file name of the last uploaded file including
- // the file path as selected by the user on his local machine.
- // The full path including the directory and file drive are only
- // returned, if the browser supports reading this properties. In Firefox
- // 3, only the filename is returned.
- return uploadFile.getPath();
- }
-
- public String getObjectName() {
- return uploadFile.getUploadItem().getFileName();
- }
-
- public String getObjectType() {
- return "nt:file";
- }
-
- public void performFinish() {
- boolean success = uploadFile.performUpload();
- if (!success)
- throw new ArgeoException("Cannot upload file named "
- + uploadFile.getPath());
- }
-
- protected void handleUploadFinished(final Upload upload) {
- }
-
- public InputStream getFileInputStream() {
- return uploadFile.getUploadItem().getFileInputStream();
- }
-}
--- /dev/null
+package org.argeo.eclipse.ui.specific;
+
+import java.io.InputStream;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.argeo.ArgeoException;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.rwt.widgets.Upload;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+
+public class ImportToServerWizardPage extends WizardPage {
+ private final static Log log = LogFactory
+ .getLog(ImportToServerWizardPage.class);
+
+ public final static String FILE_ITEM_TYPE = "FILE";
+ public final static String FOLDER_ITEM_TYPE = "FOLDER";
+
+ private Upload uploadFile;
+
+ public ImportToServerWizardPage() {
+ super("Import from file system");
+ setDescription("Import files from the local file system to the server");
+ }
+
+ public void createControl(Composite parent) {
+ Composite composite = new Composite(parent, SWT.NONE);
+ composite.setLayout(new GridLayout(2, false));
+ composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ new Label(composite, SWT.NONE).setText("Pick up a file");
+ uploadFile = new Upload(composite, SWT.BORDER);
+ uploadFile.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+ uploadFile.setBrowseButtonText("Open...");
+ setControl(composite);
+ }
+
+ public String getObjectPath() {
+ // NOTE Returns the full file name of the last uploaded file including
+ // the file path as selected by the user on his local machine.
+ // The full path including the directory and file drive are only
+ // returned, if the browser supports reading this properties. In Firefox
+ // 3, only the filename is returned.
+ return uploadFile.getPath();
+ }
+
+ public String getObjectName() {
+ return uploadFile.getUploadItem().getFileName();
+ }
+
+ public String getObjectType() {
+ return FILE_ITEM_TYPE;
+ }
+
+ public void performFinish() {
+ boolean success = uploadFile.performUpload();
+ if (!success)
+ throw new ArgeoException("Cannot upload file named "
+ + uploadFile.getPath());
+ }
+
+ protected void handleUploadFinished(final Upload upload) {
+ }
+
+ public InputStream getFileInputStream() {
+ return uploadFile.getUploadItem().getFileInputStream();
+ }
+
+ public boolean getNeedsProgressMonitor() {
+ return false;
+ }
+
+}
*/
public class FileHandler {
- // unused file provider : collateral effects of single sourcing, this File
- // provider is compulsory for RAP file handler
- public FileHandler(FileProvider jfp) {
- }
+ private FileProvider provider;
- public void openFile(String fileName, String fileId, InputStream is) {
+ public FileHandler(FileProvider provider) {
+ this.provider = provider;
+ }
+ public void openFile(String fileName, String fileId) {
+ String tmpFileName = fileName;
String prefix = "", extension = "";
if (fileName != null) {
int ind = fileName.lastIndexOf('.');
}
}
- File file = createTmpFile(prefix, extension, is);
-
+ InputStream is = null;
try {
+ is = provider.getInputStreamFromFileId(fileId);
+ File file = createTmpFile(prefix, extension, is);
+ tmpFileName = file.getName();
Desktop desktop = null;
if (Desktop.isDesktopSupported()) {
desktop = Desktop.getDesktop();
}
desktop.open(file);
} catch (IOException e) {
- throw new ArgeoException("Cannot open file " + file.getName(), e);
- }
- }
-
- private void openFile(File file) {
- try {
- Desktop desktop = null;
- if (Desktop.isDesktopSupported()) {
- desktop = Desktop.getDesktop();
- desktop.open(file);
- } else {
- throw new ArgeoException("Desktop integration not supported.");
- }
- } catch (IOException e) {
- throw new ArgeoException("Cannot open file " + file.getName(), e);
+ // Note : tmpFileName = fileName if the error has been thrown while
+ // creating the tmpFile.
+ throw new ArgeoException("Cannot open file " + tmpFileName, e);
+ } finally {
+ IOUtils.closeQuietly(is);
}
}
}
return tmpFile;
}
-
}
package org.argeo.eclipse.ui.specific;
+import java.io.InputStream;
+
/**
* Used for file download : subclasses must implement model specific methods to
* get a byte array representing a file given is ID.
public interface FileProvider {
public byte[] getByteArrayFileFromId(String fileId);
+
+ public InputStream getInputStreamFromFileId(String fileId);
}
+++ /dev/null
-package org.argeo.eclipse.ui.specific;
-
-public class ImportFileSystemHandler {
- public boolean getNeedsProgressMonitor() {
- return true;
- }
-
-
-
-}
+++ /dev/null
-package org.argeo.eclipse.ui.specific;
-
-import java.io.InputStream;
-
-import org.eclipse.jface.preference.DirectoryFieldEditor;
-import org.eclipse.jface.wizard.WizardPage;
-import org.eclipse.swt.widgets.Composite;
-
-public class ImportFileSystemWizardPage extends WizardPage {
- private DirectoryFieldEditor dfe;
-
- public ImportFileSystemWizardPage() {
- super("Import from file system");
- setDescription("Import files from the local file system into the JCR repository");
- }
-
- public void createControl(Composite parent) {
- dfe = new DirectoryFieldEditor("directory", "From", parent);
- setControl(dfe.getTextControl(parent));
- }
-
- public String getObjectPath() {
- System.out.println("dfe.getStringValue() : " + dfe.getStringValue());
- return dfe.getStringValue();
- }
-
- public String getObjectType() {
- return "nt:folder";
- }
-
- // Dummy methods : useless in RCP context but useful for RAP
- /** WARNING : always return null in RCP context */
- public String getObjectName() {
- return null;
- }
-
- /** WARNING : di nothing in RCP context */
- public void performFinish() {
- }
-
- /** WARNING : always return null in RCP context */
- public InputStream getFileInputStream() {
- return null;
- }
-
-}
--- /dev/null
+package org.argeo.eclipse.ui.specific;
+
+import java.io.InputStream;
+
+import org.eclipse.jface.preference.DirectoryFieldEditor;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.swt.widgets.Composite;
+
+public class ImportToServerWizardPage extends WizardPage {
+
+ public final static String FILE_ITEM_TYPE = "FILE";
+ public final static String FOLDER_ITEM_TYPE = "FOLDER";
+
+ private DirectoryFieldEditor dfe;
+
+ public ImportToServerWizardPage() {
+ super("Import from file system");
+ setDescription("Import files from the local file system into the JCR repository");
+ }
+
+ public void createControl(Composite parent) {
+ dfe = new DirectoryFieldEditor("directory", "From", parent);
+ setControl(dfe.getTextControl(parent));
+ }
+
+ public String getObjectPath() {
+ return dfe.getStringValue();
+ }
+
+ public String getObjectType() {
+ return FOLDER_ITEM_TYPE;
+ }
+
+ public boolean getNeedsProgressMonitor() {
+ return true;
+ }
+
+ // Dummy methods : useless in RCP context but useful for RAP
+ /** WARNING : always return null in RCP context */
+ public String getObjectName() {
+ return null;
+ }
+
+ /** WARNING : do nothing in RCP context */
+ public void performFinish() {
+ }
+
+ /** WARNING : always return null in RCP context */
+ public InputStream getFileInputStream() {
+ return null;
+ }
+}
\ No newline at end of file
+++ /dev/null
-argeo.osgi.start=\
-com.springsource.javax.servlet,\
-org.eclipse.core.runtime,\
-org.eclipse.equinox.common,\
-org.eclipse.equinox.http.jetty,\
-org.eclipse.equinox.http.registry,\
-org.eclipse.equinox.launcher,\
-org.eclipse.rap.demo,\
-org.mortbay.jetty.server,\
-org.springframework.osgi.extender,\
-org.argeo.server.ads.server,\
-org.argeo.security.manager.ldap,\
-org.argeo.security.services,\
-org.argeo.security.equinox,\
-org.argeo.security.ui,\
-org.argeo.security.ui.rcp,\
-
-eclipse.ignoreApp=true
-osgi.noShutdown=true
-
-log4j.configuration=file:../../log4j.properties
-
-org.eclipse.equinox.http.jetty.log.stderr.threshold=debug
-org.osgi.service.http.port=9090