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/02/27 23:26:57 UTC

svn commit: r512454 - in /incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical: Operations.java PhysicalReferenceDefinition.java PhysicalServiceDefinition.java PhysicalWireDefinition.java

Author: meerajk
Date: Tue Feb 27 14:26:56 2007
New Revision: 512454

URL: http://svn.apache.org/viewvc?view=rev&rev=512454
Log:
Abstracted operation definitions from wire, service and reference definitions.

Added:
    incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/Operations.java   (with props)
Modified:
    incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalReferenceDefinition.java
    incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalServiceDefinition.java
    incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalWireDefinition.java

Added: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/Operations.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/Operations.java?view=auto&rev=512454
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/Operations.java (added)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/Operations.java Tue Feb 27 14:26:56 2007
@@ -0,0 +1,54 @@
+/*
+ * 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.spi.model.physical;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.apache.tuscany.spi.model.ModelObject;
+
+/**
+ * Aggregates a collection of operations.
+ * 
+ * @version $Revison$ $Date$
+ *
+ */
+public class Operations extends ModelObject {
+    
+    // Collection of operations
+    private Set<PhysicalOperationDefinition> operations = new HashSet<PhysicalOperationDefinition>();
+
+    /**
+     * Returns a read-only view of the available operations.
+     * @return Collection of operations.
+     */
+    public Set<PhysicalOperationDefinition> getOperations() {
+        return Collections.unmodifiableSet(operations);
+    }
+
+    /**
+     * Adds an operation definition.
+     * @param operation Operation to be added.
+     */
+    public void addOperation(PhysicalOperationDefinition operation) {
+        operations.add(operation);
+    }
+
+}

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

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

Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalReferenceDefinition.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalReferenceDefinition.java?view=diff&rev=512454&r1=512453&r2=512454
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalReferenceDefinition.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalReferenceDefinition.java Tue Feb 27 14:26:56 2007
@@ -18,11 +18,6 @@
  */
 package org.apache.tuscany.spi.model.physical;
 
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.tuscany.spi.model.ModelObject;
 
 /**
  * Represents a physical reference.
@@ -30,29 +25,10 @@
  * @version $Revision$ $Date$
  *
  */
-public class PhysicalReferenceDefinition extends ModelObject {
+public class PhysicalReferenceDefinition extends Operations {
     
     // The name of the reference
     private String name;
-    
-    // Operations available on this wire
-    private Set<PhysicalOperationDefinition> operations = new HashSet<PhysicalOperationDefinition>();
-
-    /**
-     * Returns a read-only view of the available operations.
-     * @return Operations available on the wire.
-     */
-    public Set<PhysicalOperationDefinition> getOperations() {
-        return Collections.unmodifiableSet(operations);
-    }
-
-    /**
-     * Adds an operation definition.
-     * @param operation Operation to be added to the wire.
-     */
-    public void addOperation(PhysicalOperationDefinition operation) {
-        operations.add(operation);
-    }
 
     /**
      * Sets the name of the reference.

Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalServiceDefinition.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalServiceDefinition.java?view=diff&rev=512454&r1=512453&r2=512454
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalServiceDefinition.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalServiceDefinition.java Tue Feb 27 14:26:56 2007
@@ -18,11 +18,6 @@
  */
 package org.apache.tuscany.spi.model.physical;
 
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.tuscany.spi.model.ModelObject;
 
 /**
  * Represents a physical service.
@@ -30,29 +25,10 @@
  * @version $Revision$ $Date$
  *
  */
-public class PhysicalServiceDefinition extends ModelObject {
+public class PhysicalServiceDefinition extends Operations {
     
     // The name of the service
     private String name;
-    
-    // Operations available on this wire
-    private Set<PhysicalOperationDefinition> operations = new HashSet<PhysicalOperationDefinition>();
-
-    /**
-     * Returns a read-only view of the available operations.
-     * @return Operations available on the wire.
-     */
-    public Set<PhysicalOperationDefinition> getOperations() {
-        return Collections.unmodifiableSet(operations);
-    }
-
-    /**
-     * Adds an operation definition.
-     * @param operation Operation to be added to the wire.
-     */
-    public void addOperation(PhysicalOperationDefinition operation) {
-        operations.add(operation);
-    }
 
     /**
      * Sets the name of the service.

Modified: incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalWireDefinition.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalWireDefinition.java?view=diff&rev=512454&r1=512453&r2=512454
==============================================================================
--- incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalWireDefinition.java (original)
+++ incubator/tuscany/java/sca/kernel/spi/src/main/java/org/apache/tuscany/spi/model/physical/PhysicalWireDefinition.java Tue Feb 27 14:26:56 2007
@@ -19,12 +19,8 @@
 package org.apache.tuscany.spi.model.physical;
 
 import java.net.URI;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import javax.xml.namespace.QName;
 
-import org.apache.tuscany.spi.model.ModelObject;
+import javax.xml.namespace.QName;
 
 /**
  * Model class representing the portable definition of a wire. This class is used to describe the inbound and outbound
@@ -32,7 +28,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class PhysicalWireDefinition extends ModelObject {
+public class PhysicalWireDefinition extends Operations {
     
     // TODO this should be removed
     @Deprecated
@@ -43,9 +39,6 @@
     
     // The resolved source URI of the wire
     private URI targetUri;
-    
-    // Operations available on this wire
-    private Set<PhysicalOperationDefinition> operations = new HashSet<PhysicalOperationDefinition>();
 
     /**
      * Returns the wire binding type.
@@ -54,22 +47,6 @@
     @Deprecated
     public QName getBindingType() {
         return bindingType;
-    }
-
-    /**
-     * Returns a read-only view of the available operations.
-     * @return Operations available on the wire.
-     */
-    public Set<PhysicalOperationDefinition> getOperations() {
-        return Collections.unmodifiableSet(operations);
-    }
-
-    /**
-     * Adds an operation definition.
-     * @param operation Operation to be added to the wire.
-     */
-    public void addOperation(PhysicalOperationDefinition operation) {
-        operations.add(operation);
     }
 
     /**



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