You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2008/03/07 12:49:33 UTC

svn commit: r634622 - in /incubator/tuscany/java/sca/modules/implementation-node: ./ src/main/java/org/apache/tuscany/sca/implementation/node/ src/main/java/org/apache/tuscany/sca/implementation/node/impl/

Author: jsdelfino
Date: Fri Mar  7 03:49:30 2008
New Revision: 634622

URL: http://svn.apache.org/viewvc?rev=634622&view=rev
Log:
Added a model class to represent a node configuration.

Added:
    incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/ConfiguredNodeImplementation.java   (with props)
    incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java   (with props)
Modified:
    incubator/tuscany/java/sca/modules/implementation-node/pom.xml
    incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/NodeImplementationFactory.java
    incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationFactoryImpl.java
    incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationImpl.java

Modified: incubator/tuscany/java/sca/modules/implementation-node/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node/pom.xml?rev=634622&r1=634621&r2=634622&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-node/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/implementation-node/pom.xml Fri Mar  7 03:49:30 2008
@@ -37,6 +37,12 @@
         </dependency>
 
         <dependency>
+            <groupId>org.apache.tuscany.sca</groupId>
+            <artifactId>tuscany-contribution</artifactId>
+            <version>1.2-incubating-SNAPSHOT</version>
+        </dependency>
+
+        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>4.2</version>

Added: incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/ConfiguredNodeImplementation.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/ConfiguredNodeImplementation.java?rev=634622&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/ConfiguredNodeImplementation.java (added)
+++ incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/ConfiguredNodeImplementation.java Fri Mar  7 03:49:30 2008
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.implementation.node;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.Implementation;
+import org.apache.tuscany.sca.contribution.Contribution;
+
+
+
+/**
+ * The model representing a resource implementation in an SCA assembly model.
+ */
+public interface ConfiguredNodeImplementation extends Implementation {
+    
+    /**
+     * Returns the composite deployed to this node.
+     * @return the composite deployed to this node
+     */
+    Composite getComposite();
+    
+    /**
+     * Sets the composite deployed to this node.
+     * @param composite the composite deployed to this node
+     */
+    void setComposite(Composite composite);
+
+    /**
+     * Returns the list of contributions deployed to this node.
+     * @return the list of contributions deployed to this node
+     */
+    List<Contribution> getContributions();
+
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/ConfiguredNodeImplementation.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/ConfiguredNodeImplementation.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/NodeImplementationFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/NodeImplementationFactory.java?rev=634622&r1=634621&r2=634622&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/NodeImplementationFactory.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/NodeImplementationFactory.java Fri Mar  7 03:49:30 2008
@@ -28,9 +28,15 @@
 public interface NodeImplementationFactory {
     
     /**
-     * Creates a new resource implementation.
-     * @return a new resource implementation
+     * Creates a new node implementation.
+     * @return a new node implementation
      */
     NodeImplementation createNodeImplementation();
+
+    /**
+     * Creates a new configured node implementation.
+     * @return a new configured node implementation
+     */
+    ConfiguredNodeImplementation createConfiguredNodeImplementation();
 
 }

Added: incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java?rev=634622&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java (added)
+++ incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java Fri Mar  7 03:49:30 2008
@@ -0,0 +1,102 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.implementation.node.impl;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Composite;
+import org.apache.tuscany.sca.assembly.ConstrainingType;
+import org.apache.tuscany.sca.assembly.Property;
+import org.apache.tuscany.sca.assembly.Reference;
+import org.apache.tuscany.sca.assembly.Service;
+import org.apache.tuscany.sca.contribution.Contribution;
+import org.apache.tuscany.sca.implementation.node.ConfiguredNodeImplementation;
+
+
+/**
+ * The model representing a configured node implementation in an SCA assembly model.
+ */
+class ConfiguredNodeImplementationImpl implements ConfiguredNodeImplementation {
+
+    private String uri;
+    private boolean unresolved;
+    private Composite composite;
+    private List<Contribution> contributions = new ArrayList<Contribution>();
+
+    /**
+     * Constructs a new node implementation.
+     */
+    ConfiguredNodeImplementationImpl() {
+    }
+
+    public ConstrainingType getConstrainingType() {
+        // The node implementation does not support constrainingTypes
+        return null;
+    }
+
+    public List<Property> getProperties() {
+        // The node implementation does not support properties
+        return Collections.emptyList();
+    }
+
+    public List<Service> getServices() {
+        // The node implementation does not support services
+        return Collections.emptyList();
+    }
+    
+    public List<Reference> getReferences() {
+        // The node implementation does not support properties
+        return Collections.emptyList();
+    }
+
+    public String getURI() {
+        return uri;
+    }
+    
+    public Composite getComposite() {
+        return composite;
+    }
+    
+    public List<Contribution> getContributions() {
+        return contributions;
+    }
+
+    public void setConstrainingType(ConstrainingType constrainingType) {
+        // The node implementation does not support constrainingTypes
+    }
+
+    public void setURI(String uri) {
+        this.uri = uri;
+    }
+    
+    public void setComposite(Composite composite) {
+        this.composite = composite;
+    }
+
+
+    public boolean isUnresolved() {
+        return unresolved;
+    }
+
+    public void setUnresolved(boolean unresolved) {
+        this.unresolved = unresolved;
+    }
+}

Propchange: incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/ConfiguredNodeImplementationImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationFactoryImpl.java?rev=634622&r1=634621&r2=634622&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationFactoryImpl.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationFactoryImpl.java Fri Mar  7 03:49:30 2008
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.sca.implementation.node.impl;
 
+import org.apache.tuscany.sca.implementation.node.ConfiguredNodeImplementation;
 import org.apache.tuscany.sca.implementation.node.NodeImplementation;
 import org.apache.tuscany.sca.implementation.node.NodeImplementationFactory;
 
@@ -34,6 +35,10 @@
 
     public NodeImplementation createNodeImplementation() {
         return new NodeImplementationImpl();
+    }
+    
+    public ConfiguredNodeImplementation createConfiguredNodeImplementation() {
+        return new ConfiguredNodeImplementationImpl();
     }
 
 }

Modified: incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationImpl.java?rev=634622&r1=634621&r2=634622&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationImpl.java (original)
+++ incubator/tuscany/java/sca/modules/implementation-node/src/main/java/org/apache/tuscany/sca/implementation/node/impl/NodeImplementationImpl.java Fri Mar  7 03:49:30 2008
@@ -30,7 +30,7 @@
 
 
 /**
- * The model representing a resource implementation in an SCA assembly model.
+ * The model representing a node implementation in an SCA assembly model.
  */
 class NodeImplementationImpl implements NodeImplementation {
 
@@ -39,28 +39,28 @@
     private Composite composite;
 
     /**
-     * Constructs a new resource implementation.
+     * Constructs a new node implementation.
      */
     NodeImplementationImpl() {
     }
 
     public ConstrainingType getConstrainingType() {
-        // The resource implementation does not support constrainingTypes
+        // The node implementation does not support constrainingTypes
         return null;
     }
 
     public List<Property> getProperties() {
-        // The resource implementation does not support properties
+        // The node implementation does not support properties
         return Collections.emptyList();
     }
 
     public List<Service> getServices() {
-        // The resource implementation does not support services
+        // The node implementation does not support services
         return Collections.emptyList();
     }
     
     public List<Reference> getReferences() {
-        // The resource implementation does not support properties
+        // The node implementation does not support properties
         return Collections.emptyList();
     }
 
@@ -71,9 +71,9 @@
     public Composite getComposite() {
         return composite;
     }
-
+    
     public void setConstrainingType(ConstrainingType constrainingType) {
-        // The resource implementation does not support constrainingTypes
+        // The node implementation does not support constrainingTypes
     }
 
     public void setURI(String uri) {



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