summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/assembly
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-20 23:30:48 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-10-20 23:30:48 +0000
commitad93ebea59fa455d4fb0bc5771f7a9548790b171 (patch)
treef0eb1bbb04daff9fb87f38885672207d1e63066d /java/sca/modules/assembly
parentc53bddb7cd7eb1f06a3a8a4f43e590b5cea28aa1 (diff)
Remove constrainingType as it is now not part of the OASIS SCA specs
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@827835 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/assembly')
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AssemblyFactory.java7
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Component.java14
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentType.java14
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ConstrainingType.java72
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java5
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java10
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java10
-rw-r--r--java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java108
-rw-r--r--java/sca/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java43
9 files changed, 0 insertions, 283 deletions
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AssemblyFactory.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AssemblyFactory.java
index 88a4224422..7c0f7cf2ce 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AssemblyFactory.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/AssemblyFactory.java
@@ -110,13 +110,6 @@ public interface AssemblyFactory {
CompositeService createCompositeService();
/**
- * Create a new constraining type.
- *
- * @return a new constraining type
- */
- ConstrainingType createConstrainingType();
-
- /**
* Create a new property.
*
* @return a new property
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Component.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Component.java
index 2779457937..e2a68e2a4d 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Component.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/Component.java
@@ -118,20 +118,6 @@ public interface Component extends Base, Extensible, PolicySubject, Cloneable {
ComponentProperty getProperty(String name);
/**
- * Returns a constraining type defining the shape of the component.
- *
- * @return a constraining type
- */
- ConstrainingType getConstrainingType();
-
- /**
- * Sets a constraining type defining the shape of the component.
- *
- * @param constrainingType the constraining type
- */
- void setConstrainingType(ConstrainingType constrainingType);
-
- /**
* Return the Boolean value of autowire
* @return null/TRUE/FALSE
*/
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentType.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentType.java
index 216a56b032..2a09b5bc6f 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentType.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ComponentType.java
@@ -86,18 +86,4 @@ public interface ComponentType extends Base, PolicySubject {
*/
Property getProperty(String name);
- /**
- * Returns a constraining type defining the shape of the implementation.
- *
- * @return a constraining type
- */
- ConstrainingType getConstrainingType();
-
- /**
- * Sets a constraining type defining the shape of the implementation.
- *
- * @param constrainingType the constraining type to set
- */
- void setConstrainingType(ConstrainingType constrainingType);
-
}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ConstrainingType.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ConstrainingType.java
deleted file mode 100644
index 74c2e70d30..0000000000
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/ConstrainingType.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * 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.assembly;
-
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.policy.PolicySubject;
-
-/**
- * A constrainingType provides the "shape" for a component and its
- * implementation. Any component configuration that points to a constrainingType
- * is constrained by this shape. The constrainingType specifies the services,
- * references and properties that must be implemented.
- *
- * @version $Rev$ $Date$
- */
-public interface ConstrainingType extends Base, Extensible, PolicySubject {
-
- /**
- * Returns the name of the constrainingType.
- *
- * @return the name of the constrainingType
- */
- QName getName();
-
- /**
- * Sets the name of the constrainingType.
- *
- * @param name the name of the constrainingType
- */
- void setName(QName name);
-
- /**
- * Returns a list of services that are offered.
- *
- * @return a list of services that are offered
- */
- List<AbstractService> getServices();
-
- /**
- * Returns the list of references that are used.
- *
- * @return the list of references that are used
- */
- List<AbstractReference> getReferences();
-
- /**
- * Returns the list of properties that can be set.
- *
- * @return the list of properties that can be set
- */
- List<AbstractProperty> getProperties();
-
-}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java
index 9774bb8e93..0759ff1361 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java
@@ -33,7 +33,6 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.CompositeReference;
import org.apache.tuscany.sca.assembly.CompositeService;
import org.apache.tuscany.sca.assembly.ConfiguredOperation;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.assembly.Extension;
@@ -105,10 +104,6 @@ public abstract class AssemblyFactoryImpl implements AssemblyFactory {
return new CompositeServiceImpl();
}
- public ConstrainingType createConstrainingType() {
- return new ConstrainingTypeImpl();
- }
-
public Property createProperty() {
return new PropertyImpl();
}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java
index 66e0c9cb59..8a03df339c 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java
@@ -26,7 +26,6 @@ import org.apache.tuscany.sca.assembly.ComponentProperty;
import org.apache.tuscany.sca.assembly.ComponentReference;
import org.apache.tuscany.sca.assembly.ComponentService;
import org.apache.tuscany.sca.assembly.Composite;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
import org.apache.tuscany.sca.assembly.Implementation;
import org.apache.tuscany.sca.policy.ExtensionType;
import org.apache.tuscany.sca.policy.Intent;
@@ -38,7 +37,6 @@ import org.apache.tuscany.sca.policy.PolicySet;
* @version $Rev$ $Date$
*/
public class ComponentImpl extends ExtensibleImpl implements Component, Cloneable {
- private ConstrainingType constrainingType;
private Implementation implementation;
private String name;
private String uri;
@@ -93,10 +91,6 @@ public class ComponentImpl extends ExtensibleImpl implements Component, Cloneabl
this.uri = uri;
}
- public ConstrainingType getConstrainingType() {
- return constrainingType;
- }
-
public Implementation getImplementation() {
return implementation;
}
@@ -144,10 +138,6 @@ public class ComponentImpl extends ExtensibleImpl implements Component, Cloneabl
return null;
}
- public void setConstrainingType(ConstrainingType constrainingType) {
- this.constrainingType = constrainingType;
- }
-
public void setImplementation(Implementation implementation) {
this.implementation = implementation;
}
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java
index a775ab0eed..f18c852e69 100644
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java
+++ b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java
@@ -22,7 +22,6 @@ import java.util.ArrayList;
import java.util.List;
import org.apache.tuscany.sca.assembly.ComponentType;
-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;
@@ -37,7 +36,6 @@ import org.apache.tuscany.sca.policy.PolicySet;
*/
public class ComponentTypeImpl extends ExtensibleImpl implements ComponentType, Cloneable {
private String uri;
- private ConstrainingType constrainingType;
private List<Property> properties = new ArrayList<Property>();
private List<Reference> references = new ArrayList<Reference>();
private List<Service> services = new ArrayList<Service>();
@@ -79,10 +77,6 @@ public class ComponentTypeImpl extends ExtensibleImpl implements ComponentType,
this.uri = uri;
}
- public ConstrainingType getConstrainingType() {
- return constrainingType;
- }
-
public List<Property> getProperties() {
return properties;
}
@@ -134,10 +128,6 @@ public class ComponentTypeImpl extends ExtensibleImpl implements ComponentType,
return service;
}
- public void setConstrainingType(ConstrainingType constrainingType) {
- this.constrainingType = constrainingType;
- }
-
@Override
public int hashCode() {
return String.valueOf(getURI()).hashCode();
diff --git a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java b/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java
deleted file mode 100644
index 16ea948391..0000000000
--- a/java/sca/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * 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.assembly.impl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.assembly.AbstractProperty;
-import org.apache.tuscany.sca.assembly.AbstractReference;
-import org.apache.tuscany.sca.assembly.AbstractService;
-import org.apache.tuscany.sca.assembly.ConstrainingType;
-import org.apache.tuscany.sca.policy.ExtensionType;
-import org.apache.tuscany.sca.policy.Intent;
-import org.apache.tuscany.sca.policy.PolicySet;
-
-/**
- * Represents a constraining type.
- *
- * @version $Rev$ $Date$
- */
-public class ConstrainingTypeImpl extends ExtensibleImpl implements ConstrainingType {
- private QName name;
- private List<AbstractProperty> properties = new ArrayList<AbstractProperty>();
- private List<AbstractReference> references = new ArrayList<AbstractReference>();
- private List<AbstractService> services = new ArrayList<AbstractService>();
- private List<Intent> requiredIntents = new ArrayList<Intent>();
- private List<PolicySet> policySets = new ArrayList<PolicySet>();
-
- /**
- * Constructs a new ConstrainingType
- */
- protected ConstrainingTypeImpl() {
- }
-
- public QName getName() {
- return name;
- }
-
- public void setName(QName name) {
- this.name = name;
- }
-
- public List<AbstractProperty> getProperties() {
- return properties;
- }
-
- public List<AbstractReference> getReferences() {
- return references;
- }
-
- public List<AbstractService> getServices() {
- return services;
- }
-
- public List<Intent> getRequiredIntents() {
- return requiredIntents;
- }
-
- public List<PolicySet> getPolicySets() {
- return policySets;
- }
-
- @Override
- public int hashCode() {
- return String.valueOf(getName()).hashCode();
- }
-
- @Override
- public boolean equals(Object obj) {
- if (obj == this) {
- return true;
- } else if (obj instanceof ConstrainingType) {
- if (getName() != null) {
- return getName().equals(((ConstrainingType)obj).getName());
- } else {
- return ((ConstrainingType)obj).getName() == null;
- }
- } else {
- return false;
- }
- }
-
- public ExtensionType getExtensionType() {
- return null;
- }
-
- public void setExtensionType(ExtensionType type) {
- }
-
-}
diff --git a/java/sca/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java b/java/sca/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java
index e58904cf00..20fd74d46e 100644
--- a/java/sca/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java
+++ b/java/sca/modules/assembly/src/test/java/org/apache/tuscany/sca/assembly/AssemblyFactoryTestCase.java
@@ -52,11 +52,6 @@ public class AssemblyFactoryTestCase {
createComposite();
}
- @Test
- public void testCreateConstrainingType() {
- createConstrainingType();
- }
-
/**
* Create a composite
*/
@@ -97,9 +92,6 @@ public class AssemblyFactoryTestCase {
Component c = assemblyFactory.createComponent();
c.setName(name);
- ConstrainingType constraint = createConstrainingType();
- c.setConstrainingType(constraint);
-
Implementation i = new TestImplementation(assemblyFactory);
c.setImplementation(i);
@@ -175,39 +167,4 @@ public class AssemblyFactoryTestCase {
return ctype;
}
- /**
- * Create a new constraining type
- *
- * @return
- */
- ConstrainingType createConstrainingType() {
- ConstrainingType ctype = assemblyFactory.createConstrainingType();
-
- AbstractProperty p = assemblyFactory.createAbstractProperty();
- p.setName("currency");
- p.setValue("USD");
- p.setMustSupply(true);
- p.setXSDType(new QName("", ""));
- ctype.getProperties().add(p);
-
- AbstractReference ref1 = assemblyFactory.createAbstractReference();
- ref1.setName("accountDataService");
- ref1.setInterfaceContract(new TestInterfaceContract(assemblyFactory));
- ref1.setMultiplicity(Multiplicity.ONE_ONE);
- ctype.getReferences().add(ref1);
-
- AbstractReference ref2 = assemblyFactory.createAbstractReference();
- ref2.setName("stockQuoteService");
- ref2.setInterfaceContract(new TestInterfaceContract(assemblyFactory));
- ref2.setMultiplicity(Multiplicity.ONE_ONE);
- ctype.getReferences().add(ref2);
-
- AbstractService s = assemblyFactory.createAbstractService();
- s.setName("AccountService");
- s.setInterfaceContract(new TestInterfaceContract(assemblyFactory));
- ctype.getServices().add(s);
-
- return ctype;
- }
-
}