-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Mark Hoffmann <m.hoffmann@data-in-motion.biz>
- Loading branch information
Showing
97 changed files
with
13,176 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+11.5 KB
cnf/local/org.gecko.playground.template/org.gecko.playground.template-1.0.0.jar
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="aQute.bnd.classpath.container"/> | ||
<classpathentry kind="src" output="bin" path="src"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>de.gecko.playground.ds.inject</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>bndtools.core.bndbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>bndtools.core.bndnature</nature> | ||
</natures> | ||
</projectDescription> |
4 changes: 4 additions & 0 deletions
4
de.gecko.playground.ds.inject/.settings/org.eclipse.core.resources.prefs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
eclipse.preferences.version=1 | ||
encoding//configs/config.json=UTF-8 | ||
encoding/<project>=UTF-8 | ||
encoding/bnd.bnd=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-sub: *.bnd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
-includeresource: OSGI-INF/configurator/=configs/ | ||
Require-Capability: osgi.extender;filter:='(osgi.extender=osgi.configurator)' | ||
-resourceonly: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
":configurator:resource-version": 1, | ||
|
||
"TestConfig": | ||
{ | ||
"salutation": "Hello" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
-privatepackage: de.gecko.playground.ds.inject |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
-runee: JavaSE-17 | ||
-runrequires: \ | ||
osgi.identity;filter:='(&(osgi.identity=org.apache.felix.configadmin)(version>=1.9.26))',\ | ||
bnd.identity;id='org.apache.felix.gogo.command',\ | ||
bnd.identity;id='org.apache.felix.gogo.shell',\ | ||
bnd.identity;id='de.gecko.playground.ds.inject.config',\ | ||
bnd.identity;id='de.gecko.playground.ds.inject.impl' | ||
-runfw: org.apache.felix.framework;version='[7.0.5,7.0.5]' | ||
-runbundles: \ | ||
org.apache.felix.cm.json;version='[2.0.0,2.0.1)',\ | ||
org.apache.felix.configurator;version='[1.0.18,1.0.19)',\ | ||
org.apache.felix.scr;version='[2.2.6,2.2.7)',\ | ||
org.eclipse.parsson.jakarta.json;version='[1.1.2,1.1.3)',\ | ||
org.osgi.service.component;version='[1.5.1,1.5.2)',\ | ||
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.apache.felix.configadmin;version='[1.9.26,1.9.27)',\ | ||
org.apache.felix.gogo.command;version='[1.1.2,1.1.3)',\ | ||
org.apache.felix.gogo.runtime;version='[1.1.6,1.1.7)',\ | ||
org.apache.felix.gogo.shell;version='[1.1.4,1.1.5)',\ | ||
de.gecko.playground.ds.inject.config;version=snapshot,\ | ||
de.gecko.playground.ds.inject.impl;version=snapshot |
25 changes: 25 additions & 0 deletions
25
de.gecko.playground.ds.inject/src/de/gecko/playground/ds/inject/ITest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Copyright (c) 2012 - 2023 Data In Motion and others. | ||
* All rights reserved. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Data In Motion - initial API and implementation | ||
*/ | ||
package de.gecko.playground.ds.inject; | ||
|
||
/** | ||
* | ||
* @author mark | ||
* @since 14.11.2023 | ||
*/ | ||
public interface ITest { | ||
|
||
public String sayHello(String name); | ||
|
||
} |
59 changes: 59 additions & 0 deletions
59
de.gecko.playground.ds.inject/src/de/gecko/playground/ds/inject/Test.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/** | ||
* Copyright (c) 2012 - 2023 Data In Motion and others. | ||
* All rights reserved. | ||
* | ||
* This program and the accompanying materials are made | ||
* available under the terms of the Eclipse Public License 2.0 | ||
* which is available at https://www.eclipse.org/legal/epl-2.0/ | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Data In Motion - initial API and implementation | ||
*/ | ||
package de.gecko.playground.ds.inject; | ||
|
||
import java.util.concurrent.atomic.AtomicReference; | ||
|
||
import org.osgi.service.component.annotations.Activate; | ||
import org.osgi.service.component.annotations.Component; | ||
import org.osgi.service.component.annotations.ConfigurationPolicy; | ||
import org.osgi.service.component.annotations.Modified; | ||
|
||
/** | ||
* | ||
* @author mark | ||
* @since 14.11.2023 | ||
*/ | ||
@Component(name="TestConfig", configurationPolicy = ConfigurationPolicy.REQUIRE) | ||
public class Test implements ITest { | ||
|
||
private AtomicReference<Config> config = new AtomicReference<>(); | ||
|
||
@interface Config { | ||
String salutation(); | ||
} | ||
|
||
@Activate | ||
public void activate(Config config) { | ||
this.config.compareAndSet(null, config); | ||
System.out.println("activate config"); | ||
} | ||
|
||
@Modified | ||
public void modified(Config config) { | ||
Config current = this.config.get(); | ||
this.config.compareAndSet(current, config); | ||
System.out.println("modified config"); | ||
} | ||
|
||
/* | ||
* (non-Javadoc) | ||
* @see de.gecko.playground.ds.inject.ITest#sayHello(java.lang.String) | ||
*/ | ||
@Override | ||
public String sayHello(String name) { | ||
return config.get().salutation() + " " + name; | ||
} | ||
|
||
} |
Oops, something went wrong.