Mercurial > people > jerboaa > scheduler-plugin
changeset 0:3bb739619e95 tutorial_day_1
Initial plugin code.
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.hgignore Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,15 @@ +/target/ + +syntax: regexp +# Ignore all {.classpath,.project,.settings/*} files except for folders in +# eclipse +# +# Using negative lookahead expression +^(?!eclipse).*\.(settings|project|classpath) + +syntax: glob +target/* +bin/* +*~ +nbactions*.xml +nb-configuration.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/.classpath Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="target/classes" path="src/main/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/.project Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>thermostat-thread-client-common</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/.settings/org.eclipse.core.resources.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/main/resources=UTF-8 +encoding//src/test/java=UTF-8 +encoding/<project>=UTF-8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/.settings/org.eclipse.jdt.core.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/.settings/org.eclipse.m2e.core.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/.settings/org.eclipse.pde.core.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,2 @@ +BUNDLE_ROOT_PATH=target/classes +eclipse.preferences.version=1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/pom.xml Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright 2012, 2013 Red Hat, Inc. + + This file is part of Thermostat. + + Thermostat is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + Thermostat is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Thermostat; see the file COPYING. If not see + <http://www.gnu.org/licenses />. + + Linking this code with other modules is making a combined work + based on this code. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + As a special exception, the copyright holders of this code give + you permission to link this code with independent modules to + produce an executable, regardless of the license terms of these + independent modules, and to copy and distribute the resulting + executable under terms of your choice, provided that you also + meet, for each linked independent module, the terms and conditions + of the license of that module. An independent module is a module + which is not derived from or based on this code. If you modify + this code, you may extend this exception to your version of the + library, but you are not obligated to do so. If you do not wish + to do so, delete this exception statement from your version. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>com.redhat.thermostat.tutorial.schedule</groupId> + <artifactId>thermostat-tutorial</artifactId> + <version>0.0.1-SNAPSHOT</version> + </parent> + + <artifactId>thermostat-tutorial-client-common</artifactId> + <packaging>bundle</packaging> + + <name>Thermostat Schedule Client Common</name> + + <dependencies> + + <!-- osgi and test dependencies --> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.compendium</artifactId> + <scope>provided</scope> + </dependency> + + <!-- thermostat specific dependencies --> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-client-core</artifactId> + <type>jar</type> + </dependency> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-common-core</artifactId> + <type>jar</type> + </dependency> + + <!-- plugin specific dependencies --> + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-Vendor>Red Hat, Inc.</Bundle-Vendor> + <Bundle-SymbolicName>com.redhat.thermostat.tutorial.schedule.client.common</Bundle-SymbolicName> + <Export-Package> + com.redhat.thermostat.tutorial.schedule.client.common, + </Export-Package> + <!-- Do not autogenerate uses clauses in Manifests --> + <_nouses>true</_nouses> + </instructions> + </configuration> + </plugin> + </plugins> + </build> + +</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/src/main/java/com/redhat/thermostat/tutorial/schedule/client/common/SchedulerView.java Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,64 @@ +/* + * Copyright 2012, 2013 Red Hat, Inc. + * + * This file is part of Thermostat. + * + * Thermostat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * Thermostat is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Thermostat; see the file COPYING. If not see + * <http://www.gnu.org/licenses/>. + * + * Linking this code with other modules is making a combined work + * based on this code. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this code give + * you permission to link this code with independent modules to + * produce an executable, regardless of the license terms of these + * independent modules, and to copy and distribute the resulting + * executable under terms of your choice, provided that you also + * meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module + * which is not derived from or based on this code. If you modify + * this code, you may extend this exception to your version of the + * library, but you are not obligated to do so. If you do not wish + * to do so, delete this exception statement from your version. + */ + +package com.redhat.thermostat.tutorial.schedule.client.common; + +import com.redhat.thermostat.client.core.views.BasicView; +import com.redhat.thermostat.client.core.views.UIComponent; +import com.redhat.thermostat.client.core.views.View; + +/** + * This class represents a Thermostat {@link View}. + * + * <br /><br /> + * + * In the current version of Thermostat there is always one main view + * per plugin, although plugins can have as many secondary views as they need. + * The main view is allocated a special space in the general UI (typically a + * tab). The main view is responsible to handle and layout any subview or + * component. + * + * <br /><br /> + * + * The {@link UIComponent} interface is a special marker. It is used by the + * controller code responsible to instantiate and load the UI components into + * the main interface. The code depends on the client implementation (at this + * moment Swing and Eclipse) so is important to mark the actual implementation\ + * class with the correct {@link UIComponent} specialisation. + */ +public abstract class SchedulerView extends BasicView implements UIComponent { + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/src/main/java/com/redhat/thermostat/tutorial/schedule/client/common/SchedulerViewProvider.java Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,54 @@ +/* + * Copyright 2012, 2013 Red Hat, Inc. + * + * This file is part of Thermostat. + * + * Thermostat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * Thermostat is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Thermostat; see the file COPYING. If not see + * <http://www.gnu.org/licenses/>. + * + * Linking this code with other modules is making a combined work + * based on this code. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this code give + * you permission to link this code with independent modules to + * produce an executable, regardless of the license terms of these + * independent modules, and to copy and distribute the resulting + * executable under terms of your choice, provided that you also + * meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module + * which is not derived from or based on this code. If you modify + * this code, you may extend this exception to your version of the + * library, but you are not obligated to do so. If you do not wish + * to do so, delete this exception statement from your version. + */ + +package com.redhat.thermostat.tutorial.schedule.client.common; + +import com.redhat.thermostat.client.core.views.ViewProvider; + +/** + * A {@link ViewProvider} is a class that is responsible to create Views. + * + * <br /><br /> + * + * Is a good idea to delegate the actual task to a concrete implementation + * registered in a different {@link Activator} so to have the ability to support + * all the GUI framework used in Thermostat. + */ +public interface SchedulerViewProvider extends ViewProvider { + + @Override + SchedulerView createView(); +}
Binary file client-common/src/main/resources/com/redhat/thermostat/thread/client/common/gtk-media-record.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-common/src/main/resources/com/redhat/thermostat/thread/client/common/locale/strings.properties Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,30 @@ +MISSING_INFO = Missing Information + +NAME = Name +ID = ID +START = Started +STOP = Stopped +WAIT_COUNT = Wait Count +BLOCK_COUNT = Blocked Count +RUNNING = Running % +WAITING = Waiting % +SLEEPING = Sleeping % +MONITOR = Monitor % + +START_RECORDING = Start Recording +STOP_RECORDING = Stop Recording +THREAD_MONITOR_SWITCH = Monitor Thread + +VM_CAPABILITIES = VM Capabilities +TABLE = Table +DETAILS = Details +TIMELINE = Timeline +THREAD_COUNT = Thread Count + +LIVE_THREADS = Live Threads +DAEMON_THREADS = Daemon Threads + +THREAD_CONTROL_PANEL = Thread Control Panel +THREAD_DUMP = Thread Dump + +THREAD_DETAILS_EMTPY = Please double-click on a thread in the thread table
Binary file client-common/src/main/resources/com/redhat/thermostat/thread/client/common/monitor.png has changed
Binary file client-common/src/main/resources/com/redhat/thermostat/thread/client/common/record.png has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/.classpath Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="target/classes" path="src/main/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/.project Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>thermostat-thread-client-controllers</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/.settings/org.eclipse.core.resources.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/<project>=UTF-8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/.settings/org.eclipse.jdt.core.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/.settings/org.eclipse.m2e.core.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/.settings/org.eclipse.pde.core.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,2 @@ +BUNDLE_ROOT_PATH=target/classes +eclipse.preferences.version=1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/pom.xml Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,139 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright 2012, 2013 Red Hat, Inc. + + This file is part of Thermostat. + + Thermostat is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + Thermostat is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Thermostat; see the file COPYING. If not see + <http://www.gnu.org/licenses />. + + Linking this code with other modules is making a combined work + based on this code. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + As a special exception, the copyright holders of this code give + you permission to link this code with independent modules to + produce an executable, regardless of the license terms of these + independent modules, and to copy and distribute the resulting + executable under terms of your choice, provided that you also + meet, for each linked independent module, the terms and conditions + of the license of that module. An independent module is a module + which is not derived from or based on this code. If you modify + this code, you may extend this exception to your version of the + library, but you are not obligated to do so. If you do not wish + to do so, delete this exception statement from your version. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>com.redhat.thermostat.tutorial.schedule</groupId> + <artifactId>thermostat-tutorial</artifactId> + <version>0.0.1-SNAPSHOT</version> + </parent> + + <artifactId>thermostat-tutorial-client-controllers</artifactId> + <packaging>bundle</packaging> + + <name>Thermostat Schedule Client Controllers</name> + + <dependencies> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.compendium</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.easytesting</groupId> + <artifactId>fest-swing</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>net.java.openjdk.cacio</groupId> + <artifactId>cacio-tta</artifactId> + <scope>test</scope> + </dependency> + + <!-- thermostat specific dependencies --> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-client-core</artifactId> + <type>jar</type> + </dependency> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-common-core</artifactId> + <type>jar</type> + </dependency> + + <!-- plugin specific dependencies --> + + <dependency> + <groupId>com.redhat.thermostat.tutorial.schedule</groupId> + <artifactId>thermostat-tutorial-client-common</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-Vendor>Red Hat, Inc.</Bundle-Vendor> + <Bundle-Activator>com.redhat.thermostat.tutorial.schedule.client.controller.osgi.Activator</Bundle-Activator> + <Bundle-SymbolicName>com.redhat.thermostat.tutorial.schedule.client.controller</Bundle-SymbolicName> + <Private-Package> + com.redhat.thermostat.tutorial.schedule.client.controller.osgi, + com.redhat.thermostat.tutorial.schedule.client.controller.impl, + </Private-Package> + <!-- Do not autogenerate uses clauses in Manifests --> + <_nouses>true</_nouses> + </instructions> + </configuration> + </plugin> + </plugins> + </build> + +</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/src/main/java/com/redhat/thermostat/tutorial/schedule/client/controller/impl/SchedulerInformationService.java Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,84 @@ +/* + * Copyright 2012, 2013 Red Hat, Inc. + * + * This file is part of Thermostat. + * + * Thermostat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * Thermostat is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Thermostat; see the file COPYING. If not see + * <http://www.gnu.org/licenses/>. + * + * Linking this code with other modules is making a combined work + * based on this code. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this code give + * you permission to link this code with independent modules to + * produce an executable, regardless of the license terms of these + * independent modules, and to copy and distribute the resulting + * executable under terms of your choice, provided that you also + * meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module + * which is not derived from or based on this code. If you modify + * this code, you may extend this exception to your version of the + * library, but you are not obligated to do so. If you do not wish + * to do so, delete this exception statement from your version. + */ + +package com.redhat.thermostat.tutorial.schedule.client.controller.impl; + +import com.redhat.thermostat.client.core.Filter; +import com.redhat.thermostat.client.core.InformationService; +import com.redhat.thermostat.client.core.NameMatchingRefFilter; +import com.redhat.thermostat.client.core.controllers.InformationServiceController; +import com.redhat.thermostat.common.ApplicationService; +import com.redhat.thermostat.common.dao.HostRef; +import com.redhat.thermostat.tutorial.schedule.client.common.SchedulerViewProvider; + +/** + * Implementation of an {@code InformationService} for {@code HostRef}s. + * + * <br /><br /> + * + * The {@code HostRef} indicates that this service will collect informations + * that are not related to a single vm, but rather to the system as a whole. + * + * <br /><br /> + */ +public class SchedulerInformationService implements InformationService<HostRef> { + + private static final Filter<HostRef> FILTER = new NameMatchingRefFilter<>(); + + private ApplicationService applicationService; + private SchedulerViewProvider schedulerProvider; + + public SchedulerInformationService(ApplicationService applicationService, SchedulerViewProvider schedulerProvider) { + this.applicationService = applicationService; + this.schedulerProvider = schedulerProvider; + } + + @Override + public Filter<HostRef> getFilter() { + return FILTER; + } + + @Override + public InformationServiceController<HostRef> getInformationServiceController(HostRef ref) { + return new SchedulerMainController(applicationService, schedulerProvider); + } + + @Override + public int getOrderValue() { + return ORDER_DEFAULT_GROUP + 1; + } + +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/src/main/java/com/redhat/thermostat/tutorial/schedule/client/controller/impl/SchedulerMainController.java Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,71 @@ +/* + * Copyright 2012, 2013 Red Hat, Inc. + * + * This file is part of Thermostat. + * + * Thermostat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * Thermostat is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Thermostat; see the file COPYING. If not see + * <http://www.gnu.org/licenses/>. + * + * Linking this code with other modules is making a combined work + * based on this code. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this code give + * you permission to link this code with independent modules to + * produce an executable, regardless of the license terms of these + * independent modules, and to copy and distribute the resulting + * executable under terms of your choice, provided that you also + * meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module + * which is not derived from or based on this code. If you modify + * this code, you may extend this exception to your version of the + * library, but you are not obligated to do so. If you do not wish + * to do so, delete this exception statement from your version. + */ + +package com.redhat.thermostat.tutorial.schedule.client.controller.impl; + +import com.redhat.thermostat.client.core.controllers.InformationServiceController; +import com.redhat.thermostat.client.core.views.UIComponent; +import com.redhat.thermostat.common.ApplicationService; +import com.redhat.thermostat.common.dao.HostRef; +import com.redhat.thermostat.tutorial.schedule.client.common.SchedulerView; +import com.redhat.thermostat.tutorial.schedule.client.common.SchedulerViewProvider; + +/** + * Main controller for the Scheduler plugin. + */ +public class SchedulerMainController implements InformationServiceController<HostRef> { + private ApplicationService applicationService; + private SchedulerViewProvider schedulerProvider; + + private SchedulerView view; + + SchedulerMainController(ApplicationService applicationService, SchedulerViewProvider schedulerProvider) { + this.applicationService = applicationService; + this.schedulerProvider = schedulerProvider; + + view = schedulerProvider.createView(); + } + + @Override + public String getLocalizedName() { + return "Scheduler"; + } + + @Override + public UIComponent getView() { + return view; + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-controllers/src/main/java/com/redhat/thermostat/tutorial/schedule/client/controller/osgi/Activator.java Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,98 @@ +/* + * Copyright 2012, 2013 Red Hat, Inc. + * + * This file is part of Thermostat. + * + * Thermostat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * Thermostat is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Thermostat; see the file COPYING. If not see + * <http://www.gnu.org/licenses/>. + * + * Linking this code with other modules is making a combined work + * based on this code. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this code give + * you permission to link this code with independent modules to + * produce an executable, regardless of the license terms of these + * independent modules, and to copy and distribute the resulting + * executable under terms of your choice, provided that you also + * meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module + * which is not derived from or based on this code. If you modify + * this code, you may extend this exception to your version of the + * library, but you are not obligated to do so. If you do not wish + * to do so, delete this exception statement from your version. + */ + +package com.redhat.thermostat.tutorial.schedule.client.controller.osgi; + +import com.redhat.thermostat.client.core.InformationService; +import com.redhat.thermostat.common.ApplicationService; +import com.redhat.thermostat.common.Constants; +import com.redhat.thermostat.common.MultipleServiceTracker; +import com.redhat.thermostat.common.MultipleServiceTracker.Action; +import com.redhat.thermostat.common.dao.HostRef; +import com.redhat.thermostat.tutorial.schedule.client.common.SchedulerViewProvider; +import com.redhat.thermostat.tutorial.schedule.client.controller.impl.SchedulerInformationService; +import java.util.Dictionary; +import java.util.Hashtable; +import java.util.Map; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceRegistration; + +/** + * Activator for the main plugin controller (client controller). + */ +public class Activator implements BundleActivator { + + @Override + public void start(final BundleContext context) throws Exception { + Class[] classes = new Class[]{ + ApplicationService.class, + SchedulerViewProvider.class, + }; + + Action action = new Action() { + private ServiceRegistration registration; + + @Override + public void dependenciesAvailable(Map<String, Object> services) { + ApplicationService applicationService = (ApplicationService) services.get(ApplicationService.class.getName()); + SchedulerViewProvider schedulerProvider = (SchedulerViewProvider) services.get(SchedulerViewProvider.class.getName()); + + InformationService<HostRef> infoService = new SchedulerInformationService(applicationService, schedulerProvider); + Dictionary<String, String> properties = new Hashtable<>(); + + // this line is important, since is the actual place we inform + // the framework that this is a HostRef type service + properties.put(Constants.GENERIC_SERVICE_CLASSNAME, HostRef.class.getName()); + + registration = context.registerService(InformationService.class.getName(), infoService, properties); + } + + @Override + public void dependenciesUnavailable() { + registration.unregister(); + } + }; + + MultipleServiceTracker tracker = new MultipleServiceTracker(context, classes, action); + tracker.open(); + } + + @Override + public void stop(BundleContext bc) throws Exception { + // nothing to do here + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/.classpath Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" output="target/classes" path="src/main/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="src" output="target/test-classes" path="src/test/java"> + <attributes> + <attribute name="optional" value="true"/> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> + <attributes> + <attribute name="maven.pomderived" value="true"/> + </attributes> + </classpathentry> + <classpathentry kind="output" path="target/classes"/> +</classpath>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/.project Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>thermostat-thread-client-swing</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>org.eclipse.m2e.core.maven2Builder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.pde.PluginNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>org.eclipse.m2e.core.maven2Nature</nature> + </natures> +</projectDescription>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/.settings/org.eclipse.core.resources.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,4 @@ +eclipse.preferences.version=1 +encoding//src/main/java=UTF-8 +encoding//src/test/java=UTF-8 +encoding/<project>=UTF-8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/.settings/org.eclipse.jdt.core.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,5 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning +org.eclipse.jdt.core.compiler.source=1.7
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/.settings/org.eclipse.m2e.core.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,4 @@ +activeProfiles= +eclipse.preferences.version=1 +resolveWorkspaceProjects=true +version=1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/.settings/org.eclipse.pde.core.prefs Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,2 @@ +BUNDLE_ROOT_PATH=target/classes +eclipse.preferences.version=1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/pom.xml Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright 2012, 2013 Red Hat, Inc. + + This file is part of Thermostat. + + Thermostat is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + Thermostat is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Thermostat; see the file COPYING. If not see + <http://www.gnu.org/licenses />. + + Linking this code with other modules is making a combined work + based on this code. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + As a special exception, the copyright holders of this code give + you permission to link this code with independent modules to + produce an executable, regardless of the license terms of these + independent modules, and to copy and distribute the resulting + executable under terms of your choice, provided that you also + meet, for each linked independent module, the terms and conditions + of the license of that module. An independent module is a module + which is not derived from or based on this code. If you modify + this code, you may extend this exception to your version of the + library, but you are not obligated to do so. If you do not wish + to do so, delete this exception statement from your version. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>com.redhat.thermostat.tutorial.schedule</groupId> + <artifactId>thermostat-tutorial</artifactId> + <version>0.0.1-SNAPSHOT</version> + </parent> + + <artifactId>thermostat-tutorial-client-swing</artifactId> + <packaging>bundle</packaging> + + <name>Thermostat Schedule Swing Client</name> + + <dependencies> + + <!-- osgi and test dependencies --> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.compendium</artifactId> + <scope>provided</scope> + </dependency> + + <!-- thermostat specific dependencies --> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-common-core</artifactId> + <type>jar</type> + </dependency> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-client-core</artifactId> + <type>jar</type> + </dependency> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-client-swing</artifactId> + <version>0.5.0-SNAPSHOT</version> + <type>jar</type> + </dependency> + + <!-- plugin specific dependencies --> + + <dependency> + <groupId>com.redhat.thermostat.tutorial.schedule</groupId> + <artifactId>thermostat-tutorial-client-common</artifactId> + <version>${project.version}</version> + <type>jar</type> + </dependency> + + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <extensions>true</extensions> + <configuration> + <instructions> + <Bundle-Vendor>Red Hat, Inc.</Bundle-Vendor> + <Bundle-SymbolicName>com.redhat.thermostat.tutorial.schedule.client.swing</Bundle-SymbolicName> + <Bundle-Activator>com.redhat.thermostat.tutorial.schedule.client.swing.osgi.Activator</Bundle-Activator> + <Export-Package> + </Export-Package> + <Private-Package> + com.redhat.thermostat.tutorial.schedule.client.swing.impl, + com.redhat.thermostat.tutorial.schedule.client.swing.osgi, + </Private-Package> + <!-- Do not autogenerate uses clauses in Manifests --> + <_nouses>true</_nouses> + </instructions> + </configuration> + </plugin> + </plugins> + </build> + +</project>
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/src/main/java/com/redhat/thermostat/tutorial/schedule/client/swing/impl/SwingSchedulerView.java Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,56 @@ +/* + * Copyright 2012, 2013 Red Hat, Inc. + * + * This file is part of Thermostat. + * + * Thermostat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * Thermostat is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Thermostat; see the file COPYING. If not see + * <http://www.gnu.org/licenses/>. + * + * Linking this code with other modules is making a combined work + * based on this code. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this code give + * you permission to link this code with independent modules to + * produce an executable, regardless of the license terms of these + * independent modules, and to copy and distribute the resulting + * executable under terms of your choice, provided that you also + * meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module + * which is not derived from or based on this code. If you modify + * this code, you may extend this exception to your version of the + * library, but you are not obligated to do so. If you do not wish + * to do so, delete this exception statement from your version. + */ + +package com.redhat.thermostat.tutorial.schedule.client.swing.impl; + +import com.redhat.thermostat.client.swing.SwingComponent; +import com.redhat.thermostat.tutorial.schedule.client.common.SchedulerView; +import java.awt.Component; +import javax.swing.JLabel; + +/** + * This is an actual Swing based implementation of a Thermostat {@link View}. + */ +public class SwingSchedulerView extends SchedulerView implements SwingComponent { + + public SwingSchedulerView() { + } + + @Override + public Component getUiComponent() { + return new JLabel("Scheduler is here!"); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/src/main/java/com/redhat/thermostat/tutorial/schedule/client/swing/impl/SwingSchedulerViewProvider.java Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,51 @@ +/* + * Copyright 2012, 2013 Red Hat, Inc. + * + * This file is part of Thermostat. + * + * Thermostat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * Thermostat is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Thermostat; see the file COPYING. If not see + * <http://www.gnu.org/licenses/>. + * + * Linking this code with other modules is making a combined work + * based on this code. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this code give + * you permission to link this code with independent modules to + * produce an executable, regardless of the license terms of these + * independent modules, and to copy and distribute the resulting + * executable under terms of your choice, provided that you also + * meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module + * which is not derived from or based on this code. If you modify + * this code, you may extend this exception to your version of the + * library, but you are not obligated to do so. If you do not wish + * to do so, delete this exception statement from your version. + */ + +package com.redhat.thermostat.tutorial.schedule.client.swing.impl; + +import com.redhat.thermostat.tutorial.schedule.client.common.SchedulerView; +import com.redhat.thermostat.tutorial.schedule.client.common.SchedulerViewProvider; + +/** + * Swing implementation for the View provider. + */ +public class SwingSchedulerViewProvider implements SchedulerViewProvider { + + @Override + public SchedulerView createView() { + return new SwingSchedulerView(); + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client-swing/src/main/java/com/redhat/thermostat/tutorial/schedule/client/swing/osgi/Activator.java Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,71 @@ +/* + * Copyright 2012, 2013 Red Hat, Inc. + * + * This file is part of Thermostat. + * + * Thermostat is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published + * by the Free Software Foundation; either version 2, or (at your + * option) any later version. + * + * Thermostat is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Thermostat; see the file COPYING. If not see + * <http://www.gnu.org/licenses/>. + * + * Linking this code with other modules is making a combined work + * based on this code. Thus, the terms and conditions of the GNU + * General Public License cover the whole combination. + * + * As a special exception, the copyright holders of this code give + * you permission to link this code with independent modules to + * produce an executable, regardless of the license terms of these + * independent modules, and to copy and distribute the resulting + * executable under terms of your choice, provided that you also + * meet, for each linked independent module, the terms and conditions + * of the license of that module. An independent module is a module + * which is not derived from or based on this code. If you modify + * this code, you may extend this exception to your version of the + * library, but you are not obligated to do so. If you do not wish + * to do so, delete this exception statement from your version. + */ + +package com.redhat.thermostat.tutorial.schedule.client.swing.osgi; + +import com.redhat.thermostat.common.ApplicationService; +import com.redhat.thermostat.tutorial.schedule.client.common.SchedulerViewProvider; +import com.redhat.thermostat.tutorial.schedule.client.swing.impl.SwingSchedulerViewProvider; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; +import org.osgi.framework.ServiceReference; +import org.osgi.util.tracker.ServiceTracker; + +/** + * Simple Activator for Swing Client Scheduler Thermostat Plugin + */ +public class Activator implements BundleActivator { + + @Override + public void start(BundleContext context) throws Exception { + @SuppressWarnings({"rawtypes", "unchecked"}) + ServiceTracker tracker = new ServiceTracker(context, ApplicationService.class.getName(), null) { + @Override + public Object addingService(ServiceReference reference) { + + context.registerService(SchedulerViewProvider.class.getName(), new SwingSchedulerViewProvider(), null); + + return super.addingService(reference); + } + }; + tracker.open(); + } + + @Override + public void stop(BundleContext context) throws Exception { + // nothing to do here + } +}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/copy_jars.sh Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,10 @@ +#/bin/sh +if [ x"$THERMOSTAT_DEV_HOME" = x ] ; then + echo "variable THERMOSTAT_DEV_HOME is not set, should point to the thermostat distribution/target directory" + exit -1 +fi + +cp -v ./client-controllers/target/thermostat-tutorial-client-controllers-0.0.1-SNAPSHOT.jar $THERMOSTAT_DEV_HOME/distribution/target/libs +cp -v ./client-swing/target/thermostat-tutorial-client-swing-0.0.1-SNAPSHOT.jar $THERMOSTAT_DEV_HOME/distribution/target/libs +cp -v ./client-common/target/thermostat-tutorial-client-common-0.0.1-SNAPSHOT.jar $THERMOSTAT_DEV_HOME/distribution/target/libs +
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pom.xml Fri Jan 25 16:13:46 2013 +0100 @@ -0,0 +1,209 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Copyright 2012, 2013 Red Hat, Inc. + + This file is part of Thermostat. + + Thermostat is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published + by the Free Software Foundation; either version 2, or (at your + option) any later version. + + Thermostat is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Thermostat; see the file COPYING. If not see + <http://www.gnu.org/licenses />. + + Linking this code with other modules is making a combined work + based on this code. Thus, the terms and conditions of the GNU + General Public License cover the whole combination. + + As a special exception, the copyright holders of this code give + you permission to link this code with independent modules to + produce an executable, regardless of the license terms of these + independent modules, and to copy and distribute the resulting + executable under terms of your choice, provided that you also + meet, for each linked independent module, the terms and conditions + of the license of that module. An independent module is a module + which is not derived from or based on this code. If you modify + this code, you may extend this exception to your version of the + library, but you are not obligated to do so. If you do not wish + to do so, delete this exception statement from your version. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>com.redhat.thermostat.tutorial.schedule</groupId> + <artifactId>thermostat-tutorial</artifactId> + <version>0.0.1-SNAPSHOT</version> + <packaging>pom</packaging> + + <name>Thermostat Schedule</name> + <url>${thermostat.url}</url> + + <properties> + + <main.basedir>${project.basedir}</main.basedir> + + <maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format> + <thermostat.url>http://icedtea.classpath.org/thermostat/</thermostat.url> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <thermostat.java.version>1.7</thermostat.java.version> + <junit.version>4.10</junit.version> + <mockito.version>1.9.0</mockito.version> + <fest.version>1.2.1</fest.version> + + <java.dir>/usr/share/java</java.dir> + + <osgi.core.version>4.2.0</osgi.core.version> + <osgi.compendium.version>4.2.0</osgi.compendium.version> + <felix.framework.version>4.0.2</felix.framework.version> + + </properties> + + <repositories> + <repository> + <id>repository.jboss.org</id> + <url>https://repository.jboss.org/nexus/content/repositories/releases/</url> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + <repository> + <id>com.springsource.repository.bundles.release</id> + <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name> + <url>http://repository.springsource.com/maven/bundles/release</url> + </repository> + <repository> + <id>com.springsource.repository.bundles.external</id> + <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name> + <url>http://repository.springsource.com/maven/bundles/external</url> + </repository> + </repositories> + + <modules> + <module>client-common</module> + <module>client-controllers</module> + <module>client-swing</module> + </modules> + + <build> + <pluginManagement> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>2.3.2</version> + <configuration> + <source>${thermostat.java.version}</source> + <target>${thermostat.java.version}</target> + </configuration> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>2.12</version> + <configuration> + <argLine>-XX:-UseSplitVerifier -XX:MaxPermSize=300m ${coverageAgent}</argLine> + <systemPropertyVariables> + <java.awt.headless>false</java.awt.headless> + <awt.toolkit>net.java.openjdk.cacio.ctc.CTCToolkit</awt.toolkit> + <java.awt.graphicsenv>net.java.openjdk.cacio.ctc.CTCGraphicsEnvironment</java.awt.graphicsenv> + <com.redhat.thermostat.utils.keyring.provider>com.redhat.thermostat.utils.keyring.MemoryKeyring</com.redhat.thermostat.utils.keyring.provider> + </systemPropertyVariables> + </configuration> + <dependencies> + <dependency> + <groupId>org.apache.maven.surefire</groupId> + <artifactId>surefire-junit47</artifactId> + <version>2.12</version> + </dependency> + </dependencies> + </plugin> + + <plugin> + <groupId>org.apache.felix</groupId> + <artifactId>maven-bundle-plugin</artifactId> + <version>1.4.0</version> + </plugin> + + </plugins> + </pluginManagement> + </build> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>${junit.version}</version> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-core</artifactId> + <version>${mockito.version}</version> + </dependency> + <dependency> + <groupId>org.easytesting</groupId> + <artifactId>fest-swing</artifactId> + <version>${fest.version}</version> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-api-mockito</artifactId> + <version>${powermock.version}</version> + </dependency> + <dependency> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4</artifactId> + <version>${powermock.version}</version> + </dependency> + <dependency> + <groupId>net.java.openjdk.cacio</groupId> + <artifactId>cacio-tta</artifactId> + <version>1.3</version> + </dependency> + + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.core</artifactId> + <version>${osgi.core.version}</version> + </dependency> + <dependency> + <groupId>org.osgi</groupId> + <artifactId>org.osgi.compendium</artifactId> + <version>${osgi.compendium.version}</version> + </dependency> + <dependency> + <groupId>org.apache.felix</groupId> + <artifactId>org.apache.felix.framework</artifactId> + <version>${felix.framework.version}</version> + </dependency> + + <!-- thermostat dependencies --> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-common-core</artifactId> + <version>0.5.0-SNAPSHOT</version> + <type>jar</type> + </dependency> + + <dependency> + <groupId>com.redhat.thermostat</groupId> + <artifactId>thermostat-client-core</artifactId> + <version>0.5.0-SNAPSHOT</version> + <type>jar</type> + </dependency> + + </dependencies> + </dependencyManagement> + +</project>