You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by me...@apache.org on 2007/03/13 23:43:13 UTC

svn commit: r517921 - in /incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory: ConstructorSite.java FieldSite.java InjectionSiteMapping.java MethodSite.java Site.java ValueSource.java

Author: meerajk
Date: Tue Mar 13 15:43:13 2007
New Revision: 517921

URL: http://svn.apache.org/viewvc?view=rev&rev=517921
Log:
Restructured injection site mapping.

Added:
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ConstructorSite.java   (with props)
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/FieldSite.java   (with props)
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/MethodSite.java   (with props)
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/Site.java   (with props)
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ValueSource.java   (with props)
Modified:
    incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/InjectionSiteMapping.java

Added: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ConstructorSite.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ConstructorSite.java?view=auto&rev=517921
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ConstructorSite.java (added)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ConstructorSite.java Tue Mar 13 15:43:13 2007
@@ -0,0 +1,30 @@
+package org.apache.tuscany.core.model.physical.instancefactory;
+
+/**
+ * Represents a field injection site.
+ * 
+ * @version $Revision$ $Date$
+ *
+ */
+public class ConstructorSite implements Site {
+    
+    // Index of the site
+    private int index;
+
+    /**
+     * Gets the index of the site.
+     * @return Site index.
+     */
+    public int getIndex() {
+        return index;
+    }
+
+    /**
+     * Sets the index of the site.
+     * @param index Index of the site.
+     */
+    public void setIndex(int name) {
+        this.index = name;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ConstructorSite.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ConstructorSite.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/FieldSite.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/FieldSite.java?view=auto&rev=517921
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/FieldSite.java (added)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/FieldSite.java Tue Mar 13 15:43:13 2007
@@ -0,0 +1,30 @@
+package org.apache.tuscany.core.model.physical.instancefactory;
+
+/**
+ * Represents a field injection site.
+ * 
+ * @version $Revision$ $Date$
+ *
+ */
+public class FieldSite implements Site {
+    
+    // Name of the site
+    private String name;
+
+    /**
+     * Gets the name of the site.
+     * @return Site name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the name of the site.
+     * @param name Name of the site.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/FieldSite.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/FieldSite.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/InjectionSiteMapping.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/InjectionSiteMapping.java?view=diff&rev=517921&r1=517920&r2=517921
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/InjectionSiteMapping.java (original)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/InjectionSiteMapping.java Tue Mar 13 15:43:13 2007
@@ -22,93 +22,41 @@
  * @version $Rev$ $Date$
  */
 public class InjectionSiteMapping {
-    /**
-     * Identifier in SCA terms of the source of the value that will be injected.
-     */
-    public static class ValueSource {
-        public static enum ValueSourceType {
-            CALLBACK,
-            REFERENCE,
-            PROPERTY
-        }
-
-        private ValueSourceType valueType;
-        private String name;
-
-        public ValueSourceType getValueType() {
-            return valueType;
-        }
-
-        public void setValueType(ValueSourceType valueType) {
-            this.valueType = valueType;
-        }
-
-        public String getName() {
-            return name;
-        }
-
-        public void setName(String name) {
-            this.name = name;
-        }
-    }
-
-    /**
-     * Abstraction for a site where a value can be injected.
-     */
-    public static abstract class Site {
-    }
-
-    public static class FieldSite extends Site {
-        private String name;
-
-        public String getName() {
-            return name;
-        }
-
-        public void setName(String name) {
-            this.name = name;
-        }
-    }
-
-    public static class MethodSite {
-        private String name;
-
-        public String getName() {
-            return name;
-        }
-
-        public void setName(String name) {
-            this.name = name;
-        }
-    }
-
-    public static class ConstructorSite extends Site {
-        private int paramIndex;
-
-        public int getParamIndex() {
-            return paramIndex;
-        }
-
-        public void setParamIndex(int paramIndex) {
-            this.paramIndex = paramIndex;
-        }
-    }
 
+    // SOurce of the mapping
     private ValueSource source;
+    
+    // Site of the mapping
     private Site site;
 
+    /**
+     * Gets the source of the injection.
+     * @return Injection source.
+     */
     public ValueSource getSource() {
         return source;
     }
 
+    /**
+     * Sets the source of the injection.
+     * @param source Injection source.
+     */
     public void setSource(ValueSource source) {
         this.source = source;
     }
 
+    /**
+     * Gets the site of the injection.
+     * @return Injection site.
+     */
     public Site getSite() {
         return site;
     }
 
+    /**
+     * Set the size of the injection.
+     * @param site Injection site.
+     */
     public void setSite(Site site) {
         this.site = site;
     }

Added: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/MethodSite.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/MethodSite.java?view=auto&rev=517921
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/MethodSite.java (added)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/MethodSite.java Tue Mar 13 15:43:13 2007
@@ -0,0 +1,30 @@
+package org.apache.tuscany.core.model.physical.instancefactory;
+
+/**
+ * Represents a method injection site.
+ * 
+ * @version $Revision$ $Date$
+ *
+ */
+public class MethodSite implements Site {
+    
+    // Name of the site
+    private String name;
+
+    /**
+     * Gets the name of the site.
+     * @return Site name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the name of the site.
+     * @param name Name of the site.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/MethodSite.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/MethodSite.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/Site.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/Site.java?view=auto&rev=517921
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/Site.java (added)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/Site.java Tue Mar 13 15:43:13 2007
@@ -0,0 +1,9 @@
+package org.apache.tuscany.core.model.physical.instancefactory;
+
+/**
+ * Marker for an injection site.
+ *
+ */
+public interface Site {
+
+}

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/Site.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/Site.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ValueSource.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ValueSource.java?view=auto&rev=517921
==============================================================================
--- incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ValueSource.java (added)
+++ incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ValueSource.java Tue Mar 13 15:43:13 2007
@@ -0,0 +1,56 @@
+package org.apache.tuscany.core.model.physical.instancefactory;
+
+/**
+ * Represents a value source.
+ * 
+ * @version $Revision$ $Date$
+ *
+ */
+public class ValueSource {
+
+    // Type
+    private ValueSourceType valueType;
+    
+    // Name
+    private String name;
+    
+    // Type enumeration
+    public static enum ValueSourceType {
+        CALLBACK,
+        REFERENCE,
+        PROPERTY
+    }
+
+    /**
+     * Sets the type (callback, reference, property
+     * @return Type.
+     */
+    public ValueSourceType getValueType() {
+        return valueType;
+    }
+
+    /**
+     * Gets the type (callback, reference, property.
+     * @param valueType Type.
+     */
+    public void setValueType(ValueSourceType valueType) {
+        this.valueType = valueType;
+    }
+
+    /**
+     * Gets the name.
+     * @return Name.
+     */
+    public String getName() {
+        return name;
+    }
+
+    /**
+     * Sets the name.
+     * @param name Name.
+     */
+    public void setName(String name) {
+        this.name = name;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ValueSource.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/kernel/core/src/main/java/org/apache/tuscany/core/model/physical/instancefactory/ValueSource.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org