Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dfee276

Browse files
committed
Initial commit
0 parents  commit dfee276

File tree

70 files changed

+1008
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+1008
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*/generated
2+
*/bin

agenda.console/.classpath

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" output="bin_test" path="test"/>
5+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
6+
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
7+
<classpathentry kind="output" path="bin"/>
8+
</classpath>

agenda.console/.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>agenda.console</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>bndtools.core.bndbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>bndtools.core.bndnature</nature>
22+
</natures>
23+
</projectDescription>

agenda.console/bnd.bnd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-buildpath: agenda.api;version=latest,\
2+
org.apache.felix.dependencymanager,\
3+
osgi.core,\
4+
org.apache.felix.gogo.runtime
5+
Private-Package: agenda.console
6+
Bundle-Activator: agenda.console.Activator
7+
Bundle-Version: 1.0.0

agenda.console/build.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project name="project" default="build">
3+
4+
<!-- -->
5+
6+
<import file="../cnf/build.xml" />
7+
</project>
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package agenda.console;
2+
3+
import java.util.Properties;
4+
5+
import org.apache.felix.dm.DependencyActivatorBase;
6+
import org.apache.felix.dm.DependencyManager;
7+
import org.apache.felix.service.command.CommandProcessor;
8+
import org.osgi.framework.BundleContext;
9+
10+
import agenda.api.Agenda;
11+
12+
public class Activator extends DependencyActivatorBase {
13+
14+
@Override
15+
public void destroy(BundleContext arg0, DependencyManager arg1)
16+
throws Exception {
17+
// TODO Auto-generated method stub
18+
19+
}
20+
21+
@Override
22+
public void init(BundleContext arg0, DependencyManager dm) throws Exception {
23+
Properties props = new Properties();
24+
props.put(CommandProcessor.COMMAND_SCOPE, "agenda");
25+
props.put(CommandProcessor.COMMAND_FUNCTION, new String[] {"lc", "ac"});
26+
27+
28+
dm.add(createComponent().setInterface(Object.class.getName(), props)
29+
.setImplementation(Console.class).add(createServiceDependency().setService(Agenda.class).setRequired(false)));
30+
}
31+
32+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package agenda.console;
2+
3+
import java.util.List;
4+
5+
import agenda.api.Agenda;
6+
import agenda.api.Conference;
7+
8+
public class Console {
9+
private volatile Agenda agenda;
10+
11+
public void lc() {
12+
List<Conference> conferences = agenda.listConferences();
13+
if (conferences != null) {
14+
for (Conference conference : conferences) {
15+
System.out.println(conference);
16+
}
17+
} else {
18+
System.out.println("Agenda not available");
19+
}
20+
21+
}
22+
23+
public void ac(String name, String location) {
24+
agenda.addConference(new Conference(name, location));
25+
}
26+
}

agenda.ui/.classpath

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" output="bin_test" path="test"/>
5+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
6+
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
7+
<classpathentry kind="output" path="bin"/>
8+
</classpath>

agenda.ui/.project

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>agenda.ui</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>bndtools.core.bndbuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
</buildSpec>
19+
<natures>
20+
<nature>org.eclipse.jdt.core.javanature</nature>
21+
<nature>bndtools.core.bndnature</nature>
22+
</natures>
23+
</projectDescription>

agenda.ui/bnd.bnd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Include-Resource: agendaui=static
2+
X-Web-Resource-Version: 1.0
3+
X-Web-Resource: agendaui
4+
Bundle-Version: 1.0.0

0 commit comments

Comments
 (0)