Merge RAP 2.x adaptation from 2.tp branch
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 24 Oct 2013 15:42:08 +0000 (15:42 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 24 Oct 2013 15:42:08 +0000 (15:42 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@6560 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

19 files changed:
base/dep/org.argeo.eclipse.dep.rap/pom.xml
base/plugins/org.argeo.osgi.ui.explorer/pom.xml
base/runtime/org.argeo.eclipse.ui.rap/pom.xml
base/runtime/org.argeo.eclipse.ui.rap/src/main/java/org/argeo/eclipse/ui/specific/DownloadServiceHandler.java
base/runtime/org.argeo.eclipse.ui.rap/src/main/java/org/argeo/eclipse/ui/specific/FileHandler.java
base/runtime/org.argeo.eclipse.ui.rap/src/main/java/org/argeo/eclipse/ui/specific/GenericUploadControl.java
base/runtime/org.argeo.eclipse.ui.rap/src/main/java/org/argeo/eclipse/ui/specific/ImportToServerWizardPage.java
base/runtime/org.argeo.eclipse.ui.rap/src/main/java/org/argeo/eclipse/ui/specific/ThreadNLS.java
base/runtime/org.argeo.osgi.boot/pom.xml
demo/argeo_node_web.properties
pom.xml
security/dep/org.argeo.security.dep.node.rap/pom.xml
security/plugins/org.argeo.security.ui.rap/plugin.xml
security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/AnonymousEntryPoint.java
security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/LogoutEntryPoint.java
security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/NullEntryPoint.java
security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/RapWindowAdvisor.java
security/plugins/org.argeo.security.ui.rap/src/main/java/org/argeo/security/ui/rap/SecureEntryPoint.java
server/runtime/org.argeo.server.catalina.start/pom.xml

index 4e36c597ef989579b2a6c4e6d4836d2c0aa2d3d5..7423ef844fc822c14229cc685939810fe0f54651 100644 (file)
@@ -10,7 +10,7 @@
        <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>
@@ -64,7 +93,7 @@
                                        <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>
index 20cb9818dc703509caf5f2831634eccf3b2db847..52575a84c3fd44523dec72f2e94e1fb5e9bb3a49 100644 (file)
@@ -30,6 +30,7 @@
                <dependency>
                        <groupId>org.argeo.tp</groupId>
                        <artifactId>org.eclipse.osgi</artifactId>
+                       <scope>provided</scope>
                </dependency>
 
                <dependency>
index dab367f0f6e645035658df1d4f4ed4ce5147b89c..c67553bff3a30d352b3634330773a496c4e54fe0 100644 (file)
@@ -31,7 +31,7 @@
                                        <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 
index e12210f1bb0b503221abd1bab6b64f4cca4744cb..6c70b215e5fcb5f8dbc97c3ab09ce10b0821839c 100644 (file)
@@ -18,13 +18,13 @@ package org.argeo.eclipse.ui.specific;
 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;
 
@@ -32,16 +32,16 @@ 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 + "\"";
index f15dd66d02d95c37fd61657effa47e798622d1e5..be20b4336880d53c17312750fb67e37e21c5a7dc 100644 (file)
  */
 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
@@ -32,35 +29,37 @@ import org.eclipse.ui.PlatformUI;
  * 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();
                }
@@ -78,26 +77,32 @@ public class FileHandler {
                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();
        }
 }
index 20a5514840747eb6b7061e4e6df369c55a60688f..e3b319862f14b7fea0c973b31c6f0cf61781efa7 100644 (file)
@@ -21,7 +21,7 @@ import org.apache.commons.io.IOUtils;
 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;
@@ -32,7 +32,7 @@ public class GenericUploadControl extends Composite {
        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);
@@ -44,9 +44,9 @@ public class GenericUploadControl extends Composite {
                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();
        }
@@ -56,11 +56,11 @@ public class GenericUploadControl extends Composite {
         * 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()))
@@ -70,30 +70,30 @@ public class GenericUploadControl extends Composite {
        }
 
        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 {
index 234985f31ac41403161e3e1da17a5a161114da2d..f66a279c6df81208df37714630e49ba74024561d 100644 (file)
@@ -21,7 +21,7 @@ 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.rap.rwt.widgets.Upload;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -35,7 +35,7 @@ public class ImportToServerWizardPage extends WizardPage {
        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");
@@ -47,9 +47,9 @@ public class ImportToServerWizardPage extends WizardPage {
                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);
        }
 
@@ -59,11 +59,11 @@ public class ImportToServerWizardPage extends WizardPage {
                // 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() {
@@ -71,17 +71,17 @@ public class ImportToServerWizardPage extends WizardPage {
        }
 
        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() {
index 61607d6ce4e4667d64fd85f3f8afc4fdd766c69f..8b8837f2ee226c14cc3cf52cc53a1da74f7527d0 100644 (file)
@@ -16,7 +16,7 @@
 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> {
index eda57b213f9868bd069b0e613713334b5ae6227a..59edfbdf82635bf4dc75c31100f87300ee743bcd 100644 (file)
@@ -36,8 +36,9 @@
        </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 -->
index a63e68febb17d1e70f4b94eb07862e737a7faa55..65d63bcf8d81c8115af161e19471e4143e88c153 100644 (file)
@@ -6,12 +6,77 @@ argeo.osgi.start.3.node=\
 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
@@ -23,6 +88,9 @@ argeo.server.tomcat.config=conf/default-server-ssl.xml
 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
diff --git a/pom.xml b/pom.xml
index 40d2c44882300de1fee1d9154c78a2cf3037ce9d..cd83665b5bcecac2d8e3efa9bc5de25e726ea3c8 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -107,6 +107,8 @@ limitations under the License.
                                        <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>
@@ -492,6 +494,15 @@ limitations under the License.
                                <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>
index 7ac1796f58daaa52993f91d98be09faa41c16066..da0ead5014905218dba2213518bc54e1637b0644 100644 (file)
                        <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>
index af363bec8fe6cebac73df727f5bfbebed7fef9be..416b67aa7aabe598a86e4ed5d5209c33e801e08b 100644 (file)
@@ -6,22 +6,27 @@
       <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">
@@ -86,8 +77,6 @@
        <!-- 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">
index 326966f6ecdca293522e757fd9bed26187159c86..16d24897c7970f0d073bc227f2600c6af568af4f 100644 (file)
@@ -24,8 +24,8 @@ import org.apache.commons.logging.Log;
 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;
 
index 003a218200c381b70e6e374f310db57e100f1681..733754901a229db1978298139128114f75fd2800 100644 (file)
@@ -20,8 +20,8 @@ import javax.security.auth.login.LoginException;
 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;
 
index fda6bf132c63a93a8ea5bb4963a04e16e3022eb2..811cc28218b9aa658f69ecb99b4662854c65ecfb 100644 (file)
@@ -15,7 +15,7 @@
  */
 package org.argeo.security.ui.rap;
 
-import org.eclipse.rwt.lifecycle.IEntryPoint;
+import org.eclipse.rap.rwt.application.IEntryPoint;
 import org.eclipse.ui.PlatformUI;
 
 /**
index 1f5d5679248ca3a0a060354568f98dad7784f3c3..4808152797cf44d90eff36d9e28586b02209c5e6 100644 (file)
 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;
@@ -27,6 +29,7 @@ import org.eclipse.ui.application.ActionBarAdvisor;
 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 {
@@ -52,11 +55,22 @@ 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
index 6da17d73399006eea930bc75809c1104aafebb96..288ca623bda801bb26f8f04945de981146e4dbe0 100644 (file)
@@ -29,8 +29,8 @@ import org.argeo.eclipse.ui.ErrorFeedback;
 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;
index bd7e71f70d99e1925727d06ee8e59c29bb1d0929..30d3eff6adffc7be9f1b08bf3ddc36b9f64b4729 100644 (file)
@@ -30,6 +30,7 @@
                <dependency>
                        <groupId>org.argeo.tp</groupId>
                        <artifactId>org.eclipse.osgi</artifactId>
+                       <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>org.argeo.tp</groupId>