Author: kono
Date: 2009-03-12 15:07:08 -0700 (Thu, 12 Mar 2009)
New Revision: 16248

Modified:
   core3/vizmap-impl/trunk/osgi.bnd
   core3/vizmap-impl/trunk/pom.xml
   
core3/vizmap-impl/trunk/src/main/java/org/cytoscape/vizmap/internal/VisualStyleCatalogImpl.java
   
core3/vizmap-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
   core3/vizmap-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
Log:
Constructor injection enabled.

Modified: core3/vizmap-impl/trunk/osgi.bnd
===================================================================
--- core3/vizmap-impl/trunk/osgi.bnd    2009-03-12 21:52:22 UTC (rev 16247)
+++ core3/vizmap-impl/trunk/osgi.bnd    2009-03-12 22:07:08 UTC (rev 16248)
@@ -2,6 +2,5 @@
 # Use this file to add customized Bnd instructions for the bundle
 #-----------------------------------------------------------------
 
-Spring-Context: META-INF/spring/*.xml
 Private-Package: 
${bundle.namespace}.internal,${bundle.namespace}.events.internal
 

Modified: core3/vizmap-impl/trunk/pom.xml
===================================================================
--- core3/vizmap-impl/trunk/pom.xml     2009-03-12 21:52:22 UTC (rev 16247)
+++ core3/vizmap-impl/trunk/pom.xml     2009-03-12 22:07:08 UTC (rev 16248)
@@ -1,243 +1,224 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+       xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
 
-  <parent>
-    <artifactId>parent</artifactId>
-    <groupId>org.cytoscape</groupId>
-    <version>1.0-SNAPSHOT</version>
-  </parent>
+       <parent>
+               <artifactId>parent</artifactId>
+               <groupId>org.cytoscape</groupId>
+               <version>1.0-SNAPSHOT</version>
+       </parent>
 
-  <properties>
-    <bundle.symbolicName>org.cytoscape.vizmap</bundle.symbolicName>
-    <bundle.namespace>org.cytoscape.vizmap</bundle.namespace>
-  </properties>
+       <properties>
+               <bundle.symbolicName>org.cytoscape.vizmap</bundle.symbolicName>
+               <bundle.namespace>org.cytoscape.vizmap</bundle.namespace>
+       </properties>
 
-  <modelVersion>4.0.0</modelVersion>
-  <groupId>org.cytoscape</groupId>
-  <artifactId>vizmap-impl</artifactId>
-  <version>1.0-SNAPSHOT</version>
+       <modelVersion>4.0.0</modelVersion>
+       <groupId>org.cytoscape</groupId>
+       <artifactId>vizmap-impl</artifactId>
+       <version>1.0-SNAPSHOT</version>
 
-  <name>${bundle.symbolicName}</name>
+       <name>${bundle.symbolicName}</name>
 
-  <packaging>bundle</packaging>
+       <packaging>bundle</packaging>
 
-  <build>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-      </resource>
-      <!--
-       | example additional resource entries, useful when building Eclipse RCP 
applications
-      -->
-    </resources>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <redirectTestOutputToFile>true</redirectTestOutputToFile>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.ops4j</groupId>
-        <artifactId>maven-pax-plugin</artifactId>
-        <version>1.4</version>
-        <!--
-           | enable improved OSGi compilation support for the bundle 
life-cycle.
-           | to switch back to the standard bundle life-cycle, move this 
setting
-           | down to the maven-bundle-plugin section
-          -->
-        <extensions>true</extensions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>1.4.3</version>
-        <!--
-         | the following instructions build a simple set of public/private 
classes into an OSGi bundle
-        -->
-        <configuration>
-          <instructions>
-            <Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
-            <Bundle-Version>${pom.version}</Bundle-Version>
-            <!--
-             | assume public classes are in the top package, and private 
classes are under ".internal"
-            -->
-            
<Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${pom.version}"</Export-Package>
-            <Private-Package>${bundle.namespace}.internal.*</Private-Package>
-            <!--
-             | each module can override these defaults in their osgi.bnd file
-            -->
-            <_include>-osgi.bnd</_include>
-          </instructions>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
- 
-  <repositories>
-      <!-- bootstrap for cytoscape dependencies, namely the parent POM 
snapshots -->
-      <repository>
-         <id>cytoscape_snapshots</id>
-          <snapshots>
-            <enabled>true</enabled>
-          </snapshots>
-          <releases>
-            <enabled>false</enabled>
-          </releases>
-          <name>Cytoscape Snapshots</name>
-          
<url>http://cytoscape.wodaklab.org/nexus/content/repositories/snapshots/</url>
-       </repository>
-       <!-- bootstrap for cytoscape dependencies, namely the parent POM 
releases -->
-       <repository>
-          <id>cytoscape_releases</id>
-          <snapshots>
-            <enabled>false</enabled>
-          </snapshots>
-          <releases>
-            <enabled>true</enabled>
-          </releases>
-          <name>Cytoscape Releases</name>
-          
<url>http://cytoscape.wodaklab.org/nexus/content/repositories/releases/</url>
-       </repository>
-  </repositories>
-  <dependencies>
-    <dependency>
-      <groupId>org.cytoscape</groupId>
-      <artifactId>model-api</artifactId>
-      <version>1.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.cytoscape</groupId>
-      <artifactId>viewmodel-api</artifactId>
-      <version>1.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.cytoscape</groupId>
-      <artifactId>vizmap-api</artifactId>
-      <version>1.0-SNAPSHOT</version>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>osgi_R4_core</artifactId>
-      <version>1.0</version>
-      <scope>provided</scope>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>osgi_R4_compendium</artifactId>
-      <version>1.0</version>
-      <scope>provided</scope>
-      <optional>true</optional>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-extender</artifactId>
-      <version>1.1.2</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-core</artifactId>
-      <version>1.1.2</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      
<artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
-      <version>1.5.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>com.springsource.slf4j.api</artifactId>
-      <version>1.5.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>com.springsource.slf4j.log4j</artifactId>
-      <version>1.5.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-io</artifactId>
-      <version>1.1.2</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-aop</artifactId>
-      <version>2.5.5</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-beans</artifactId>
-      <version>2.5.5</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-context</artifactId>
-      <version>2.5.5</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-core</artifactId>
-      <version>2.5.5</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework</groupId>
-      <artifactId>spring-test</artifactId>
-      <version>2.5.5</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.aopalliance</groupId>
-      <artifactId>com.springsource.org.aopalliance</artifactId>
-      <version>1.0.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>edu.emory.mathcs.backport</groupId>
-      <artifactId>com.springsource.edu.emory.mathcs.backport</artifactId>
-      <version>3.1.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.log4j</groupId>
-      <artifactId>com.springsource.org.apache.log4j</artifactId>
-      <version>1.2.15</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>javax.jms</groupId>
-      <artifactId>com.springsource.javax.jms</artifactId>
-      <version>1.1.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>javax.transaction</groupId>
-      <artifactId>com.springsource.javax.transaction</artifactId>
-      <version>1.1.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>3.8.1</version>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.springframework.osgi</groupId>
-      <artifactId>spring-osgi-mock</artifactId>
-      <version>1.0</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
+       <build>
+               <resources>
+                       <resource>
+                               <directory>src/main/resources</directory>
+                       </resource>
+                       <!--
+                               | example additional resource entries, useful 
when building Eclipse
+                               RCP applications
+                       -->
+               </resources>
+               <plugins>
+                       <plugin>
+                               <groupId>org.apache.maven.plugins</groupId>
+                               <artifactId>maven-surefire-plugin</artifactId>
+                               <configuration>
+                                       
<redirectTestOutputToFile>true</redirectTestOutputToFile>
+                               </configuration>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.ops4j</groupId>
+                               <artifactId>maven-pax-plugin</artifactId>
+                               <version>1.4</version>
+                               <!--
+                                       | enable improved OSGi compilation 
support for the bundle
+                                       life-cycle. | to switch back to the 
standard bundle life-cycle,
+                                       move this setting | down to the 
maven-bundle-plugin section
+                               -->
+                               <extensions>true</extensions>
+                       </plugin>
+                       <plugin>
+                               <groupId>org.apache.felix</groupId>
+                               <artifactId>maven-bundle-plugin</artifactId>
+                               <version>1.4.3</version>
+                               <!--
+                                       | the following instructions build a 
simple set of public/private
+                                       classes into an OSGi bundle
+                               -->
+                               <configuration>
+                                       <instructions>
+                                               
<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
+                                               
<Bundle-Version>${pom.version}</Bundle-Version>
+                                               <!--
+                                                       | assume public classes 
are in the top package, and private
+                                                       classes are under 
".internal"
+                                               -->
+                                               
<Export-Package>!${bundle.namespace}.internal.*,${bundle.namespace}.*;version="${pom.version}"</Export-Package>
+                                               
<Private-Package>${bundle.namespace}.internal.*</Private-Package>
+                                               <!--
+                                                       | each module can 
override these defaults in their osgi.bnd file
+                                               -->
+                                               <_include>-osgi.bnd</_include>
+                                       </instructions>
+                               </configuration>
+                       </plugin>
+               </plugins>
+       </build>
+
+       <repositories>
+               <!--
+                       bootstrap for cytoscape dependencies, namely the parent 
POM snapshots
+               -->
+               <repository>
+                       <id>cytoscape_snapshots</id>
+                       <snapshots>
+                               <enabled>true</enabled>
+                       </snapshots>
+                       <releases>
+                               <enabled>false</enabled>
+                       </releases>
+                       <name>Cytoscape Snapshots</name>
+                       
<url>http://cytoscape.wodaklab.org/nexus/content/repositories/snapshots/</url>
+               </repository>
+               <!--
+                       bootstrap for cytoscape dependencies, namely the parent 
POM releases
+               -->
+               <repository>
+                       <id>cytoscape_releases</id>
+                       <snapshots>
+                               <enabled>false</enabled>
+                       </snapshots>
+                       <releases>
+                               <enabled>true</enabled>
+                       </releases>
+                       <name>Cytoscape Releases</name>
+                       
<url>http://cytoscape.wodaklab.org/nexus/content/repositories/releases/</url>
+               </repository>
+       </repositories>
+       <dependencies>
+
+               <!-- Cytoscape modules -->
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>model-api</artifactId>
+                       <version>1.0-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>viewmodel-api</artifactId>
+                       <version>1.0-SNAPSHOT</version>
+               </dependency>
+               <dependency>
+                       <groupId>org.cytoscape</groupId>
+                       <artifactId>vizmap-api</artifactId>
+                       <version>1.0-SNAPSHOT</version>
+               </dependency>
+
+               <!-- Infrastructure bundles -->
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>osgi_R4_core</artifactId>
+                       <version>1.0</version>
+                       <scope>provided</scope>
+                       <optional>true</optional>
+               </dependency>
+               <dependency>
+                       <groupId>org.osgi</groupId>
+                       <artifactId>osgi_R4_compendium</artifactId>
+                       <version>1.0</version>
+                       <scope>provided</scope>
+                       <optional>true</optional>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.osgi</groupId>
+                       <artifactId>spring-osgi-extender</artifactId>
+                       <version>${spring.osgi.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.osgi</groupId>
+                       <artifactId>spring-osgi-core</artifactId>
+                       <version>${spring.osgi.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.osgi</groupId>
+                       <artifactId>spring-osgi-io</artifactId>
+                       <version>${spring.osgi.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-aop</artifactId>
+                       <version>${spring.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-beans</artifactId>
+                       <version>${spring.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-context</artifactId>
+                       <version>${spring.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-core</artifactId>
+                       <version>${spring.version}</version>
+                       <scope>provided</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.aopalliance</groupId>
+                       
<artifactId>com.springsource.org.aopalliance</artifactId>
+                       <version>1.0.0</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <!-- Logging -->
+               <dependency>
+                       <groupId>org.apache.commons</groupId>
+                       
<artifactId>com.springsource.org.apache.commons.logging</artifactId>
+                       <version>1.1.1</version>
+                       <scope>provided</scope>
+               </dependency>
+
+               <!-- Testing -->
+               <dependency>
+                       <groupId>junit</groupId>
+                       <artifactId>junit</artifactId>
+                       <version>4.4</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework</groupId>
+                       <artifactId>spring-test</artifactId>
+                       <version>${spring.version}</version>
+                       <scope>test</scope>
+               </dependency>
+               <dependency>
+                       <groupId>org.springframework.osgi</groupId>
+                       <artifactId>spring-osgi-mock</artifactId>
+                       <version>${spring.osgi.version}</version>
+                       <scope>test</scope>
+               </dependency>
+       </dependencies>
 </project>

Modified: 
core3/vizmap-impl/trunk/src/main/java/org/cytoscape/vizmap/internal/VisualStyleCatalogImpl.java
===================================================================
--- 
core3/vizmap-impl/trunk/src/main/java/org/cytoscape/vizmap/internal/VisualStyleCatalogImpl.java
     2009-03-12 21:52:22 UTC (rev 16247)
+++ 
core3/vizmap-impl/trunk/src/main/java/org/cytoscape/vizmap/internal/VisualStyleCatalogImpl.java
     2009-03-12 22:07:08 UTC (rev 16248)
@@ -55,10 +55,10 @@
  * It is also a VisualStyle factory
  */
 public class VisualStyleCatalogImpl implements VisualStyleCatalog {
-       private Set<VisualStyle> visualStyles;
-       private CyEventHelper eventHelper;
+       private final Set<VisualStyle> visualStyles;
+       private CyEventHelper cyEventHelper;
        private VisualPropertyCatalog vpCatalog;
-
+       
        /**
         * For setter injection (hmm. whats that?)
         */
@@ -72,7 +72,7 @@
         * @param eventHelper DOCUMENT ME!
         */
        public void setEventHelper(final CyEventHelper eventHelper) {
-               this.eventHelper = eventHelper;
+               this.cyEventHelper = eventHelper;
        }
 
        /**
@@ -81,7 +81,7 @@
         * @return  DOCUMENT ME!
         */
        public CyEventHelper getEventHelper() {
-               return this.eventHelper;
+               return this.cyEventHelper;
        }
 
        /**
@@ -103,7 +103,7 @@
        }
 
        /**
-        *
+        * 
         * @param h  DOCUMENT ME!
         */
        public VisualStyleCatalogImpl(final CyEventHelper eventHelper,
@@ -114,7 +114,7 @@
                if (vpCatalog == null)
                        throw new NullPointerException("vpCatalog is null");
 
-               this.eventHelper = eventHelper;
+               this.cyEventHelper = eventHelper;
                this.vpCatalog = vpCatalog;
                visualStyles = new HashSet<VisualStyle>();
        }
@@ -125,9 +125,9 @@
         * @return  DOCUMENT ME!
         */
        public VisualStyle createVisualStyle() {
-               final VisualStyle newVS = new VisualStyleImpl(eventHelper, 
vpCatalog);
+               final VisualStyle newVS = new VisualStyleImpl(cyEventHelper, 
vpCatalog);
                visualStyles.add(newVS);
-               eventHelper.fireSynchronousEvent(new 
VisualStyleCreatedEventImpl(newVS),
+               cyEventHelper.fireSynchronousEvent(new 
VisualStyleCreatedEventImpl(newVS),
                                                 
VisualStyleCreatedListener.class);
 
                return newVS;
@@ -149,7 +149,7 @@
         */
        public void removeVisualStyle(final VisualStyle vs) {
                visualStyles.remove(vs);
-               eventHelper.fireSynchronousEvent(new 
VisualStyleDestroyedEventImpl(vs),
+               cyEventHelper.fireSynchronousEvent(new 
VisualStyleDestroyedEventImpl(vs),
                                                 
VisualStyleDestroyedListener.class);
        }
 }

Modified: 
core3/vizmap-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
--- 
core3/vizmap-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
  2009-03-12 21:52:22 UTC (rev 16247)
+++ 
core3/vizmap-impl/trunk/src/main/resources/META-INF/spring/bundle-context-osgi.xml
  2009-03-12 22:07:08 UTC (rev 16248)
@@ -5,15 +5,14 @@
                       http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
        default-lazy-init="false">
 
-       <osgi:service id="visualStyleCatalogService"
-               ref="visualStyleCatalog" 
interface="org.cytoscape.vizmap.VisualStyleCatalog">
+       <!-- Export Visual Style Catalog as OSGi service -->
+       <osgi:service id="visualStyleCatalogService" ref="visualStyleCatalog"
+               interface="org.cytoscape.vizmap.VisualStyleCatalog">
        </osgi:service>
 
-       <osgi:reference id="cyEventHelperServiceRef"
-               interface="org.cytoscape.event.CyEventHelper">
-       </osgi:reference>
+       <!-- Import Services -->
+       <osgi:reference id="cyEventHelperServiceRef" 
interface="org.cytoscape.event.CyEventHelper" />
 
        <osgi:reference id="visualPropertyCatalogRef"
-               interface="org.cytoscape.view.model.VisualPropertyCatalog">
-       </osgi:reference>
+               interface="org.cytoscape.view.model.VisualPropertyCatalog" />
 </beans>

Modified: 
core3/vizmap-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
--- 
core3/vizmap-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml   
    2009-03-12 21:52:22 UTC (rev 16247)
+++ 
core3/vizmap-impl/trunk/src/main/resources/META-INF/spring/bundle-context.xml   
    2009-03-12 22:07:08 UTC (rev 16248)
@@ -17,8 +17,8 @@
        <context:annotation-config />
 
        <bean id="visualStyleCatalog" 
class="org.cytoscape.vizmap.internal.VisualStyleCatalogImpl">
-         <property name="eventHelper" ref="cyEventHelperServiceRef"></property>
-         <property name="visualPropertyCatalog" 
ref="visualPropertyCatalogRef"></property>
+               <constructor-arg ref="cyEventHelperServiceRef" />
+               <constructor-arg ref="visualPropertyCatalogRef" />
        </bean>
 
 </beans>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to