<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-R-20130611-2139</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>javax.servlet</artifactId>
- </exclusion>
+<!-- <exclusion> -->
+<!-- <groupId>org.argeo.tp.rap.platform</groupId> -->
+<!-- <artifactId>javax.servlet</artifactId> -->
+<!-- </exclusion> -->
<!-- Jetty -->
- <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.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.eclipse.jetty.util</artifactId> -->
+<!-- </exclusion> -->
+<!-- <exclusion> -->
+<!-- <groupId>org.argeo.tp.rap.platform</groupId> -->
+<!-- <artifactId>org.eclipse.jetty.io</artifactId> -->
+<!-- </exclusion> -->
+<!-- <exclusion> -->
+<!-- <groupId>org.argeo.tp.rap.platform</groupId> -->
+<!-- <artifactId>org.eclipse.jetty.servlet</artifactId> -->
+<!-- </exclusion> -->
<!-- Demo -->
<exclusion>
<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.2-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>
<dependency>
<groupId>org.argeo.tp</groupId>
<artifactId>org.eclipse.osgi</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<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 java.io.IOException;
import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.argeo.ArgeoException;
-import org.eclipse.rwt.RWT;
-import org.eclipse.rwt.service.IServiceHandler;
+import org.eclipse.rap.rwt.service.ServiceHandler;
-public class DownloadServiceHandler implements IServiceHandler {
+public class DownloadServiceHandler implements ServiceHandler {
private FileProvider provider;
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 + "\"";
*/
package org.argeo.eclipse.ui.specific;
-import java.net.URL;
-
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;
+import org.eclipse.rap.rwt.RWT;
+import org.eclipse.rap.rwt.client.service.UrlLauncher;
+import org.eclipse.rap.rwt.service.ServiceHandler;
/**
* RAP SPECIFIC handler to enable the opening of a download dialog box triggered
* instantiation time.
*
* Manages the process of forwarding the request to the handler at runtime to
- * open the dialog box
- *
+ * open the dialog box encodedURL
*/
public class FileHandler {
public final static String FORCED_DOWNLOAD_URL_BASE_PROPERTY = "argeo.rap.specific.forcedDownloadUrlBase";
-
+ public final static String DOWNLOAD_SERVICE_NAME = "download";
private final static Log log = LogFactory.getLog(FileHandler.class);
public FileHandler(FileProvider provider) {
- // Instantiate and register the DownloadServicHandler.
- IServiceManager manager = RWT.getServiceManager();
- IServiceHandler handler = new DownloadServiceHandler(provider);
- manager.registerServiceHandler("downloadServiceHandler", handler);
+ ServiceHandler handler = new DownloadServiceHandler(provider);
+ RWT.getServiceManager().registerServiceHandler(DOWNLOAD_SERVICE_NAME,
+ handler);
}
public void openFile(String fileName, String fileId) {
+ // LEGACY
// 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 {
+ String fullDownloadUrl = createFullDownloadUrl(fileName, fileId);
if (log.isTraceEnabled())
- log.trace("URL : " + createFullDownloadUrl(fileName, fileId));
-
- URL url = new URL(createFullDownloadUrl(fileName, fileId));
- PlatformUI.getWorkbench().getBrowserSupport()
- .createBrowser("DownloadDialog").openURL(url);
+ log.trace("URL : " + fullDownloadUrl);
+ // URL url = new URL(fullDownloadUrl);
+ UrlLauncher launcher = RWT.getClient()
+ .getService(UrlLauncher.class);
+ launcher.openURL(fullDownloadUrl);
+ // PlatformUI.getWorkbench().getBrowserSupport()
+ // .createBrowser("DownloadDialog").openURL(url);
} catch (Exception e) {
e.printStackTrace();
}
StringBuilder url = new StringBuilder();
// in case RAP is proxied we need to specify the actual base URL
// TODO find a cleaner way
- String forcedDownloadUrlBase = System
- .getProperty(FORCED_DOWNLOAD_URL_BASE_PROPERTY);
- if (forcedDownloadUrlBase != null)
- url.append(forcedDownloadUrlBase);
- else
- url.append(RWT.getRequest().getRequestURL());
+ // String forcedDownloadUrlBase = System
+ // .getProperty(FORCED_DOWNLOAD_URL_BASE_PROPERTY);
+ // if (forcedDownloadUrlBase != null)
+ // url.append(forcedDownloadUrlBase);
+ // else
+ // url.append(RWT.getRequest().getRequestURL());
+
+ // TODO check how to get that cleanly when coming back online
+ url.append("http://localhost:7070");
+ url.append(RWT.getServiceManager().getServiceHandlerUrl(
+ DOWNLOAD_SERVICE_NAME));
+
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("=downloadServiceHandler");
+ // url.append("?");
+ // url.append(ServiceHandler.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;
+ 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> {
</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 -->
org.argeo.node.repo.jackrabbit,\
org.argeo.security.dao.ldap,\
-argeo.osgi.start.4.node=\
-org.argeo.jackrabbit.webapp,\
-org.argeo.server.rap.webapp,\
-org.argeo.server.catalina.start,\
+#argeo.osgi.start.4.node=\
+#org.argeo.jackrabbit.webapp,\
+#org.argeo.server.rap.webapp,\
+#org.argeo.server.catalina.start,\
+#org.eclipse.equinox.http.registry,\
+#org.springframework.osgi.web.extender,\
+
+#argeo.osgi.start.4.node.jetty=\
+#org.eclipse.jetty.server,\
+#org.eclipse.equinox.http.jetty,\
+#org.eclipse.equinox.http.registry,\
+#org.eclipse.equinox.http.servlet,\
+#org.eclipse.equinox.ds,\
+#org.eclipse.osgi.services,\
+#org.eclipse.equinox.launcher,\
+#org.eclipse.rap.ui.workbench,\
+
+#org.eclipse.rap.rwt,\
+#org.eclipse.rap.rwt.osgi,\
+#org.eclipse.equinox.ds,\
+
+argeo.osgi.start.4.node.rap=\
+org.eclipse.osgi,\
+org.eclipse.osgi.services,\
+org.eclipse.equinox.console,\
+org.apache.felix.gogo.command,\
+org.apache.felix.gogo.shell,\
+org.apache.felix.gogo.runtime,\
+org.eclipse.equinox.http.jetty,\
+org.eclipse.equinox.http.servlet,\
+org.eclipse.equinox.util,\
+org.eclipse.jetty.continuation,\
+org.eclipse.jetty.http,\
+org.eclipse.jetty.io,\
+org.eclipse.jetty.security,\
+org.eclipse.jetty.server,\
+org.eclipse.jetty.servlet,\
+org.eclipse.jetty.util,\
+javax.servlet,\
+org.eclipse.rap.jface,\
+org.eclipse.rap.jface.databinding,\
+org.eclipse.rap.ui,\
+org.eclipse.rap.ui.forms,\
+org.eclipse.rap.ui.views,\
+org.eclipse.rap.ui.workbench,\
+com.ibm.icu.base,\
+org.eclipse.core.commands,\
+org.eclipse.core.contenttype,\
+org.eclipse.core.databinding,\
+org.eclipse.core.databinding.beans,\
+org.eclipse.core.databinding.observable,\
+org.eclipse.core.databinding.property,\
+org.eclipse.core.expressions,\
+org.eclipse.core.jobs,\
+org.eclipse.core.runtime,\
+org.eclipse.equinox.app,\
+org.eclipse.equinox.common,\
+org.eclipse.equinox.registry,\
+org.eclipse.equinox.preferences,\
org.eclipse.equinox.http.registry,\
-org.springframework.osgi.web.extender,\
+
+argeo.osgi.start.5.node.rap=\
+org.eclipse.rap.rwt.osgi,\
+
+#org.argeo.server.catalina.start,\
+#org.eclipse.jetty.server,\
+
+# Jetty
+org.osgi.service.http.port=7070
+org.eclipse.equinox.http.jetty.log.stderr.threshold=info
+org.eclipse.equinox.http.jetty.context.path=/ui
# Initial perspective
#org.argeo.security.ui.initialPerspective=org.argeo.osgi.ui.explorer.perspective
argeo.i18n.availableLocales=en,fr,de,ru,ar
eclipse.registry.MultiLanguage=true
+osgi.noShutdown=true
+eclipse.ignoreApp=true
+
# Tomcat
#argeo.server.port.http=7070
#argeo.server.port.https=7443
<include>WEB-INF/**</include>
<include>icons/**</include>
<include>branding/**</include>
+ <include>img/**</include>
+ <include>theme/**</include>
<include>*.properties</include>
<include>properties/*.properties</include>
<include>p2.inf</include>
<checksumPolicy>warn</checksumPolicy>
</releases>
</repository>
+ <repository>
+ <id>argeo-tp-rap</id>
+ <url>http://repo.argeo.org/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>
<artifactId>org.argeo.security.dep.node</artifactId>
<version>2.1.2-SNAPSHOT</version>
<type>pom</type>
+ <exclusions>
+ <exclusion>
+ <groupId>org.argeo.commons.security</groupId>
+ <artifactId>org.argeo.security.dao.jackrabbit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.argeo.commons.security</groupId>
+ <artifactId>org.argeo.security.dao.os</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.argeo.commons.server</groupId>
+ <artifactId>org.argeo.server.catalina.start</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.argeo.commons.server</groupId>
+ <artifactId>org.argeo.server.webextender</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.argeo.tp</groupId>
+ <artifactId>org.apache.jasper</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.argeo.tp</groupId>
+ <artifactId>org.springframework.osgi.web.extender</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.argeo.commons.security</groupId>
<version>2.1.2-SNAPSHOT</version>
</dependency>
- <!-- For Tomcat deployment -->
+ <!-- For Tomcat deployment
<dependency>
<groupId>org.argeo.commons.server</groupId>
<artifactId>org.argeo.server.rap.webapp</artifactId>
- <version>2.1.2-SNAPSHOT</version>
+ <version>2.1.1.tp-SNAPSHOT</version>
</dependency>
+ -->
</dependencies>
<profiles>
<profile>
<entrypoint
id="org.argeo.security.ui.rap.secureEntryPoint"
class="org.argeo.security.ui.rap.SecureEntryPoint"
- parameter="secureWebUi">
+ path="/node">
+ </entrypoint>
+ <entrypoint
+ id="org.argeo.security.ui.rap.secureEntryPoint"
+ class="org.argeo.security.ui.rap.SecureEntryPoint"
+ 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="/nullEP">
</entrypoint>
</extension>
point="org.eclipse.rap.ui.branding">
<branding
id="org.argeo.security.ui.rap.branding"
- servletName="node"
- defaultEntrypointId="org.argeo.security.ui.rap.secureEntryPoint"
title="Argeo Web UI"
favicon="branding/favicon.ico"
body="branding/login.html">
</branding>
<branding
id="org.argeo.security.ui.rap.branding"
- servletName="default"
- defaultEntrypointId="org.argeo.security.ui.rap.secureEntryPoint"
title="Argeo Web UI"
favicon="branding/favicon.ico"
body="branding/login.html">
</branding>
<branding
id="org.argeo.security.ui.rap.branding"
- servletName="private"
- defaultEntrypointId="org.argeo.security.ui.rap.secureEntryPoint"
title="Argeo Web UI"
favicon="branding/favicon.ico"
body="branding/login.html">
</branding>
<branding
id="org.argeo.security.ui.rap.branding"
- servletName="basicauth"
- defaultEntrypointId="org.argeo.security.ui.rap.secureEntryPoint"
title="Argeo Web UI"
favicon="branding/favicon.ico"
body="branding/login.html">
</branding>
<branding
id="org.argeo.security.ui.rap.branding"
- servletName="clientauth"
- defaultEntrypointId="org.argeo.security.ui.rap.secureEntryPoint"
title="Argeo Web UI"
favicon="branding/favicon.ico"
body="branding/login.html">
</branding>
<branding
id="org.argeo.security.ui.rap.branding"
- servletName="public"
- defaultEntrypointId="org.argeo.security.ui.rap.anonymousEntryPoint"
title="Argeo Public Web UI"
favicon="branding/favicon.ico"
body="branding/public.html">
</branding>
<branding
id="org.argeo.security.ui.rap.branding"
- servletName="logout"
- defaultEntrypointId="org.argeo.security.ui.rap.logoutEntryPoint"
title="Argeo Logout"
favicon="branding/favicon.ico"
body="branding/afterLogout.html">
<!-- we need a servlet with thios name j_spring_security_logout for the logout filter -->
<branding
id="org.argeo.security.ui.rap.branding"
- servletName="j_spring_security_logout"
- defaultEntrypointId="org.argeo.security.ui.rap.nullEntryPoint"
title="Argeo Logout"
favicon="branding/favicon.ico"
body="branding/empty.html">
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;
/**
package org.argeo.security.ui.rap;
import org.eclipse.swt.SWT;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
+import org.eclipse.swt.widgets.Listener;
+import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
import org.eclipse.ui.application.IActionBarConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
+import org.eclipse.ui.internal.UIPlugin;
/** Eclipse RAP specific window advisor */
public class RapWindowAdvisor extends WorkbenchWindowAdvisor {
configurer.setShowStatusLine(false);
configurer.setShowPerspectiveBar(true);
configurer.setTitle("Argeo Web UI"); //$NON-NLS-1$
- // Full screen, see
+ // Full screen, see
// http://wiki.eclipse.org/RAP/FAQ#How_to_create_a_fullscreen_application
configurer.setShellStyle(SWT.NO_TRIM);
Rectangle bounds = Display.getCurrent().getBounds();
configurer.setInitialSize(new Point(bounds.width, bounds.height));
+
+ // Handle window resize in Rap 2.1+ see https://bugs.eclipse.org/bugs/show_bug.cgi?id=417254
+ Display.getCurrent().addListener(SWT.Resize, new Listener() {
+ @Override
+ public void handleEvent(Event event) {
+ Rectangle bounds = event.display.getBounds();
+ IWorkbenchWindow iww = UIPlugin.getDefault().getWorkbench()
+ .getActiveWorkbenchWindow();
+ iww.getShell().setBounds(bounds);
+ }
+ });
}
@Override
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;
<dependency>
<groupId>org.argeo.tp</groupId>
<artifactId>org.eclipse.osgi</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
<groupId>org.argeo.tp</groupId>