<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.argeo.commons.base</groupId>
<artifactId>org.argeo.eclipse.dep.rap</artifactId>
<name>Commons Eclipse RAP Dependencies</name>
<properties>
- <version.rap>1.3.2</version.rap>
+ <version.rap>2.1.0-M1-20130318-2137</version.rap>
</properties>
<build>
<plugins>
</plugins>
</build>
<dependencies>
- <dependency>
- <groupId>org.argeo.tp</groupId>
- <artifactId>org.eclipse.osgi</artifactId>
- </dependency>
+<!-- <dependency> -->
+<!-- <groupId>org.argeo.tp</groupId> -->
+<!-- <artifactId>org.eclipse.osgi</artifactId> -->
+<!-- </dependency> -->
<dependency>
<groupId>org.argeo.tp.rap.platform</groupId>
<artifactId>binaries</artifactId>
- <version>${version.argeo-distribution}</version>
+ <version>${version.rap}</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>org.argeo.tp.rap.platform</groupId>
<artifactId>org.eclipse.equinox.http.jetty</artifactId>
</exclusion>
+<!-- <exclusion> -->
+<!-- <groupId>org.argeo.tp.rap.platform</groupId> -->
+<!-- <artifactId>org.mortbay.jetty.server</artifactId> -->
+<!-- </exclusion> -->
+<!-- <exclusion> -->
+<!-- <groupId>org.argeo.tp.rap.platform</groupId> -->
+<!-- <artifactId>org.mortbay.jetty.util</artifactId> -->
+<!-- </exclusion> -->
+ <exclusion>
+ <groupId>org.argeo.tp.rap.platform</groupId>
+ <artifactId>org.eclipse.jetty.security</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.argeo.tp.rap.platform</groupId>
+ <artifactId>org.eclipse.jetty.http</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.argeo.tp.rap.platform</groupId>
+ <artifactId>org.eclipse.jetty.server</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.argeo.tp.rap.platform</groupId>
+ <artifactId>org.eclipse.jetty.continuation</artifactId>
+ </exclusion>
<exclusion>
<groupId>org.argeo.tp.rap.platform</groupId>
- <artifactId>org.mortbay.jetty.server</artifactId>
+ <artifactId>org.eclipse.jetty.util</artifactId>
</exclusion>
<exclusion>
<groupId>org.argeo.tp.rap.platform</groupId>
- <artifactId>org.mortbay.jetty.util</artifactId>
+ <artifactId>org.eclipse.jetty.io</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.argeo.tp.rap.platform</groupId>
+ <artifactId>org.eclipse.jetty.servlet</artifactId>
</exclusion>
<!-- Demo -->
<groupId>org.argeo.tp.rap.platform</groupId>
<artifactId>org.eclipse.rap.design.example</artifactId>
</exclusion>
-
+
<!-- Troublesome bundles -->
<exclusion>
<groupId>org.argeo.tp.rap.platform</groupId>
<groupId>org.argeo.tp.rap.platform</groupId>
<artifactId>org.eclipse.rap.junit.runtime</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>org.argeo.tp.rap.platform</groupId>
+ <artifactId>org.eclipse.rap.rwt.testfixture</artifactId>
+ </exclusion>
</exclusions>
</dependency>
<!-- Dependency to enable file upload. Should be included directly in coming
rap distribution -->
- <dependency>
- <groupId>org.argeo.tp.rap</groupId>
- <artifactId>org.eclipse.rwt.widgets.upload</artifactId>
- </dependency>
+<!-- <dependency> -->
+<!-- <groupId>org.argeo.tp.rap</groupId> -->
+<!-- <artifactId>org.eclipse.rwt.widgets.upload</artifactId> -->
+<!-- </dependency> -->
<!-- Needed by the bundle above -->
<dependency>
<groupId>org.argeo.tp</groupId>
<artifactId>org.eclipse.equinox.security</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.argeo.commons.base</groupId>
+ <artifactId>org.argeo.osgi.boot</artifactId>
+ <version>2.1.1.tp-SNAPSHOT</version>
+ </dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.argeo.tp.rap.platform</groupId>
<artifactId>binaries</artifactId>
- <version>${version.argeo-distribution}</version>
+ <version>${version.rap}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<configuration>
<target>
<copy todir="${rpm.stagingRepository}" verbose="true">
- <fileset dir="${project.build.directory}/rpm" includes="*/RPMS/**/*.rpm" />
+ <fileset dir="${project.build.directory}/rpm"
+ includes="*/RPMS/**/*.rpm" />
<flattenmapper />
</copy>
</target>
<instructions>
<Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy>
<Bundle-Activator>org.argeo.eclipse.ui.ArgeoUiPlugin</Bundle-Activator>
- <Require-Bundle>org.eclipse.rap.ui,org.eclipse.rwt.widgets.upload,org.eclipse.core.runtime</Require-Bundle>
+ <Require-Bundle>org.eclipse.rap.ui,org.eclipse.core.runtime</Require-Bundle>
<!-- IMPORTANT : Note that we must exclude certain packages that are
provided by dependencies to be sure that packages used in the current workspace
are those provided by the require-bundles. Especially rwt.widgets.upload
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletRequest;
import org.argeo.ArgeoException;
-import org.eclipse.rwt.RWT;
-import org.eclipse.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.RWT;
+import org.eclipse.rap.rwt.service.IServiceHandler;
public class DownloadServiceHandler implements IServiceHandler {
this.provider = provider;
}
- public void service() throws IOException, ServletException {
+ public void service( HttpServletRequest request, HttpServletResponse response ) throws IOException, ServletException {
// Which file to download?
- String fileName = RWT.getRequest().getParameter("filename");
- String fileId = RWT.getRequest().getParameter("fileid");
+ String fileName = request.getParameter("filename");
+ String fileId = request.getParameter("fileid");
// Get the file content
byte[] download = provider.getByteArrayFileFromId(fileId);
// Send the file in the response
- HttpServletResponse response = RWT.getResponse();
response.setContentType("application/octet-stream");
response.setContentLength(download.length);
String contentDisposition = "attachment; filename=\"" + fileName + "\"";
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.eclipse.rwt.RWT;
-import org.eclipse.rwt.service.IServiceHandler;
-import org.eclipse.rwt.service.IServiceManager;
-import org.eclipse.ui.PlatformUI;
/**
* RAP SPECIFIC handler to enable the opening of a download dialog box triggered
*
* Manages the process of forwarding the request to the handler at runtime to
* open the dialog box
- *
+ * encodedURL
*/
public class FileHandler {
public final static String FORCED_DOWNLOAD_URL_BASE_PROPERTY = "argeo.rap.specific.forcedDownloadUrlBase";
public FileHandler(FileProvider provider) {
// Instantiate and register the DownloadServicHandler.
- IServiceManager manager = RWT.getServiceManager();
- IServiceHandler handler = new DownloadServiceHandler(provider);
- manager.registerServiceHandler("downloadServiceHandler", handler);
+ // IServiceManager manager = RWT.getServiceManager();
+ // IServiceHandler handler = new DownloadServiceHandler(provider);
+ // manager.registerServiceHandler("downloadServiceHandler", handler);
}
public void openFile(String fileName, String fileId) {
log.trace("URL : " + createFullDownloadUrl(fileName, fileId));
URL url = new URL(createFullDownloadUrl(fileName, fileId));
- PlatformUI.getWorkbench().getBrowserSupport()
- .createBrowser("DownloadDialog").openURL(url);
+ // PlatformUI.getWorkbench().getBrowserSupport()
+ // .createBrowser("DownloadDialog").openURL(url);
} catch (Exception e) {
e.printStackTrace();
}
.getProperty(FORCED_DOWNLOAD_URL_BASE_PROPERTY);
if (forcedDownloadUrlBase != null)
url.append(forcedDownloadUrlBase);
- else
- url.append(RWT.getRequest().getRequestURL());
+ // else
+ // url.append(RWT.getRequest().getRequestURL());
url.append(createParamUrl(fileName, fileId));
return url.toString();
}
private String createParamUrl(String filename, String fileId) {
StringBuilder url = new StringBuilder();
url.append("?");
- url.append(IServiceHandler.REQUEST_PARAM);
+ // url.append(IServiceHandler.REQUEST_PARAM);
url.append("=downloadServiceHandler");
url.append("&filename=");
url.append(filename);
url.append("&fileid=");
url.append(fileId);
- String encodedURL = RWT.getResponse().encodeURL(url.toString());
- return encodedURL;
+ // String encodedURL = RWT.getResponse().encodeURL(url.toString());
+ return url.toString();
}
}
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.argeo.ArgeoException;
-import org.eclipse.rwt.widgets.Upload;
+//import org.eclipse.rap.rwt.widgets.Upload;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.layout.GridData;
private final static Log log = LogFactory
.getLog(GenericUploadControl.class);
- private Upload upload;
+ //private Upload upload;
public GenericUploadControl(Composite parent, int style, String browseLabel) {
super(parent, style);
parent.setLayout(new GridLayout(1, false));
parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- upload = new Upload(parent, SWT.BORDER);
- upload.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
- upload.setBrowseButtonText(browseLabel);
+// upload = new Upload(parent, SWT.BORDER);
+// upload.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+// upload.setBrowseButtonText(browseLabel);
// upload.addModifyListener(new UploadListener());
parent.pack();
}
* file. This method can be called even if the upload has not finished yet.
*/
public String getLastFileUploadedName() {
- return upload.getLastFileUploaded();
+ return "";
}
public boolean isControlEmpty() {
- String path = upload.getPath();
+ String path = "";
if (log.isTraceEnabled())
log.trace("UploadControl chosen path : " + path);
if (path == null || "".equals(path.trim()))
}
public byte[] performUpload() {
- boolean success = upload.performUpload();
- if (success) {
- if (upload.getUploadItem().getFileSize() == -1)
- throw new ArgeoException("File "
- + upload.getUploadItem().getFileName()
- + " has not been uploaded, its size is -1");
-
- InputStream inStream = null;
- byte[] fileBA = null;
- try {
- inStream = upload.getUploadItem().getFileInputStream();
- fileBA = IOUtils.toByteArray(inStream);
- } catch (Exception e) {
- throw new ArgeoException("Cannot read uploaded data", e);
- } finally {
- IOUtils.closeQuietly(inStream);
- }
- return fileBA;
- }
+// boolean success = upload.performUpload();
+// if (success) {
+// if (upload.getUploadItem().getFileSize() == -1)
+// throw new ArgeoException("File "
+// + upload.getUploadItem().getFileName()
+// + " has not been uploaded, its size is -1");
+//
+// InputStream inStream = null;
+// byte[] fileBA = null;
+// try {
+// inStream = upload.getUploadItem().getFileInputStream();
+// fileBA = IOUtils.toByteArray(inStream);
+// } catch (Exception e) {
+// throw new ArgeoException("Cannot read uploaded data", e);
+// } finally {
+// IOUtils.closeQuietly(inStream);
+// }
+// return fileBA;
+// }
return null;
}
public void addModifyListener(ModifyListener listener) {
- upload.addModifyListener(listener);
+// upload.addModifyListener(listener);
}
// private class UploadManager extends UploadAdapter {
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.rap.rwt.widgets.Upload;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
public final static String FILE_ITEM_TYPE = "FILE";
public final static String FOLDER_ITEM_TYPE = "FOLDER";
- private Upload uploadFile;
+ //private Upload uploadFile;
public ImportToServerWizardPage() {
super("Import from file system");
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...");
+// uploadFile = new Upload(composite, SWT.BORDER);
+// uploadFile.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
+// uploadFile.setBrowseButtonText("Open...");
setControl(composite);
}
// 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();
+ return null;
}
public String getObjectName() {
- return uploadFile.getUploadItem().getFileName();
+ return null;
}
public String getObjectType() {
}
public void performFinish() {
- boolean success = uploadFile.performUpload();
- if (!success)
- throw new ArgeoException("Cannot upload file named "
- + uploadFile.getPath());
+// boolean success = uploadFile.performUpload();
+// if (!success)
+// throw new ArgeoException("Cannot upload file named "
+// + uploadFile.getPath());
}
- protected void handleUploadFinished(final Upload upload) {
- }
+// protected void handleUploadFinished(final Upload upload) {
+// }
public InputStream getFileInputStream() {
- return uploadFile.getUploadItem().getFileInputStream();
+ return null;
}
public boolean getNeedsProgressMonitor() {
package org.argeo.eclipse.ui.specific;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.rwt.RWT;
+import org.eclipse.rap.rwt.RWT;
/** NLS attached to a given thread */
public class ThreadNLS<T extends NLS> extends InheritableThreadLocal<T> {
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.argeo.commons.base</groupId>
</build>
<dependencies>
<dependency>
- <groupId>org.argeo.tp</groupId>
+ <groupId>org.argeo.tp.rap.platform</groupId>
<artifactId>org.eclipse.osgi</artifactId>
+ <version>3.9.0.v20130305-2200</version>
</dependency>
<!-- TEST -->
<plugin>
<groupId>org.argeo.maven.plugins</groupId>
<artifactId>maven-argeo-osgi-plugin</artifactId>
- <version>1.1.2</version>
+ <version>1.1.3-SNAPSHOT</version>
</plugin>
<!-- Others -->
<plugin>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
+ <repository>
+ <id>argeo-tp-rap</id>
+ <url>http://alma.vpn:7080/data/public/java/org.argeo.tp.rap-2.1.x</url>
+ <releases>
+ <enabled>true</enabled>
+ <updatePolicy>daily</updatePolicy>
+ <checksumPolicy>warn</checksumPolicy>
+ </releases>
+ </repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<entrypoint
id="org.argeo.security.ui.rap.secureEntryPoint"
class="org.argeo.security.ui.rap.SecureEntryPoint"
- parameter="secureWebUi">
+ path="secureWebUi">
</entrypoint>
<entrypoint
id="org.argeo.security.ui.rap.anonymousEntryPoint"
class="org.argeo.security.ui.rap.AnonymousEntryPoint"
- parameter="publicWebUi">
+ path="publicWebUi">
</entrypoint>
<entrypoint
id="org.argeo.security.ui.rap.logoutEntryPoint"
class="org.argeo.security.ui.rap.LogoutEntryPoint"
- parameter="logout">
+ path="logout">
</entrypoint>
<entrypoint
id="org.argeo.security.ui.rap.nullEntryPoint"
class="org.argeo.security.ui.rap.NullEntryPoint"
- parameter="null">
+ path="null">
</entrypoint>
</extension>
import org.apache.commons.logging.LogFactory;
import org.argeo.ArgeoException;
import org.eclipse.equinox.security.auth.ILoginContext;
-import org.eclipse.rwt.RWT;
-import org.eclipse.rwt.lifecycle.IEntryPoint;
+import org.eclipse.rap.rwt.RWT;
+import org.eclipse.rap.rwt.application.IEntryPoint;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.eclipse.equinox.security.auth.ILoginContext;
-import org.eclipse.rwt.RWT;
-import org.eclipse.rwt.lifecycle.IEntryPoint;
+import org.eclipse.rap.rwt.RWT;
+import org.eclipse.rap.rwt.application.IEntryPoint;
import org.eclipse.ui.PlatformUI;
import org.springframework.security.context.SecurityContextHolder;
*/
package org.argeo.security.ui.rap;
-import org.eclipse.rwt.lifecycle.IEntryPoint;
+import org.eclipse.rap.rwt.application.IEntryPoint;
import org.eclipse.ui.PlatformUI;
/**
import org.argeo.util.LocaleUtils;
import org.eclipse.equinox.security.auth.ILoginContext;
import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.rwt.RWT;
-import org.eclipse.rwt.lifecycle.IEntryPoint;
+import org.eclipse.rap.rwt.RWT;
+import org.eclipse.rap.rwt.application.IEntryPoint;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.springframework.security.BadCredentialsException;