From 5f35bad1bd1069b5635ef8e1b25a553a468aec2d Mon Sep 17 00:00:00 2001 From: Mark Hoffmann Date: Sat, 2 Sep 2023 15:02:24 +0200 Subject: [PATCH] Removed deprecated Specs - added readme's Signed-off-by: Mark Hoffmann --- cnf/application.log | 12 ++ cnf/osgi.log | 38 ++++++ org.gecko.playground.e4.rcp/Application.e4xmi | 12 +- org.gecko.playground.e4.rcp/README.MD | 24 +++- .../launch_base.bndrun | 2 +- .../playground/exchange/impl/Subscriber.class | Bin 1932 -> 2137 bytes .../playground/exchange/impl/Subscriber.java | 7 +- org.gecko.playground.http.jersey/README.md | 4 + org.gecko.playground.httpwhiteboard/README.md | 13 ++ org.gecko.playground.jaxb/README.md | 5 + org.gecko.playground.logging/README.md | 20 +++ org.gecko.playground.mongo/README.md | 25 ++++ org.gecko.playground.mongo/launch.bndrun | 9 +- org.gecko.playground.promise/README.md | 47 +++++++ org.gecko.playground.rest/README.md | 33 +++++ org.gecko.playground.rest/launch.bndrun | 2 +- .../playground/rest/ExampleResource.java | 1 - org.gecko.playground.rest/urls.txt | 5 - org.gecko.playground.saxon/README.md | 11 ++ org.gecko.playground.search/README.md | 27 ++++ org.gecko.playground.search/launch.bndrun | 10 +- org.gecko.playground.tasks.demo/README.md | 115 ++++++++++++++++++ org.gecko.playground.tasks.demo/launch.bndrun | 2 +- .../tasks/demo/ExampleInitializationTask.java | 3 - org.gecko.playground.tasks.tests/README.md | 7 ++ org.gecko.playground.tasks/README.md | 9 ++ org.gecko.playground.template/README.md | 3 + org.gecko.playground.test/README.md | 5 + org.gecko.playground.txw2/README.md | 5 + org.gecko.playground.vaadin/README.MD | 30 +++++ org.gecko.playground.vaadin/launch.bndrun | 2 +- org.gecko.playground.vaadin/urls.txt | 4 - org.gecko.playground.wab.jersey/.classpath | 11 -- org.gecko.playground.wab.jersey/.gitignore | 2 - org.gecko.playground.wab.jersey/.project | 23 ---- .../org.eclipse.core.resources.prefs | 5 - .../.settings/org.eclipse.jdt.core.prefs | 14 --- org.gecko.playground.wab.jersey/bnd.bnd | 18 --- org.gecko.playground.wab.jersey/launch.bndrun | 73 ----------- .../wab/jersey/ExampleResource.java | 42 ------- .../wab/jersey/JerseyApplication.java | 29 ----- .../playground/wab/jersey/SseResource.java | 36 ------ .../playground/wab/jersey/StatusResource.java | 53 -------- .../playground/wab/jersey/package-info.java | 3 - .../testPersonJAXB.xml | 11 -- org.gecko.playground.wab.jersey/web.xml | 20 --- org.gecko.playground.wab/.classpath | 11 -- org.gecko.playground.wab/.gitignore | 2 - org.gecko.playground.wab/.project | 23 ---- .../org.eclipse.core.resources.prefs | 4 - .../.settings/org.eclipse.jdt.core.prefs | 14 --- org.gecko.playground.wab/bnd.bnd | 17 --- org.gecko.playground.wab/launch.bndrun | 41 ------- .../gecko/playground/wab/ExampleServlet.java | 44 ------- .../gecko/playground/wab/package-info.java | 3 - org.gecko.playground.wab/static/index.html | 21 ---- org.gecko.playground.wab/web.xml | 21 ---- org.gecko.playground.workmode/README.md | 9 ++ org.gecko.playground.xmlresolver/README.md | 5 + org.gecko.playground.xslt/README.md | 11 ++ 60 files changed, 481 insertions(+), 577 deletions(-) create mode 100644 org.gecko.playground.http.jersey/README.md create mode 100644 org.gecko.playground.httpwhiteboard/README.md create mode 100644 org.gecko.playground.jaxb/README.md create mode 100644 org.gecko.playground.logging/README.md create mode 100644 org.gecko.playground.mongo/README.md create mode 100644 org.gecko.playground.promise/README.md create mode 100644 org.gecko.playground.rest/README.md delete mode 100644 org.gecko.playground.rest/urls.txt create mode 100644 org.gecko.playground.saxon/README.md create mode 100644 org.gecko.playground.search/README.md create mode 100644 org.gecko.playground.tasks.demo/README.md create mode 100644 org.gecko.playground.tasks.tests/README.md create mode 100644 org.gecko.playground.tasks/README.md create mode 100644 org.gecko.playground.template/README.md create mode 100644 org.gecko.playground.test/README.md create mode 100644 org.gecko.playground.txw2/README.md create mode 100644 org.gecko.playground.vaadin/README.MD delete mode 100644 org.gecko.playground.vaadin/urls.txt delete mode 100644 org.gecko.playground.wab.jersey/.classpath delete mode 100644 org.gecko.playground.wab.jersey/.gitignore delete mode 100644 org.gecko.playground.wab.jersey/.project delete mode 100644 org.gecko.playground.wab.jersey/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.gecko.playground.wab.jersey/.settings/org.eclipse.jdt.core.prefs delete mode 100644 org.gecko.playground.wab.jersey/bnd.bnd delete mode 100644 org.gecko.playground.wab.jersey/launch.bndrun delete mode 100644 org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/ExampleResource.java delete mode 100644 org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/JerseyApplication.java delete mode 100644 org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/SseResource.java delete mode 100644 org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/StatusResource.java delete mode 100644 org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/package-info.java delete mode 100644 org.gecko.playground.wab.jersey/testPersonJAXB.xml delete mode 100644 org.gecko.playground.wab.jersey/web.xml delete mode 100644 org.gecko.playground.wab/.classpath delete mode 100644 org.gecko.playground.wab/.gitignore delete mode 100644 org.gecko.playground.wab/.project delete mode 100644 org.gecko.playground.wab/.settings/org.eclipse.core.resources.prefs delete mode 100644 org.gecko.playground.wab/.settings/org.eclipse.jdt.core.prefs delete mode 100644 org.gecko.playground.wab/bnd.bnd delete mode 100644 org.gecko.playground.wab/launch.bndrun delete mode 100644 org.gecko.playground.wab/src/org/gecko/playground/wab/ExampleServlet.java delete mode 100644 org.gecko.playground.wab/src/org/gecko/playground/wab/package-info.java delete mode 100644 org.gecko.playground.wab/static/index.html delete mode 100644 org.gecko.playground.wab/web.xml create mode 100644 org.gecko.playground.workmode/README.md create mode 100644 org.gecko.playground.xmlresolver/README.md create mode 100644 org.gecko.playground.xslt/README.md diff --git a/cnf/application.log b/cnf/application.log index 3e352362..890742a4 100644 --- a/cnf/application.log +++ b/cnf/application.log @@ -444,3 +444,15 @@ Caused by: java.lang.IllegalStateException: InjectionManagerFactory not found. 2023.02.17 14:03:58,667 INFO [FelixStartLevel] org.eclipse.jetty.server.Server: Started Server@3abd06de{STARTING}[11.0.13,sto=0] @1069ms 2023.02.17 14:03:58,713 INFO [FelixStartLevel] org.eclipse.jetty.server.AbstractConnector: Started ServerConnector@32c6b470{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} 2023.02.17 14:03:58,715 INFO [FelixStartLevel] org.apache.felix.http: Started Jetty 11.0.13 at port(s) HTTP:8080 on context path / [minThreads=8,maxThreads=200,acceptors=1,selectors=6] +2023.09.02 14:28:33,214 INFO [FelixStartLevel] org.eclipse.jetty.server.Server: jetty-11.0.13; built: 2022-12-07T20:47:15.149Z; git: a04bd1ccf844cf9bebc12129335d7493111cbff6; jvm 17.0.8.1+1-Ubuntu-0ubuntu122.04 +2023.09.02 14:28:33,255 INFO [FelixStartLevel] org.eclipse.jetty.server.session.DefaultSessionIdManager: Session workerName=node0 +2023.09.02 14:28:33,263 INFO [FelixStartLevel] org.eclipse.jetty.server.handler.ContextHandler: Started o.e.j.s.ServletContextHandler@3bd7c854{/,null,AVAILABLE} +2023.09.02 14:28:33,264 INFO [FelixStartLevel] org.eclipse.jetty.server.Server: Started Server@53134114{STARTING}[11.0.13,sto=0] @766ms +2023.09.02 14:28:33,285 INFO [FelixStartLevel] org.eclipse.jetty.server.AbstractConnector: Started ServerConnector@59cac307{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} +2023.09.02 14:28:33,286 INFO [FelixStartLevel] org.apache.felix.http: Started Jetty 11.0.13 at port(s) HTTP:8080 on context path / [minThreads=8,maxThreads=200,acceptors=2,selectors=8] +2023.09.02 14:35:28,034 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] org.eclipse.jetty.server.Server: jetty-11.0.13; built: 2022-12-07T20:47:15.149Z; git: a04bd1ccf844cf9bebc12129335d7493111cbff6; jvm 17.0.8.1+1-Ubuntu-0ubuntu122.04 +2023.09.02 14:35:28,153 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] org.eclipse.jetty.server.session.DefaultSessionIdManager: Session workerName=node0 +2023.09.02 14:35:28,182 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] org.eclipse.jetty.server.handler.ContextHandler: Started o.e.j.s.ServletContextHandler@3e05ca06{/,null,AVAILABLE} +2023.09.02 14:35:28,187 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] org.eclipse.jetty.server.Server: Started Server@4491ac88{STARTING}[11.0.13,sto=0] @1201ms +2023.09.02 14:35:28,276 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] org.eclipse.jetty.server.AbstractConnector: Started ServerConnector@3e11a389{HTTP/1.1, (http/1.1)}{0.0.0.0:8080} +2023.09.02 14:35:28,278 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] org.apache.felix.http: Started Jetty 11.0.13 at port(s) HTTP:8080 on context path / [minThreads=8,maxThreads=200,acceptors=2,selectors=8] diff --git a/cnf/osgi.log b/cnf/osgi.log index 16208bd2..c1281f87 100644 --- a/cnf/osgi.log +++ b/cnf/osgi.log @@ -633,3 +633,41 @@ 2023.02.17 13:59:40,098 INFO [Start Level: Equinox Container: c53e8998-c4e8-4834-be61-3c6ad74bbc1c] Events.Bundle.slf4j.api: BundleEvent STARTING 2023.02.17 13:59:40,098 INFO [Start Level: Equinox Container: c53e8998-c4e8-4834-be61-3c6ad74bbc1c] Events.Bundle.slf4j.api: BundleEvent STARTED 2023.02.17 13:59:40,099 INFO [Framework Event Dispatcher: Equinox Container: c53e8998-c4e8-4834-be61-3c6ad74bbc1c] Events.Framework.org.eclipse.osgi: FrameworkEvent STARTLEVEL CHANGED +2023.09.02 14:35:27,773 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.gecko.playground.logging.log4j: BundleEvent STARTED +2023.09.02 14:35:27,774 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.gogo.command: BundleEvent STARTING +2023.09.02 14:35:27,776 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.command: ServiceEvent REGISTERED +2023.09.02 14:35:27,777 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.command: ServiceEvent REGISTERED +2023.09.02 14:35:27,777 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.command: ServiceEvent REGISTERED +2023.09.02 14:35:27,777 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.gogo.command: BundleEvent STARTED +2023.09.02 14:35:27,778 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.gogo.shell: BundleEvent STARTING +2023.09.02 14:35:27,779 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.gogo.shell: BundleEvent STARTED +2023.09.02 14:35:27,779 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.gecko.playground.wab: BundleEvent STARTING +2023.09.02 14:35:27,779 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.gecko.playground.wab: BundleEvent STARTED +2023.09.02 14:35:27,780 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.gogo.runtime: BundleEvent STARTING +2023.09.02 14:35:27,782 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.runtime: ServiceEvent REGISTERED +2023.09.02 14:35:27,784 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.runtime: ServiceEvent REGISTERED +2023.09.02 14:35:27,784 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.shell: ServiceEvent REGISTERED +2023.09.02 14:35:27,785 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.shell: ServiceEvent REGISTERED +2023.09.02 14:35:27,785 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.shell: ServiceEvent REGISTERED +2023.09.02 14:35:27,786 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.shell: ServiceEvent REGISTERED +2023.09.02 14:35:27,787 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.shell: ServiceEvent REGISTERED +2023.09.02 14:35:27,788 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.gogo.shell: ServiceEvent REGISTERED +2023.09.02 14:35:27,790 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.gogo.runtime: BundleEvent STARTED +2023.09.02 14:35:27,790 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.http.jetty: BundleEvent STARTING +2023.09.02 14:35:27,808 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.http.jetty: ServiceEvent REGISTERED +2023.09.02 14:35:27,815 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.http.jetty: ServiceEvent REGISTERED +2023.09.02 14:35:27,857 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.http.jetty: ServiceEvent REGISTERED +2023.09.02 14:35:28,290 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.http.jetty: ServiceEvent REGISTERED +2023.09.02 14:35:28,291 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.http.jetty: ServiceEvent REGISTERED +2023.09.02 14:35:28,293 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.http.jetty: ServiceEvent REGISTERED +2023.09.02 14:35:28,307 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.http.jetty: ServiceEvent REGISTERED +2023.09.02 14:35:28,307 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.http.jetty: ServiceEvent REGISTERED +2023.09.02 14:35:28,308 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Service.org.apache.felix.http.jetty: ServiceEvent REGISTERED +2023.09.02 14:35:28,308 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.http.jetty: BundleEvent STARTED +2023.09.02 14:35:28,308 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.http.servlet-api: BundleEvent STARTING +2023.09.02 14:35:28,310 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.felix.http.servlet-api: BundleEvent STARTED +2023.09.02 14:35:28,310 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.logging.log4j.slf4j-impl: BundleEvent STARTING +2023.09.02 14:35:28,310 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.org.apache.logging.log4j.slf4j-impl: BundleEvent STARTED +2023.09.02 14:35:28,311 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.slf4j.api: BundleEvent STARTING +2023.09.02 14:35:28,311 INFO [Start Level: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Bundle.slf4j.api: BundleEvent STARTED +2023.09.02 14:35:28,312 INFO [Framework Event Dispatcher: Equinox Container: 1f1164d1-7fbc-4738-ab7e-e1befaa761bf] Events.Framework.org.eclipse.osgi: FrameworkEvent STARTLEVEL CHANGED diff --git a/org.gecko.playground.e4.rcp/Application.e4xmi b/org.gecko.playground.e4.rcp/Application.e4xmi index 048a2441..a31a9568 100644 --- a/org.gecko.playground.e4.rcp/Application.e4xmi +++ b/org.gecko.playground.e4.rcp/Application.e4xmi @@ -43,12 +43,12 @@ - - - - - - + + + + + + diff --git a/org.gecko.playground.e4.rcp/README.MD b/org.gecko.playground.e4.rcp/README.MD index 2c4f8cbc..345ffbe4 100644 --- a/org.gecko.playground.e4.rcp/README.MD +++ b/org.gecko.playground.e4.rcp/README.MD @@ -1,3 +1,4 @@ +# Bnd Launch and Export This project is a simple Example that represents the default Eclipse E4 Application with sample content the PDE also provides. If you want to modify it, only add -runrequire bundles in the **launch_base.bndrun** and resolve only the **launch_base.bndrun**. @@ -6,4 +7,25 @@ To start or export use the *launch_linux* or *launch_win32* because they contain What OS Specific launcher to use, will be determined via the `-runsystemcapabilities'. If you use the `native_capability` Macro without any parameters, it will use the ones of your current system. -You may realize that the splash screen appears only for a blink of an eye. This is because the application starts to quick :-) \ No newline at end of file +You may realize that the splash screen appears only for a blink of an eye. This is because the application starts to quick :-) + +# The Application + +## Precondition + +You need a running mongo database as backing storage. + +In addition to that this RCP uses the following *playground* projects: + +* org.gecko.playground.lucene - using OSGyfied Lucene +* org.gecko.playground.model - an EMF example data model for our person +* org.gecko.playground.search - an search service for our persons +* org.gecko.playground.mongo - Persistence service using MongoDB backing including the configuration in */config/config.json* +* org.gecko.playground.e4.rcp - the RCP application + +## Features + +In the RCP there are: + +* Create Person form - Create a new person, save it into the database using the save icon +* Search Person Form - Look for persons using lucene search. To search for all, leave the text field empty and press search diff --git a/org.gecko.playground.e4.rcp/launch_base.bndrun b/org.gecko.playground.e4.rcp/launch_base.bndrun index c8bbcc84..f38926a7 100644 --- a/org.gecko.playground.e4.rcp/launch_base.bndrun +++ b/org.gecko.playground.e4.rcp/launch_base.bndrun @@ -142,7 +142,7 @@ org.osgi.util.converter;version='[1.0.9,1.0.10)',\ org.osgi.util.pushstream;version='[1.1.0,1.1.1)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ - org.eclipse.parsson.jakarta.json;version='[1.1.1,1.1.2)',\ + org.eclipse.parsson.jakarta.json;version='[1.1.2,1.1.3)',\ com.google.guava;version='[31.1.0,31.1.1)',\ com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\ org.gecko.emf.repository.api;version='[9.2.2,9.2.3)',\ diff --git a/org.gecko.playground.exchange.impl/bin/org/gecko/playground/exchange/impl/Subscriber.class b/org.gecko.playground.exchange.impl/bin/org/gecko/playground/exchange/impl/Subscriber.class index 689ce8c633229a9262f3f70b8202c21b951682bf..1aaa28241412b86ee3852c1e225c89a22c687f94 100644 GIT binary patch delta 543 zcmZvZPfrt36vcmUX7tH0O>0dHNCb*#plC`+BxtQ#5&2jCXloT%O<;m3R5FexuKESs zn6CT;-MB#wu`FQc!j)T>Zd~~Z3{h^Uabe=--kWpoJ@?%AUPr&hVqbpm9{@R4HHPBy zoA2jqKMi{~H*QtixJp)YO%Z$IzH~ENZe=4=eDyr=wjHjMQ<$FbD-wl}-h7r>@;56% zG4MTiJ8N^3yylkT%ztQy+e|3*PIF?bA|it=mDZ9#U}qycRJNI9N^`gN)k-cnOp{bZ z!=Yl}u01XJ?wV&aOF=XDkI&L$ak1_&&w`>|mWb6CJAt<@t_O!!G)uL2R_enKtD&k& zV`9iNOxMY$Khn`)Kv9sYYq&w$pia6_=TZ~t{!F}?;v+(hnnFe2Gaet=E#N2@*64g(lo^dK_M-} zVoumT$q{VsaUVsu$P_6_)l0ur52Q*-N3wNHi2m&_3-?gC1Sie1W^qC@c|=m;FWOIV O+Tf9}2FtXCdF2=wVQeh` delta 321 zcmX|*OG^S_6o#K~#^FOVk|?Fbu^Uk%VYxDE%(8nfBck1aLl;6qEcyfO+LWt)!4R~O zT4alUK>HRh+xHu)lR>NZJM}%o=CKrP*lVXW!g9f0RxqQ_%BKJ&kD<#Jd?lses9T~NrGXDU9~9@A|<;f z2{#{f>N3M1bBtgMbEGF%NJ|a9L|CDWA}O=0tcgn#6}K*KR1)#OuY`{M=QpIc*{v*d UPg5*wN>NLKTLKNX33qkp2d*bHivR!s diff --git a/org.gecko.playground.exchange.impl/src/org/gecko/playground/exchange/impl/Subscriber.java b/org.gecko.playground.exchange.impl/src/org/gecko/playground/exchange/impl/Subscriber.java index 3e787b56..027d95bc 100644 --- a/org.gecko.playground.exchange.impl/src/org/gecko/playground/exchange/impl/Subscriber.java +++ b/org.gecko.playground.exchange.impl/src/org/gecko/playground/exchange/impl/Subscriber.java @@ -26,7 +26,12 @@ public void run() { // Exit from main loop break; } catch (Exception e) { - log.error("Error handling event: ", e); + if (log != null) { + log.error("Error handling event: ", e); + } else { + System.err.println("Error handling event: "); + e.printStackTrace(); + } } } } diff --git a/org.gecko.playground.http.jersey/README.md b/org.gecko.playground.http.jersey/README.md new file mode 100644 index 00000000..5532813d --- /dev/null +++ b/org.gecko.playground.http.jersey/README.md @@ -0,0 +1,4 @@ +# `org.gecko.playground.http.jersey` + +This project is just a companion bundle that shows OSGi *@Requirement* annotations in *@RequireJersey* + diff --git a/org.gecko.playground.httpwhiteboard/README.md b/org.gecko.playground.httpwhiteboard/README.md new file mode 100644 index 00000000..4a29626c --- /dev/null +++ b/org.gecko.playground.httpwhiteboard/README.md @@ -0,0 +1,13 @@ +# `org.gecko.playground.httpwhiteboard` + +This project shows how to use Jakarta Servlets in OSGi using the Servlet whiteboard. + +It contains a Servlets, registered as services and static resource configurations. + +The URLs are like this: + +* *HelloWorldServlet* - [http://localhost:8080/hello](http://localhost:8080/hello) +* *ResourceService* for static resources: + * [http://localhost:8080/myapp/index.html](http://localhost:8080/myapp/index.html) or + * [http://localhost:8080/myapp/d3-demo2.html](http://localhost:8080/myapp/d3-demo2.html) + diff --git a/org.gecko.playground.jaxb/README.md b/org.gecko.playground.jaxb/README.md new file mode 100644 index 00000000..82aa2f94 --- /dev/null +++ b/org.gecko.playground.jaxb/README.md @@ -0,0 +1,5 @@ +# `org.gecko.playground.jaxb` + +This project show an OSGi setup for JAXB. The important thing is to make JAXB find its implementation in an post Java 8 setup. + +For this we use the HK2-OSGi-ResourceLocator, that is called as part of the JAXB API implementation finding search order. \ No newline at end of file diff --git a/org.gecko.playground.logging/README.md b/org.gecko.playground.logging/README.md new file mode 100644 index 00000000..eabe6bb7 --- /dev/null +++ b/org.gecko.playground.logging/README.md @@ -0,0 +1,20 @@ +# `org.gecko.playground.logging` + +This project is a multi bundle project in bndtools. This means on project can generate multiple bundles. This is a simple bridge to log various logging API's: + +* slf4j +* Java Util Logging +* log4j +* OSGi Log + +into one Log4j2 backend. + +The corresponding log4j2 configuration is located in *config/log4j2.xml* and you will find the resulting log file *gecko.log* in *cnf/logs/gecko.log* + +``` +2023.09.02 14:46:33,784 INFO [Start Level: Equinox Container: b11aaa01-5f0e-4d8b-89f7-f771e0ba2703] org.gecko.playground.logging.test.LoggingComponent: Activate with Log4J +2023.09.02 14:46:33,785 INFO [Start Level: Equinox Container: b11aaa01-5f0e-4d8b-89f7-f771e0ba2703] org.gecko.playground.logging.test.LoggingComponent: Activate with SLF4J +2023.09.02 14:46:33,785 INFO [Start Level: Equinox Container: b11aaa01-5f0e-4d8b-89f7-f771e0ba2703] org.gecko.playground.logging.test.LoggingComponent: Activate with OSGi Logging +``` + +These log entries come out of *LoggingComponent*, that test logging with different log API's. \ No newline at end of file diff --git a/org.gecko.playground.mongo/README.md b/org.gecko.playground.mongo/README.md new file mode 100644 index 00000000..eccb80fb --- /dev/null +++ b/org.gecko.playground.mongo/README.md @@ -0,0 +1,25 @@ +# `org.gecko.playground.mongo` + +This project shows how to use a mongo-backed service to store and retrieve persons from an EMF model *org.gecko.playground.model*. + +The console *help* shows the commands: + +* `persistence:getPerson` +* `persistence:savePerson` + +Here is an example: + +``` +g! savePerson Emil Tester + +Sept. 02, 2023 12:31:33 PM com.mongodb.diagnostics.logging.JULLogger log +INFORMATION: Opened connection [connectionId{localValue:2, serverValue:13}] to mongodb:27017 + +Saved Person in db with id 64f30f04f4bcc54824b1b8e5 + +g! getPerson 64f30f04f4bcc54824b1b8e5 +Retrieved Person with id 64f30f04f4bcc54824b1b8e5 from db: Emil Tester +``` + +This service is also used by the *playground.e4.rcp* example and the *playground.vaadin* applications as part of a more complex, re-usable part. + diff --git a/org.gecko.playground.mongo/launch.bndrun b/org.gecko.playground.mongo/launch.bndrun index 88fff3ad..07da3297 100644 --- a/org.gecko.playground.mongo/launch.bndrun +++ b/org.gecko.playground.mongo/launch.bndrun @@ -9,10 +9,7 @@ org.apache.felix.gogo.runtime;version='[1.1.6,1.1.7)',\ org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\ org.apache.felix.scr;version='[2.2.6,2.2.7)',\ - org.eclipse.emf.common;version='[2.27.0,2.27.1)',\ - org.eclipse.emf.ecore;version='[2.29.0,2.29.1)',\ org.eclipse.emf.ecore.xmi;version='[2.17.0,2.17.1)',\ - org.eclipse.emf.gwt.common;version='[2.13.0,2.13.1)',\ org.eclipse.equinox.cm;version='[1.5.100,1.5.101)',\ org.gecko.emf.collections;version='[2.1.1,2.1.2)',\ org.gecko.emf.mongo.api;version='[6.0.0,6.0.1)',\ @@ -32,10 +29,12 @@ org.osgi.util.converter;version='[1.0.9,1.0.10)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.3.0,1.3.1)',\ - org.eclipse.parsson.jakarta.json;version='[1.1.1,1.1.2)',\ org.gecko.emf.mongo.pushstream;version='[6.0.0,6.0.1)',\ org.gecko.emf.pushstreams;version='[1.1.1,1.1.2)',\ - org.osgi.util.pushstream;version='[1.1.0,1.1.1)' + org.osgi.util.pushstream;version='[1.1.0,1.1.1)',\ + org.eclipse.emf.common;version='[2.28.0,2.28.1)',\ + org.eclipse.emf.ecore;version='[2.33.0,2.33.1)',\ + org.eclipse.parsson.jakarta.json;version='[1.1.2,1.1.3)' -runrequires: \ osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\ diff --git a/org.gecko.playground.promise/README.md b/org.gecko.playground.promise/README.md new file mode 100644 index 00000000..237e9461 --- /dev/null +++ b/org.gecko.playground.promise/README.md @@ -0,0 +1,47 @@ +# `org.gecko.playground.promise` + +This project shows how to use asynchronous programming with OSGi Promises. The example shows how to use a `Deferred`, to hook in external frameworks and use their callbacks to trigger resolving of promises. This is a more advanced example, than the usual promises stuff. + +When starting the programm, you will see: + +``` +g! Scheduling database connection (main) +Finished activation (main) +``` + +After 15 seconds the database is connected and sends the resolved state: + +``` +Try connecting to database ... (pool-4-thread-1) +Database seems available: Doing sthg with the database ... +Database ID: CONID-b152b893-8961-4da7-8a80-11bf800a844a +``` + +The `list` command shows you two components: + +``` +g! list +org.gecko.playground.promise.DatabaseDriverComponent in bundle 3 (org.gecko.playground.promise:1.0.0.202309021036-SNAPSHOT) enabled, 1 instance. + Id: 1, State:ACTIVE +org.gecko.playground.promise.DatabaseAvailableChecker in bundle 3 (org.gecko.playground.promise:1.0.0.202309021036-SNAPSHOT) enabled, 1 instance. + Id: 0, State:ACTIVE +``` + + + +If you e.g. stop the *DatabaseDriverComponent* with: + +``` +g! disable org.gecko.playground.promise.DatabaseDriverComponent +``` + +you will see, that the promise informs, that the database will be disconnected gracefully: + +``` +Disconnected Database with ID: b152b893-8961-4da7-8a80-11bf800a844a +true +Database has gone! Stop working with database! +``` + + + diff --git a/org.gecko.playground.rest/README.md b/org.gecko.playground.rest/README.md new file mode 100644 index 00000000..2f88b5a4 --- /dev/null +++ b/org.gecko.playground.rest/README.md @@ -0,0 +1,33 @@ +# `org.gecko.playground.rest` + +This project shows how to use Jakarta REST resources (a.k.a. JaxRS). + +It contains a JakartaRS resoure *ExampleResource* as component. There is also an plain Java JakartaRS resource *SimpleResource*, which is then programmatically registered into the OSGi JakartaRS Whiteboard using e.g. *SimpleResourceStarter* + +The URLs are like this: + +* *ExampleResource* - [http://localhost:8080/playground/rest/example](http://localhost:8080/playground/rest/example) +* *SimpleResource* - [http://localhost:8080/playground/rest/test/example](http://localhost:8080/playground/rest/test/example) + +You can check that over the browser or using: + +`wget http://localhost:8080/playground/rest/test/example` + +`wget http://localhost:8080/playground/rest/example` + +... returns a *HTTP 200 - OK* + +You can dynamically unregister the *SimpleResource* by deactivating the *SimpleResourceStarter* (The name of the component is *SRS*, see the annotation). After that the *SimpleResource* will become unavailable. + +``` +g! disable SRS +``` + +A `wget http://localhost:8080/playground/rest/test/example` will now return *HTTP 404 - Not Found* + +Re-aenabling it makes it appear again. +``` +g! enable SRS +``` + + diff --git a/org.gecko.playground.rest/launch.bndrun b/org.gecko.playground.rest/launch.bndrun index f46a3e55..b898aac9 100644 --- a/org.gecko.playground.rest/launch.bndrun +++ b/org.gecko.playground.rest/launch.bndrun @@ -65,7 +65,7 @@ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.3.0,1.3.1)',\ slf4j.api;version='[1.7.36,1.7.37)',\ - org.eclipse.parsson.jakarta.json;version='[1.1.1,1.1.2)',\ + org.eclipse.parsson.jakarta.json;version='[1.1.2,1.1.3)',\ org.apache.aries.spifly.dynamic.bundle;version='[1.3.5,1.3.6)',\ org.objectweb.asm.commons;version='[9.4.0,9.4.1)',\ org.objectweb.asm.tree;version='[9.4.0,9.4.1)',\ diff --git a/org.gecko.playground.rest/src/org/gecko/playground/rest/ExampleResource.java b/org.gecko.playground.rest/src/org/gecko/playground/rest/ExampleResource.java index c9632d8c..27a921b8 100644 --- a/org.gecko.playground.rest/src/org/gecko/playground/rest/ExampleResource.java +++ b/org.gecko.playground.rest/src/org/gecko/playground/rest/ExampleResource.java @@ -2,7 +2,6 @@ import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.ServiceScope; -import org.osgi.service.jakartars.whiteboard.annotations.RequireJakartarsWhiteboard; import org.osgi.service.jakartars.whiteboard.propertytypes.JakartarsResource; import jakarta.ws.rs.GET; diff --git a/org.gecko.playground.rest/urls.txt b/org.gecko.playground.rest/urls.txt deleted file mode 100644 index 67f91778..00000000 --- a/org.gecko.playground.rest/urls.txt +++ /dev/null @@ -1,5 +0,0 @@ -Programmatic resource; -http://localhost:8080/playground/rest/test/example - -Default resource; -http://localhost:8080/playground/rest/example \ No newline at end of file diff --git a/org.gecko.playground.saxon/README.md b/org.gecko.playground.saxon/README.md new file mode 100644 index 00000000..ab6167c5 --- /dev/null +++ b/org.gecko.playground.saxon/README.md @@ -0,0 +1,11 @@ +# `org.gecko.playground.saxon` + +This project shows how to OSGify Saxon as well known framework. + +**Note:** This project also needs *org.gecko.playground.xmlresolver* to be OSGified. + +This is done using a project template in *bndtools* for OSGify JAR's. It can be used a recipe. + + + +This bundle is also used in the *org.gecko.playground.xslt* project, to show it is working. diff --git a/org.gecko.playground.search/README.md b/org.gecko.playground.search/README.md new file mode 100644 index 00000000..63d55652 --- /dev/null +++ b/org.gecko.playground.search/README.md @@ -0,0 +1,27 @@ +# `org.gecko.playground.search` + +This project shows how to use a Lucene based index service to index and search persons from an EMF model *org.gecko.playground.model*. + +The console *help* shows the commands: + +* `index:indexPerson ` (returns a `personId`) +* `index:removePerson ` +* `search:searchByFirstName ` +* `search:searchByLastName ` + +Here is an example: + +``` +g! searchByLastName '' true +No Person object matching your search criteria has been found. +g! searchByLastName '' false +--------Matching Result------------ +First Name: Mark +Last Name: Hoffmann +--------Matching Result------------ +First Name: Peter +Last Name: Meier +``` + +This service is also used by the *playground.e4.rcp* example and the *playground.vaadin* applications as part of a more complex, re-usable part. + diff --git a/org.gecko.playground.search/launch.bndrun b/org.gecko.playground.search/launch.bndrun index 49781b7c..2ca4e43e 100644 --- a/org.gecko.playground.search/launch.bndrun +++ b/org.gecko.playground.search/launch.bndrun @@ -22,21 +22,19 @@ org.osgi.util.converter;version='[1.0.9,1.0.10)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.3.0,1.3.1)',\ - org.eclipse.parsson.jakarta.json;version='[1.1.1,1.1.2)',\ org.eclipse.equinox.cm;version='[1.5.100,1.5.101)',\ - org.gecko.emf.pushstreams;version='[1.0.15,1.0.16)',\ org.gecko.emf.repository.api;version='[9.2.2,9.2.3)',\ - org.gecko.util.common;version='[2.0.0,2.0.1)',\ - org.gecko.util.pushstream;version='[6.0.0,6.0.1)',\ org.osgi.service.log;version='[1.5.0,1.5.1)',\ - org.osgi.util.pushstream;version='[1.0.1,1.0.2)',\ org.apache.lucene.core;version='[9.5.0,9.5.1)',\ org.eclipse.emf.common;version='[2.28.0,2.28.1)',\ org.eclipse.emf.ecore;version='[2.33.0,2.33.1)',\ org.gecko.emf.search;version='[1.1.0,1.1.1)',\ org.gecko.search;version='[1.1.0,1.1.1)',\ org.gecko.search.document;version='[1.1.0,1.1.1)',\ - org.gecko.search.util;version='[1.1.0,1.1.1)' + org.gecko.search.util;version='[1.1.0,1.1.1)',\ + org.eclipse.parsson.jakarta.json;version='[1.1.2,1.1.3)',\ + org.gecko.emf.pushstreams;version='[1.1.1,1.1.2)',\ + org.osgi.util.pushstream;version='[1.1.0,1.1.1)' -runrequires: \ osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\ diff --git a/org.gecko.playground.tasks.demo/README.md b/org.gecko.playground.tasks.demo/README.md new file mode 100644 index 00000000..24a5955f --- /dev/null +++ b/org.gecko.playground.tasks.demo/README.md @@ -0,0 +1,115 @@ +# `org.gecko.playground.tasks.demo` + +This demo will show you a simple example of startup task of an application. These task can be conditional, e.g. being dependent from a *workmode* of the application. + +In this example a task is only executed, if the application is in workmode **ONLINE**. If the application becomes **OFFLINE** this task executes the deactivation callback respectively. + +For this additional projects are involved: + +* *org.gecko.playground.config* - Initial configuration for workmode in */config/config.json* +* *org.gecko.playground.workmode* - Workmode commands and handling +* *org.gecko.playground.tasks* - Tasks services and framework +* *org.gecko.playground.tasks.demo* - Example tasks + +The implementation of this example, together with the workmode uses OSGi specifications + +* *Promises* - Asynchronous activation and de-activation handling +* *Conditions* - Announcing the workmode state in the application +* *Configurator* - Using json configurations as setting for the configuration admin +* *Configuration Admin* - Programmatically create configurations during runtime + + + +The console *help* shows the commands: + +* `task:activate ` - Activate a task +* `task:deactivate ` - Deactivate a task +* `task:showState`- Show tasks states +* `workmode:getWorkmode` - Returns the current work mode +* `workmode:setWorkmode ` - Sets the workmode. Supported values are **ONLINE** or **OFFLINE** + +When running the application, the default workmode from the configuration (from *org.gecko.playground.config*) is initialized via *WorkmodeInitializer* from the *org.gecko.playground.workmode* project. Depending on this condition that is raised, the *ExampleInitializationTask* ist started. It will take 8 seconds to finish this task (Simulated a long running task): + +``` +g! Started activation EXTERNAL 1 ... + +Finished initialization EXTERNAL 1 +``` + +The command *showState* will give you an overview and show the state is *ACTIVE*: + +``` +g! showState +Task with id 'externalTest' and name 'EXTERNAL 1 - INITIALIZATION TASK' has state 'ACTIVE' +``` + +You can deactivate this task with: + +``` +g! deactivate externalTest +De-activate task with id 'externalTest' and name 'EXTERNAL 1 - INITIALIZATION TASK' ... +Started deactivation EXTERNAL 1 ... + +Finished deactivation EXTERNAL 1 +De-activated task id 'externalTest' and name 'externalTest' with result 'INACTIVE' +``` + +It take about 3 seconds until the task is deactivated / *INACTIVE*. + +``` +g! showState +Task with id 'externalTest' and name 'EXTERNAL 1 - INITIALIZATION TASK' has state 'INACTIVE' +``` + + + +Now you can change the workmode. First check the current work mode: + +``` +g! getworkmode +Current work mode is 'OFFLINE' +``` + + + +We want set the applications workmode to online, manually, now the *OnlineAuthenticatedExampleInitializationTask* should be activated: + +``` +g! setworkmode ONLINE +Workmode was updated from 'OFFLINE' to 'ONLINE' +g! Started initialization EXTERNAL 3 Workmode ONLINE ... + +Finished initialization EXTERNAL 3 Workmode ONLINE +``` + +Setting the workmode back to **OFFLINE**, deactivateds this task again (takes 5 seconds): + +``` +g! setworkmode OFFLINE +Workmode was updated from 'ONLINE' to 'OFFLINE' +g! Started deactivation EXTERNAL 3 Workmode ONLINE ... + +g! Finished deactivation EXTERNAL 3 Workmode ONLINE +showstate +Task with id 'externalTest' and name 'EXTERNAL 1 - INITIALIZATION TASK' has state 'INACTIVE' +Task with id 'externalOnline' and name 'EXTERNAL 3 - INITIALIZATION TASK (Workmode ONLINE)' has state 'REMOVED' +``` + +The task has been removed. It is not *INACTIVE* like the other task. This is because *externalOnline* belongs to the workmode. If the right workmode is not set, this taks is not applicable, so it must be removed. To keep this information after cleanup, each task is an *TaskInfo* object, that just contains task meta-data, even if the real task is already cleaned up. + +As you may see the console returns after the *setWorkmode* command with returning `g!`. This is because this activation is asynchronous. If you are fast enough you can also trigger the `showState` command in between this 5 activation or deactivation seconds: + +``` +g! setworkmode ONLINE +Workmode was updated from 'OFFLINE' to 'ONLINE' +g! Started initialization EXTERNAL 3 Workmode ONLINE ... +showstate +Task with id 'externalTest' and name 'EXTERNAL 1 - INITIALIZATION TASK' has state 'INACTIVE' +Task with id 'externalOnline' and name 'EXTERNAL 3 - INITIALIZATION TASK (Workmode ONLINE)' has state 'ACTIVATING' +g! Finished initialization EXTERNAL 3 Workmode ONLINE +showstate +Task with id 'externalTest' and name 'EXTERNAL 1 - INITIALIZATION TASK' has state 'INACTIVE' +Task with id 'externalOnline' and name 'EXTERNAL 3 - INITIALIZATION TASK (Workmode ONLINE)' has state 'ACTIVE' +``` + +So you can see that an activating task also announces a corresponding transition-status *ACTIVATING*. diff --git a/org.gecko.playground.tasks.demo/launch.bndrun b/org.gecko.playground.tasks.demo/launch.bndrun index 5e25c701..47adb9f7 100644 --- a/org.gecko.playground.tasks.demo/launch.bndrun +++ b/org.gecko.playground.tasks.demo/launch.bndrun @@ -24,7 +24,7 @@ org.gecko.playground.workmode;version=snapshot,\ org.gecko.playground.tasks;version=snapshot,\ org.gecko.playground.tasks.demo;version=snapshot,\ - org.eclipse.parsson.jakarta.json;version='[1.1.1,1.1.2)',\ + org.eclipse.parsson.jakarta.json;version='[1.1.2,1.1.3)',\ org.apache.felix.configadmin;version='[1.9.26,1.9.27)' -runrequires: \ diff --git a/org.gecko.playground.tasks.demo/src/org/gecko/playground/tasks/demo/ExampleInitializationTask.java b/org.gecko.playground.tasks.demo/src/org/gecko/playground/tasks/demo/ExampleInitializationTask.java index 6fa10d09..e548d96f 100644 --- a/org.gecko.playground.tasks.demo/src/org/gecko/playground/tasks/demo/ExampleInitializationTask.java +++ b/org.gecko.playground.tasks.demo/src/org/gecko/playground/tasks/demo/ExampleInitializationTask.java @@ -5,9 +5,6 @@ import org.gecko.playground.tasks.annotations.RequireTasks; import org.gecko.playground.workmode.annotations.RequireWorkmode; import org.osgi.service.component.annotations.Component; -import org.osgi.service.component.annotations.Reference; -import org.osgi.service.log.Logger; -import org.osgi.service.log.LoggerFactory; @RequireTasks @RequireWorkmode diff --git a/org.gecko.playground.tasks.tests/README.md b/org.gecko.playground.tasks.tests/README.md new file mode 100644 index 00000000..68b6e3a8 --- /dev/null +++ b/org.gecko.playground.tasks.tests/README.md @@ -0,0 +1,7 @@ +# `org.gecko.playground.tasks.tests` + +This projects contains the bundle integration tests using the OSGi Test framework [https://github.com/osgi/osgi-test](https://github.com/osgi/osgi-test). + +The *test.bndrun* should be launched via *Run as - Bnd OSGi Test Launcher (JUnit)* + +The bundle under test is *org.gecko.playground.tasks*. diff --git a/org.gecko.playground.tasks/README.md b/org.gecko.playground.tasks/README.md new file mode 100644 index 00000000..bfe3f732 --- /dev/null +++ b/org.gecko.playground.tasks/README.md @@ -0,0 +1,9 @@ +# `org.gecko.playground.tasks` + +This projects contains the implementation of an asynchronous task management. + +It also contains console commands, that show, how to use it. + +There are service for Gogo commands and the component to start the task *framework*. + +Integration tests are shown in the *org.gecko.playground.tasks.tests* project using the OSGi-Test framework. diff --git a/org.gecko.playground.template/README.md b/org.gecko.playground.template/README.md new file mode 100644 index 00000000..f16db28e --- /dev/null +++ b/org.gecko.playground.template/README.md @@ -0,0 +1,3 @@ +# `org.gecko.playground.template` + +This project shows how create project templates in *bndtools*. One example is a project recipe for OSGify JAR's. diff --git a/org.gecko.playground.test/README.md b/org.gecko.playground.test/README.md new file mode 100644 index 00000000..263fdf89 --- /dev/null +++ b/org.gecko.playground.test/README.md @@ -0,0 +1,5 @@ +# `org.gecko.playground.tests` + +This projects contains the bundle integration tests using the OSGi Test framework [https://github.com/osgi/osgi-test](https://github.com/osgi/osgi-test). + +The *test.bndrun* should be launched via *Run as - Bnd OSGi Test Launcher (JUnit) diff --git a/org.gecko.playground.txw2/README.md b/org.gecko.playground.txw2/README.md new file mode 100644 index 00000000..b88a7af1 --- /dev/null +++ b/org.gecko.playground.txw2/README.md @@ -0,0 +1,5 @@ +# `org.gecko.playground.txw2` + +This project shows how to OSGify Glassfish TXW2 as JAXB provider. + +This is done using a project template in *bndtools* for OSGify JAR's. It can be used a recipe. diff --git a/org.gecko.playground.vaadin/README.MD b/org.gecko.playground.vaadin/README.MD new file mode 100644 index 00000000..2f7b9f68 --- /dev/null +++ b/org.gecko.playground.vaadin/README.MD @@ -0,0 +1,30 @@ +# Bnd Launch +This project is a simple Example that represents the default Vaadin Whiteboard with sample content. + +The UI is based on Vaadin. Vaadin UI components can be regsitered as OSGi components (both are named components in different contexts: Vaadin - UI component, OSGi - Service component) + +This application is similar to *org.gecko.playground.e4.rcp*, but with an alternative web frontend. the backend code is the same. + +You will find the application under URL [http://localhost:8086/playground/](http://localhost:8086/playground/) + +# The Application + +## Precondition + +You need a running mongo database as backing storage. + +In addition to that this application uses the following *playground* projects: + +* org.gecko.playground.lucene - using OSGyfied Lucene +* org.gecko.playground.model - an EMF example data model for our person +* org.gecko.playground.search - an search service for our persons +* org.gecko.playground.mongo - Persistence service using MongoDB backing including the configuration in */config/config.json* +* org.gecko.playground.vaadin - the Vaadin Java UI +* org.gecko.playground.vaadin.frontend - the Vaadin generated JavaSCript components for the web frontened + +## Features + +In the Webapplication, like in the RCP there are: + +* Create Person form - Create a new person, save it into the database using the save icon +* Search Person Form - Look for persons using lucene search. To search for all, leave the text field empty and press search diff --git a/org.gecko.playground.vaadin/launch.bndrun b/org.gecko.playground.vaadin/launch.bndrun index 0717620a..4d46d034 100644 --- a/org.gecko.playground.vaadin/launch.bndrun +++ b/org.gecko.playground.vaadin/launch.bndrun @@ -93,7 +93,7 @@ org.osgi.util.pushstream;version='[1.1.0,1.1.1)',\ slf4j.api;version='[1.7.36,1.7.37)',\ slf4j.simple;version='[1.7.25,1.7.26)',\ - org.eclipse.parsson.jakarta.json;version='[1.1.1,1.1.2)',\ + org.eclipse.parsson.jakarta.json;version='[1.1.2,1.1.3)',\ com.vaadin.flow.component.combobox;version='[23.3.0,23.3.1)',\ com.vaadin.flow.component.contextmenu;version='[23.3.0,23.3.1)',\ com.vaadin.flow.component.datepicker;version='[23.3.0,23.3.1)',\ diff --git a/org.gecko.playground.vaadin/urls.txt b/org.gecko.playground.vaadin/urls.txt deleted file mode 100644 index 76e3ddaa..00000000 --- a/org.gecko.playground.vaadin/urls.txt +++ /dev/null @@ -1,4 +0,0 @@ -Needs mongo database - -Default Vaadin App -http://localhost:8086/playground/ \ No newline at end of file diff --git a/org.gecko.playground.wab.jersey/.classpath b/org.gecko.playground.wab.jersey/.classpath deleted file mode 100644 index a52eb822..00000000 --- a/org.gecko.playground.wab.jersey/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/org.gecko.playground.wab.jersey/.gitignore b/org.gecko.playground.wab.jersey/.gitignore deleted file mode 100644 index 57b34117..00000000 --- a/org.gecko.playground.wab.jersey/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin/ -/generated/ diff --git a/org.gecko.playground.wab.jersey/.project b/org.gecko.playground.wab.jersey/.project deleted file mode 100644 index 1df123f4..00000000 --- a/org.gecko.playground.wab.jersey/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - org.gecko.playground.wab.jersey - - - - - - org.eclipse.jdt.core.javabuilder - - - - - bndtools.core.bndbuilder - - - - - - org.eclipse.jdt.core.javanature - bndtools.core.bndnature - - diff --git a/org.gecko.playground.wab.jersey/.settings/org.eclipse.core.resources.prefs b/org.gecko.playground.wab.jersey/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index fc950a9e..00000000 --- a/org.gecko.playground.wab.jersey/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,5 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/org/gecko/playground/wab/jersey/ExampleResource.java=UTF-8 -encoding//src/org/gecko/playground/wab/jersey/package-info.java=UTF-8 -encoding/=UTF-8 -encoding/bnd.bnd=UTF-8 diff --git a/org.gecko.playground.wab.jersey/.settings/org.eclipse.jdt.core.prefs b/org.gecko.playground.wab.jersey/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 8c9943d5..00000000 --- a/org.gecko.playground.wab.jersey/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 diff --git a/org.gecko.playground.wab.jersey/bnd.bnd b/org.gecko.playground.wab.jersey/bnd.bnd deleted file mode 100644 index 9dfa4664..00000000 --- a/org.gecko.playground.wab.jersey/bnd.bnd +++ /dev/null @@ -1,18 +0,0 @@ --buildpath: \ - jakarta.ws.rs-api;version='2.1',\ - org.gecko.playground.http.jersey;version=latest,\ - jakarta.xml.bind-api;version=latest,\ - org.gecko.playground.jaxb;version=project,\ - org.osgi.util.promise;version=latest,\ - org.osgi.service.jakartars;version=latest,\ - org.osgi.util.function;version=latest - -Bundle-Name: Jersey REST as Web Application Bundle -Bundle-Description: Gecko Playground Jersey REST as Web Application Bundle - -Web-ContextPath: /rest - --wab: - --includeresource: WEB-INF/web.xml=web.xml -Export-Package: org.gecko.playground.wab.jersey diff --git a/org.gecko.playground.wab.jersey/launch.bndrun b/org.gecko.playground.wab.jersey/launch.bndrun deleted file mode 100644 index 66ae4544..00000000 --- a/org.gecko.playground.wab.jersey/launch.bndrun +++ /dev/null @@ -1,73 +0,0 @@ --runfw: org.apache.felix.framework;version='[7.0.5,7.0.5]' --runee: JavaSE-17 --runprovidedcapabilities: ${native_capability} - --resolve.effective: active - --runproperties: \ - osgi.console.enable.builtin=false,\ - osgi.console= - --runbundles: \ - org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\ - org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\ - org.gecko.playground.logging.config;version=snapshot,\ - org.gecko.playground.logging.log4j;version=snapshot,\ - org.glassfish.hk2.osgi-resource-locator;version='[1.0.3,1.0.4)',\ - org.apache.felix.gogo.runtime;version='[1.1.6,1.1.7)',\ - org.gecko.playground.wab.jersey;version=snapshot,\ - org.gecko.playground.http.jersey;version=snapshot,\ - org.gecko.playground.jaxb;version=snapshot,\ - com.sun.istack.commons-runtime;version='[4.1.1,4.1.2)',\ - com.sun.xml.bind.jaxb-impl;version='[4.0.2,4.0.3)',\ - jakarta.activation-api;version='[2.1.1,2.1.2)',\ - jakarta.annotation-api;version='[2.1.1,2.1.2)',\ - jakarta.inject.jakarta.inject-api;version='[2.0.1,2.0.2)',\ - jakarta.validation.jakarta.validation-api;version='[3.0.2,3.0.3)',\ - jakarta.ws.rs-api;version='[3.1.0,3.1.1)',\ - jakarta.xml.bind-api;version='[4.0.0,4.0.1)',\ - javassist;version='[3.29.2,3.29.3)',\ - org.apache.felix.http.jetty;version='[5.0.0,5.0.1)',\ - org.apache.felix.http.servlet-api;version='[2.1.0,2.1.1)',\ - org.apache.felix.scr;version='[2.2.6,2.2.7)',\ - org.apache.logging.log4j.api;version='[2.19.0,2.19.1)',\ - org.apache.logging.log4j.core;version='[2.19.0,2.19.1)',\ - org.apache.logging.log4j.slf4j-impl;version='[2.19.0,2.19.1)',\ - org.gecko.playground.txw2;version=snapshot,\ - org.glassfish.hk2.api;version='[3.0.3,3.0.4)',\ - org.glassfish.hk2.external.aopalliance-repackaged;version='[3.0.3,3.0.4)',\ - org.glassfish.hk2.locator;version='[3.0.3,3.0.4)',\ - org.glassfish.hk2.utils;version='[3.0.3,3.0.4)',\ - org.glassfish.jaxb.core;version='[4.0.2,4.0.3)',\ - org.glassfish.jersey.containers.jersey-container-servlet;version='[3.1.1,3.1.2)',\ - org.glassfish.jersey.containers.jersey-container-servlet-core;version='[3.1.1,3.1.2)',\ - org.glassfish.jersey.core.jersey-client;version='[3.1.1,3.1.2)',\ - org.glassfish.jersey.core.jersey-common;version='[3.1.1,3.1.2)',\ - org.glassfish.jersey.core.jersey-server;version='[3.1.1,3.1.2)',\ - org.glassfish.jersey.inject.jersey-hk2;version='[3.1.1,3.1.2)',\ - org.glassfish.jersey.media.jersey-media-jaxb;version='[3.1.1,3.1.2)',\ - org.glassfish.jersey.media.jersey-media-sse;version='[3.1.1,3.1.2)',\ - org.osgi.service.component;version='[1.5.1,1.5.2)',\ - org.osgi.service.log;version='[1.5.0,1.5.1)',\ - org.osgi.util.function;version='[1.2.0,1.2.1)',\ - org.osgi.util.promise;version='[1.3.0,1.3.1)',\ - slf4j.api;version='[1.7.36,1.7.37)' - --runbundles+: \ - org.apache.logging.log4j.api;startlevel=1,\ - org.apache.logging.log4j.core;startlevel=1,\ - org.gecko.playground.logging.log4j;startlevel=2,\ - *;startlevel=4 - --runrequires: \ - playground.logging;filter:='(playground.logging=log4j)',\ - playground.logging;filter:='(playground.logging=config)',\ - osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\ - osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\ - bnd.identity;id='org.gecko.playground.wab.jersey',\ - bnd.identity;id='org.gecko.playground.http.jersey',\ - bnd.identity;id='org.apache.felix.http.jetty';version:Version='4.0.6' - --runvm: -DlogFolderPath=${build}, \n\ - -Djetty.home.bundle=org.eclipse.jetty.osgi.boot --runblacklist: bnd.identity;id='slf4j.simple' \ No newline at end of file diff --git a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/ExampleResource.java b/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/ExampleResource.java deleted file mode 100644 index 55909872..00000000 --- a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/ExampleResource.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.gecko.playground.wab.jersey; - -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.CompletionStage; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.PathParam; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; - -@Path("") -public class ExampleResource { - - @GET - @Path("example") - public String sayHello() { - return "Hello"; - } - - @GET - @Path("cs/{name}") - @Produces(MediaType.TEXT_PLAIN) - public CompletionStage echoCompletionStage( - @PathParam("name") String value) { - - CompletableFuture cf = new CompletableFuture<>(); - - new Thread(() -> { - try { - Thread.sleep(2000); - } catch (Exception e) { - cf.completeExceptionally(e); - return; - } - cf.complete(value); - }).start(); - - return cf; - } - -} \ No newline at end of file diff --git a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/JerseyApplication.java b/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/JerseyApplication.java deleted file mode 100644 index 09acf2d0..00000000 --- a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/JerseyApplication.java +++ /dev/null @@ -1,29 +0,0 @@ -package org.gecko.playground.wab.jersey; - -import java.util.HashSet; -import java.util.Set; - -import jakarta.ws.rs.core.Application; - -import org.gecko.playground.http.jersey.annotations.RequireJersey; - -@RequireJersey -public class JerseyApplication extends Application { - - @Override - public Set getSingletons() { - Set singletons = new HashSet(); - return singletons; - } - - @Override - public Set> getClasses() { - Set> result = new HashSet>(); - result.add(ExampleResource.class); - result.add(StatusResource.class); - result.add(SseResource.class); - return result; - } - - -} \ No newline at end of file diff --git a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/SseResource.java b/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/SseResource.java deleted file mode 100644 index 8228b74a..00000000 --- a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/SseResource.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.gecko.playground.wab.jersey; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.Context; -import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.sse.OutboundSseEvent; -import jakarta.ws.rs.sse.Sse; -import jakarta.ws.rs.sse.SseEventSink; - -@Path("events") -public class SseResource { - - @GET - @Produces(MediaType.SERVER_SENT_EVENTS) - public void getServerSentEvents(@Context SseEventSink eventSink, @Context Sse sse) { - System.out.println("SSE Server " + sse + ", " + eventSink); - new Thread(() -> { - for (int i = 0; i < 10; i++) { - // ... code that waits 1 second - final OutboundSseEvent event = sse.newEventBuilder() - .name("message-to-client") - .data(String.class, "Hello world " + i + "!") - .build(); - eventSink.send(event); - } - }).start(); - } - - @GET - @Produces("text/plain") - public String getStatustest() { - return "sse active"; - } -} \ No newline at end of file diff --git a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/StatusResource.java b/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/StatusResource.java deleted file mode 100644 index d11d9453..00000000 --- a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/StatusResource.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved. - * - * This program and the accompanying materials are made available under the - * terms of the Eclipse Distribution License v. 1.0, which is available at - * http://www.eclipse.org/org/documents/edl-v10.php. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -package org.gecko.playground.wab.jersey; - -import java.util.Collections; - -import jakarta.ws.rs.GET; -import jakarta.ws.rs.Path; -import jakarta.ws.rs.Produces; -import jakarta.ws.rs.core.MediaType; -import jakarta.ws.rs.core.Response; - -import org.gecko.playground.jaxb.Address; -import org.gecko.playground.jaxb.Person; - -@Path("status") -public class StatusResource { - - @GET - @Produces(MediaType.TEXT_PLAIN) - public String getStatus() { - return "active"; - } - - @GET - @Produces(MediaType.APPLICATION_JSON) - public String getStatusJ() { - return "{ \"status\": \"active\" }"; - } - - @GET - @Produces(MediaType.APPLICATION_XML) - public Response getStatusXML() { - Person result = new Person(); - result.setFirstName("Emil"); - result.setLastName("Tester"); - result.setId("test"); - Address a = new Address(); - a.setStreet("Teststreet"); - a.setCity("Jena"); - a.setZIP("07745"); - result.setAddress(Collections.singletonList(a)); - return Response.ok(result).build(); - } -} \ No newline at end of file diff --git a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/package-info.java b/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/package-info.java deleted file mode 100644 index b0103393..00000000 --- a/org.gecko.playground.wab.jersey/src/org/gecko/playground/wab/jersey/package-info.java +++ /dev/null @@ -1,3 +0,0 @@ -@org.osgi.annotation.versioning.Version("1.0.0") -@org.osgi.annotation.bundle.Export -package org.gecko.playground.wab.jersey; diff --git a/org.gecko.playground.wab.jersey/testPersonJAXB.xml b/org.gecko.playground.wab.jersey/testPersonJAXB.xml deleted file mode 100644 index 87188c86..00000000 --- a/org.gecko.playground.wab.jersey/testPersonJAXB.xml +++ /dev/null @@ -1,11 +0,0 @@ - - -
- Teststreet - Jena - 07745 -
- Emil - Tester - test -
diff --git a/org.gecko.playground.wab.jersey/web.xml b/org.gecko.playground.wab.jersey/web.xml deleted file mode 100644 index 3fd223c5..00000000 --- a/org.gecko.playground.wab.jersey/web.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - javax.ws.rs.core.Application - org.glassfish.jersey.servlet.ServletContainer - - javax.ws.rs.Application - org.gecko.playground.wab.jersey.JerseyApplication - - 1 - true - - - javax.ws.rs.core.Application - /* - - diff --git a/org.gecko.playground.wab/.classpath b/org.gecko.playground.wab/.classpath deleted file mode 100644 index a52eb822..00000000 --- a/org.gecko.playground.wab/.classpath +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/org.gecko.playground.wab/.gitignore b/org.gecko.playground.wab/.gitignore deleted file mode 100644 index 57b34117..00000000 --- a/org.gecko.playground.wab/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/bin/ -/generated/ diff --git a/org.gecko.playground.wab/.project b/org.gecko.playground.wab/.project deleted file mode 100644 index 5bb597ed..00000000 --- a/org.gecko.playground.wab/.project +++ /dev/null @@ -1,23 +0,0 @@ - - - org.gecko.playground.wab - - - - - - org.eclipse.jdt.core.javabuilder - - - - - bndtools.core.bndbuilder - - - - - - org.eclipse.jdt.core.javanature - bndtools.core.bndnature - - diff --git a/org.gecko.playground.wab/.settings/org.eclipse.core.resources.prefs b/org.gecko.playground.wab/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 86d78168..00000000 --- a/org.gecko.playground.wab/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,4 +0,0 @@ -eclipse.preferences.version=1 -encoding//src/org/gecko/playground/wab/package-info.java=UTF-8 -encoding/=UTF-8 -encoding/bnd.bnd=UTF-8 diff --git a/org.gecko.playground.wab/.settings/org.eclipse.jdt.core.prefs b/org.gecko.playground.wab/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 8c9943d5..00000000 --- a/org.gecko.playground.wab/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,14 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=17 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=enabled -org.eclipse.jdt.core.compiler.source=17 diff --git a/org.gecko.playground.wab/bnd.bnd b/org.gecko.playground.wab/bnd.bnd deleted file mode 100644 index 70eeae69..00000000 --- a/org.gecko.playground.wab/bnd.bnd +++ /dev/null @@ -1,17 +0,0 @@ -Bundle-Version: 1.0.0.SNAPSHOT - --buildpath: \ - org.apache.felix.http.servlet-api;version=latest,\ - org.osgi.framework;version=latest,\ - slf4j.api;version=latest - - -Web-ContextPath: /test --wab: static/ - --includeresource: WEB-INF/web.xml=web.xml - -Export-Package: org.gecko.playground.wab - -Bundle-Name: Web Application Bundle Example -Bundle-Description: Gecko Playground Web Application Bundle Example \ No newline at end of file diff --git a/org.gecko.playground.wab/launch.bndrun b/org.gecko.playground.wab/launch.bndrun deleted file mode 100644 index f87def13..00000000 --- a/org.gecko.playground.wab/launch.bndrun +++ /dev/null @@ -1,41 +0,0 @@ --runfw: org.eclipse.osgi;version='[3.18.200.v20221116-1324,3.18.200.v20221116-1324]' --runee: JavaSE-17 --runprovidedcapabilities: ${native_capability} - --resolve.effective: active;skip:='osgi.service' - --runproperties: \ - osgi.console.enable.builtin=false,\ - osgi.console= - --runbundles: \ - org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\ - org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\ - org.gecko.playground.wab;version=snapshot,\ - org.gecko.playground.logging.config;version=snapshot,\ - org.gecko.playground.logging.log4j;version=snapshot,\ - org.apache.felix.gogo.runtime;version='[1.1.6,1.1.7)',\ - org.apache.aries.spifly.dynamic.framework.extension;version='[1.3.6,1.3.7)',\ - org.apache.felix.http.jetty;version='[5.0.0,5.0.1)',\ - org.apache.felix.http.servlet-api;version='[2.1.0,2.1.1)',\ - org.apache.logging.log4j.api;version='[2.19.0,2.19.1)',\ - org.apache.logging.log4j.core;version='[2.19.0,2.19.1)',\ - org.apache.logging.log4j.slf4j-impl;version='[2.19.0,2.19.1)',\ - slf4j.api;version='[1.7.36,1.7.37)' - --runbundles+: \ - org.apache.logging.log4j.api;startlevel=1,\ - org.apache.logging.log4j.core;startlevel=1,\ - org.gecko.playground.logging.log4j;startlevel=2,\ - *;startlevel=4 - --runrequires: \ - playground.logging;filter:='(playground.logging=log4j)',\ - playground.logging;filter:='(playground.logging=config)',\ - osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.shell)',\ - osgi.identity;filter:='(osgi.identity=org.apache.felix.gogo.command)',\ - bnd.identity;id='org.gecko.playground.wab' - --runvm: -DlogFolderPath=${build}, \n\ - -Djetty.home.bundle=org.eclipse.jetty.osgi.boot --runblacklist: bnd.identity;id='slf4j.simple' \ No newline at end of file diff --git a/org.gecko.playground.wab/src/org/gecko/playground/wab/ExampleServlet.java b/org.gecko.playground.wab/src/org/gecko/playground/wab/ExampleServlet.java deleted file mode 100644 index 885d1aaf..00000000 --- a/org.gecko.playground.wab/src/org/gecko/playground/wab/ExampleServlet.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.gecko.playground.wab; - -import java.io.IOException; -import java.io.PrintWriter; - -import jakarta.servlet.ServletException; -import jakarta.servlet.http.HttpServlet; -import jakarta.servlet.http.HttpServletRequest; -import jakarta.servlet.http.HttpServletResponse; - -import org.osgi.annotation.bundle.Requirement; -import org.osgi.annotation.bundle.Requirements; -import org.osgi.framework.BundleContext; - -@Requirements({ - @Requirement(namespace = "osgi.identity", filter = "(osgi.identity=org.apache.aries.spifly.dynamic.framework.extension)"), - @Requirement(namespace = "osgi.identity", filter = "(osgi.identity=org.apache.felix.http.jetty)") -}) -public class ExampleServlet extends HttpServlet { - - private static final long serialVersionUID = 1L; - private String message; - - public void init() throws ServletException { - message = "Hello World"; - } - - public void doGet(HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException { - BundleContext ctxt = (BundleContext) - request.getServletContext().getAttribute("osgi-bundlecontext"); - // Set response content type - response.setContentType("text/html"); - - // Actual logic goes here. - PrintWriter out = response.getWriter(); - out.println("

" + message + "

"); - out.println("

" + ctxt.getBundle(0).getSymbolicName() + "

"); - } - - public void destroy() { - // do nothing. - } - } diff --git a/org.gecko.playground.wab/src/org/gecko/playground/wab/package-info.java b/org.gecko.playground.wab/src/org/gecko/playground/wab/package-info.java deleted file mode 100644 index a0d86c87..00000000 --- a/org.gecko.playground.wab/src/org/gecko/playground/wab/package-info.java +++ /dev/null @@ -1,3 +0,0 @@ -@org.osgi.annotation.versioning.Version("1.0.0") -@org.osgi.annotation.bundle.Export -package org.gecko.playground.wab; diff --git a/org.gecko.playground.wab/static/index.html b/org.gecko.playground.wab/static/index.html deleted file mode 100644 index aa8765ed..00000000 --- a/org.gecko.playground.wab/static/index.html +++ /dev/null @@ -1,21 +0,0 @@ - - -Web development in OSGi?! - - -

How have resource replacement in OSGi.

-

Be bold in stating your key points. Put them in a list:

-
    -
  • The first item in your list
  • -
  • The second item; italicize key words
  • -
-

Improve your image by including an image.

-

A Great HTML Resource

-

Add a link to your favorite Web site. -Break up your page with a horizontal rule or two.

-
-

Finally, link to another page in your own Web site.

- -

© Data In Motion Consulting, 2021

- - diff --git a/org.gecko.playground.wab/web.xml b/org.gecko.playground.wab/web.xml deleted file mode 100644 index bea8ecfb..00000000 --- a/org.gecko.playground.wab/web.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - index.html - - - mytest - org.gecko.playground.wab.ExampleServlet - - - mytest - /servlet - - - default - - - diff --git a/org.gecko.playground.workmode/README.md b/org.gecko.playground.workmode/README.md new file mode 100644 index 00000000..ba3449ee --- /dev/null +++ b/org.gecko.playground.workmode/README.md @@ -0,0 +1,9 @@ +# `org.gecko.playground.workmode` + +This projects contains the implementation of an workmode management. + +It also contains console commands, that show, how to use it. + +There are service for Gogo commands and the component to start the workmode *framework*. Via a service you can trigger a workmode for your application. This can either be **ONLINE** or **OFFLINE** + +This is used in the *org.gecko.playground.task.demo* example application. diff --git a/org.gecko.playground.xmlresolver/README.md b/org.gecko.playground.xmlresolver/README.md new file mode 100644 index 00000000..6131eefa --- /dev/null +++ b/org.gecko.playground.xmlresolver/README.md @@ -0,0 +1,5 @@ +# `org.gecko.playground.xmlresolver` + +This project shows how to OSGify the xml.resolver as dependency for Saxon *org.gecko.playground.saxon*. + +This is done using a project template in *bndtools* for OSGify JAR's. It can be used a recipe. diff --git a/org.gecko.playground.xslt/README.md b/org.gecko.playground.xslt/README.md new file mode 100644 index 00000000..bfbb0cdc --- /dev/null +++ b/org.gecko.playground.xslt/README.md @@ -0,0 +1,11 @@ +# `org.gecko.playground.xslt` + +This project shows how to use XSLT transformation with different implementations. + +The *launch-saxon.bndrun* uses Saxon as engine *org.gecko.playground.saxon*, whereas the *launch.bndrun* uses the default transformator factory. + +The *ExampleXSLT* component shows how to deal with certain *Java - ServiceLoader* incompatibilities. + +This goes back to the Jakarta API's, that have no consistent internal search order over all API's. This leads to the situation, like in this case, that implementations can just be found in a monolithic classpath and not out of the box in OSGi. + +JAXB as example, can be found in OSGi.