Author: mes
Date: 2011-09-13 16:34:58 -0700 (Tue, 13 Sep 2011)
New Revision: 26791

Added:
   
core3/impl/branches/no-spring/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
   
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
   
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context.xml-legacy
Removed:
   
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml
   
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context.xml
Modified:
   core3/impl/branches/no-spring/linkout-impl/osgi.bnd
Log:
removed use of spring

Modified: core3/impl/branches/no-spring/linkout-impl/osgi.bnd
===================================================================
--- core3/impl/branches/no-spring/linkout-impl/osgi.bnd 2011-09-13 23:20:43 UTC 
(rev 26790)
+++ core3/impl/branches/no-spring/linkout-impl/osgi.bnd 2011-09-13 23:34:58 UTC 
(rev 26791)
@@ -3,3 +3,4 @@
 #-----------------------------------------------------------------
 
 Private-Package: org.cytoscape.linkout.*
+Bundle-Activator: org.cytoscape.linkout.internal.CyActivator

Added: 
core3/impl/branches/no-spring/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
===================================================================
--- 
core3/impl/branches/no-spring/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
                            (rev 0)
+++ 
core3/impl/branches/no-spring/linkout-impl/src/main/java/org/cytoscape/linkout/internal/CyActivator.java
    2011-09-13 23:34:58 UTC (rev 26791)
@@ -0,0 +1,58 @@
+
+
+
+
+package org.cytoscape.linkout.internal;
+
+import org.cytoscape.application.CyApplicationConfiguration;
+import org.cytoscape.util.swing.OpenBrowser;
+import org.cytoscape.service.util.CyServiceRegistrar;
+
+import org.cytoscape.linkout.internal.LinkOut;
+import org.cytoscape.property.BasicCyProperty;
+
+import org.cytoscape.property.CyProperty;
+
+
+import org.osgi.framework.BundleContext;
+
+import org.cytoscape.service.util.AbstractCyActivator;
+
+import java.util.Properties;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class CyActivator extends AbstractCyActivator {
+
+       private static final Logger logger = 
LoggerFactory.getLogger(CyActivator.class);
+
+       public CyActivator() {
+               super();
+       }
+
+
+       public void start(BundleContext bc) {
+
+               OpenBrowser openBrowserServiceRef = 
getService(bc,OpenBrowser.class);
+               CyServiceRegistrar cyServiceRegistrarServiceRef = 
getService(bc,CyServiceRegistrar.class);
+               CyApplicationConfiguration cyApplicationConfigurationServiceRef 
= getService(bc,CyApplicationConfiguration.class);
+       
+               Properties linkoutProperties = new Properties();
+               try {
+                       linkoutProperties.load( 
getClass().getClassLoader().getResourceAsStream("linkout.props") );
+               } catch (Exception e) {
+                       logger.warn("could not properly load linkout.props",e);
+               }
+
+               BasicCyProperty linkoutProps = new 
BasicCyProperty(linkoutProperties,CyProperty.SavePolicy.CONFIG_DIR);
+               LinkOut linkout = new 
LinkOut(linkoutProps,cyServiceRegistrarServiceRef,openBrowserServiceRef,cyApplicationConfigurationServiceRef);
+               
+               Properties linkoutPropsProps = new Properties();
+               linkoutPropsProps.setProperty("cyPropertyName","linkout");
+               linkoutPropsProps.setProperty("serviceType","property");
+               registerService(bc,linkoutProps,CyProperty.class, 
linkoutPropsProps);
+       }
+}
+

Deleted: 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml
===================================================================
--- 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml
       2011-09-13 23:20:43 UTC (rev 26790)
+++ 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml
       2011-09-13 23:34:58 UTC (rev 26791)
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans";
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:osgi="http://www.springframework.org/schema/osgi";
-       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                      http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
-       default-lazy-init="false">
-
-
-       <!-- Export linkout property as CyProperty Service -->
-       <osgi:service id="linkoutPropertiesService" ref="linkoutProps"
-               interface="org.cytoscape.property.CyProperty">
-               <osgi:service-properties>
-                       <entry key="serviceType" value="property" />
-                       <entry key="cyPropertyName" value="linkout" />
-               </osgi:service-properties>
-       </osgi:service>
-
-       <osgi:reference id="openBrowserServiceRef" 
-               interface="org.cytoscape.util.swing.OpenBrowser"/>
-               
-       <osgi:reference id="cyServiceRegistrarServiceRef" 
-               interface="org.cytoscape.service.util.CyServiceRegistrar"/>
-       
-       <osgi:reference id="cyApplicationConfigurationServiceRef" 
interface="org.cytoscape.application.CyApplicationConfiguration" />
-
-</beans>

Copied: 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
 (from rev 26762, 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml)
===================================================================
--- 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
                                (rev 0)
+++ 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context-osgi.xml-legacy
        2011-09-13 23:34:58 UTC (rev 26791)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:osgi="http://www.springframework.org/schema/osgi";
+       xsi:schemaLocation="http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                      http://www.springframework.org/schema/osgi 
http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
+       default-lazy-init="false">
+
+
+       <!-- Export linkout property as CyProperty Service -->
+       <osgi:service id="linkoutPropertiesService" ref="linkoutProps"
+               interface="org.cytoscape.property.CyProperty">
+               <osgi:service-properties>
+                       <entry key="serviceType" value="property" />
+                       <entry key="cyPropertyName" value="linkout" />
+               </osgi:service-properties>
+       </osgi:service>
+
+       <osgi:reference id="openBrowserServiceRef" 
+               interface="org.cytoscape.util.swing.OpenBrowser"/>
+               
+       <osgi:reference id="cyServiceRegistrarServiceRef" 
+               interface="org.cytoscape.service.util.CyServiceRegistrar"/>
+       
+       <osgi:reference id="cyApplicationConfigurationServiceRef" 
interface="org.cytoscape.application.CyApplicationConfiguration" />
+
+</beans>

Deleted: 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context.xml
===================================================================
--- 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context.xml
    2011-09-13 23:20:43 UTC (rev 26790)
+++ 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context.xml
    2011-09-13 23:34:58 UTC (rev 26791)
@@ -1,45 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans";
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:context="http://www.springframework.org/schema/context";
-       xmlns:util="http://www.springframework.org/schema/util";
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans
-            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-        http://www.springframework.org/schema/aop
-            http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
-        http://www.springframework.org/schema/context
-            
http://www.springframework.org/schema/context/spring-context-3.0.xsd
-        http://www.springframework.org/schema/util
-            http://www.springframework.org/schema/util/spring-util-3.0.xsd
-        http://www.springframework.org/schema/lang
-            http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
-        http://www.springframework.org/schema/osgi
-            http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
-       default-lazy-init="false">
-
-       <!--
-               regular spring configuration file defining the beans for this 
bundle.
-               We've kept the osgi definitions in a separate configuration 
file so
-               that this file can easily be used for integration testing 
outside of
-               an OSGi environment
-       -->
-
-       <context:annotation-config />
-
-       <!-- Linkout Properties (linkout.props) -->
-       <util:properties id="linkoutProperties" 
location="classpath:linkout.props" />
-
-       <!-- Build CyProperty Object by using default implementation -->
-       <bean id="linkoutProps" class="org.cytoscape.property.BasicCyProperty">
-               <constructor-arg ref="linkoutProperties" />
-               <constructor-arg value="CONFIG_DIR" />
-       </bean>
-
-       <bean id="linkout" class="org.cytoscape.linkout.internal.LinkOut">
-               <constructor-arg ref="linkoutProps" />
-               <constructor-arg ref="cyServiceRegistrarServiceRef" />
-               <constructor-arg ref="openBrowserServiceRef" />
-               <constructor-arg ref="cyApplicationConfigurationServiceRef" />
-       </bean>
-
-</beans>

Copied: 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context.xml-legacy
 (from rev 26762, 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context.xml)
===================================================================
--- 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context.xml-legacy
                             (rev 0)
+++ 
core3/impl/branches/no-spring/linkout-impl/src/main/resources/META-INF/spring/bundle-context.xml-legacy
     2011-09-13 23:34:58 UTC (rev 26791)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans";
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:context="http://www.springframework.org/schema/context";
+       xmlns:util="http://www.springframework.org/schema/util";
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans
+            http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+        http://www.springframework.org/schema/aop
+            http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
+        http://www.springframework.org/schema/context
+            
http://www.springframework.org/schema/context/spring-context-3.0.xsd
+        http://www.springframework.org/schema/util
+            http://www.springframework.org/schema/util/spring-util-3.0.xsd
+        http://www.springframework.org/schema/lang
+            http://www.springframework.org/schema/lang/spring-lang-3.0.xsd
+        http://www.springframework.org/schema/osgi
+            http://www.springframework.org/schema/osgi/spring-osgi-1.0.xsd";
+       default-lazy-init="false">
+
+       <!--
+               regular spring configuration file defining the beans for this 
bundle.
+               We've kept the osgi definitions in a separate configuration 
file so
+               that this file can easily be used for integration testing 
outside of
+               an OSGi environment
+       -->
+
+       <context:annotation-config />
+
+       <!-- Linkout Properties (linkout.props) -->
+       <util:properties id="linkoutProperties" 
location="classpath:linkout.props" />
+
+       <!-- Build CyProperty Object by using default implementation -->
+       <bean id="linkoutProps" class="org.cytoscape.property.BasicCyProperty">
+               <constructor-arg ref="linkoutProperties" />
+               <constructor-arg value="CONFIG_DIR" />
+       </bean>
+
+       <bean id="linkout" class="org.cytoscape.linkout.internal.LinkOut">
+               <constructor-arg ref="linkoutProps" />
+               <constructor-arg ref="cyServiceRegistrarServiceRef" />
+               <constructor-arg ref="openBrowserServiceRef" />
+               <constructor-arg ref="cyApplicationConfigurationServiceRef" />
+       </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