diff options
Diffstat (limited to 'tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl')
26 files changed, 0 insertions, 2383 deletions
diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java deleted file mode 100644 index db4bcb0060..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java +++ /dev/null @@ -1,93 +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 javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.AbstractProperty; - -/** - * Represents an abstract property. - * - * @version $Rev$ $Date$ - */ -public class AbstractPropertyImpl extends ExtensibleImpl implements AbstractProperty { - private Object value; - private String name; - private QName xsdType; - private QName xsdElement; - private boolean many; - private boolean mustSupply; - - /** - * Constructs a new abstract property. - */ - protected AbstractPropertyImpl() { - } - - public Object getValue() { - return value; - } - - public String getName() { - return name; - } - - public QName getXSDElement() { - return xsdElement; - } - - public QName getXSDType() { - return xsdType; - } - - public boolean isMany() { - return many; - } - - public boolean isMustSupply() { - return mustSupply; - } - - public void setValue(Object defaultValue) { - this.value = defaultValue; - } - - public void setMany(boolean many) { - this.many = many; - } - - public void setMustSupply(boolean mustSupply) { - this.mustSupply = mustSupply; - } - - public void setName(String name) { - this.name = name; - } - - public void setXSDElement(QName element) { - this.xsdElement = element; - } - - public void setXSDType(QName type) { - this.xsdType = type; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractReferenceImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractReferenceImpl.java deleted file mode 100644 index d0ee3832c5..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractReferenceImpl.java +++ /dev/null @@ -1,46 +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 org.apache.tuscany.sca.assembly.AbstractReference; -import org.apache.tuscany.sca.assembly.Multiplicity; - -/** - * Represents an abstract reference - * - * @version $Rev$ $Date$ - */ -public class AbstractReferenceImpl extends ContractImpl implements AbstractReference { - private Multiplicity multiplicity = Multiplicity.ONE_ONE; - - /** - * Constructs a new abstract reference. - */ - protected AbstractReferenceImpl() { - } - - public Multiplicity getMultiplicity() { - return multiplicity; - } - - public void setMultiplicity(Multiplicity multiplicity) { - this.multiplicity = multiplicity; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractServiceImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractServiceImpl.java deleted file mode 100644 index 346764b1b4..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractServiceImpl.java +++ /dev/null @@ -1,36 +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 org.apache.tuscany.sca.assembly.AbstractService; - -/** - * Represents an abstract service - * - * @version $Rev$ $Date$ - */ -public class AbstractServiceImpl extends ContractImpl implements AbstractService { - - /** - * Constructs a new abstract service. - */ - protected AbstractServiceImpl() { - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java deleted file mode 100644 index e9939a2d2c..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java +++ /dev/null @@ -1,130 +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 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.AssemblyFactory; -import org.apache.tuscany.sca.assembly.Callback; -import org.apache.tuscany.sca.assembly.Component; -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.ComponentType; -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.ConstrainingType; -import org.apache.tuscany.sca.assembly.Endpoint2; -import org.apache.tuscany.sca.assembly.EndpointReference2; -import org.apache.tuscany.sca.assembly.Extension; -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.assembly.Wire; - -/** - * A factory for the assembly model. - * - * @version $Rev$ $Date$ - */ -public abstract class AssemblyFactoryImpl implements AssemblyFactory { - - public AbstractProperty createAbstractProperty() { - return new AbstractPropertyImpl(); - } - - public AbstractReference createAbstractReference() { - return new AbstractReferenceImpl(); - } - - public AbstractService createAbstractService() { - return new AbstractServiceImpl(); - } - - public Callback createCallback() { - return new CallbackImpl(); - } - - public Component createComponent() { - return new ComponentImpl(); - } - - public ComponentProperty createComponentProperty() { - return new ComponentPropertyImpl(); - } - - public ComponentReference createComponentReference() { - return new ComponentReferenceImpl(); - } - - public ComponentService createComponentService() { - return new ComponentServiceImpl(); - } - - public ComponentType createComponentType() { - return new ComponentTypeImpl(); - } - - public Composite createComposite() { - return new CompositeImpl(); - } - - public CompositeReference createCompositeReference() { - return new CompositeReferenceImpl(); - } - - public CompositeService createCompositeService() { - return new CompositeServiceImpl(); - } - - public ConstrainingType createConstrainingType() { - return new ConstrainingTypeImpl(); - } - - public Property createProperty() { - return new PropertyImpl(); - } - - public Reference createReference() { - return new ReferenceImpl(); - } - - public Service createService() { - return new ServiceImpl(); - } - - public Wire createWire() { - return new WireImpl(); - } - - public Extension createExtension() { - return new ExtensionImpl(); - } - - public Endpoint2 createEndpoint() { - return new Endpoint2Impl(); - } - - public EndpointReference2 createEndpointReference() { - return new EndpointReference2Impl(); - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BaseImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BaseImpl.java deleted file mode 100644 index 553e600bc9..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BaseImpl.java +++ /dev/null @@ -1,45 +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 org.apache.tuscany.sca.assembly.Base; - -/** - * Convenience base class for assembly model objects. - * - * @version $Rev$ $Date$ - */ -public abstract class BaseImpl implements Base { - private boolean unresolved; - - /** - * Constructs a new base model object. - */ - protected BaseImpl() { - } - - public boolean isUnresolved() { - return unresolved; - } - - public void setUnresolved(boolean undefined) { - this.unresolved = undefined; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BindingImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BindingImpl.java deleted file mode 100644 index 1e69dfcc87..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BindingImpl.java +++ /dev/null @@ -1,77 +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 org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * - */ -public abstract class BindingImpl extends ExtensibleImpl implements Binding { - private String name; - private ExtensionType type; - private String uri; - private List<Intent> requiredIntents = new ArrayList<Intent>(); - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - public List<PolicySet> getPolicySets() { - return policySets; - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public ExtensionType getType() { - return type; - } - - public void setType(ExtensionType type) { - this.type = type; - } - - public String getURI() { - return uri; - } - - public void setURI(String uri) { - this.uri = uri; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java deleted file mode 100644 index f8f856f1b4..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java +++ /dev/null @@ -1,67 +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 org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Callback; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Represents a reference. - * - * @version $Rev$ $Date$ - */ -public class CallbackImpl extends ExtensibleImpl implements Callback { - private List<Binding> bindings = new ArrayList<Binding>(); - private List<Intent> requiredIntents = new ArrayList<Intent>(); - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - - public List<PolicySet> getPolicySets() { - return policySets; - } - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - protected CallbackImpl() { - } - - public List<Binding> getBindings() { - return bindings; - } - - public ExtensionType getType() { - return null; - } - - public void setType(ExtensionType type) { - } - - public void setRequiredIntents(List<Intent> intents) { - this.requiredIntents = intents; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java deleted file mode 100644 index d751d59f83..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java +++ /dev/null @@ -1,148 +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 org.apache.tuscany.sca.assembly.Component; -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.ConstrainingType; -import org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Represents a component. - * - * @version $Rev$ $Date$ - */ -public class ComponentImpl extends ExtensibleImpl implements Component, Cloneable { - private ConstrainingType constrainingType; - private Implementation implementation; - private String name; - private String uri; - private List<ComponentProperty> properties = new ArrayList<ComponentProperty>(); - private List<ComponentReference> references = new ArrayList<ComponentReference>(); - private List<ComponentService> services = new ArrayList<ComponentService>(); - private List<Intent> requiredIntents = new ArrayList<Intent>(); - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - private Boolean autowire; - private ExtensionType type; - /** - * Constructs a new component. - */ - protected ComponentImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - ComponentImpl clone = (ComponentImpl)super.clone(); - - clone.properties = new ArrayList<ComponentProperty>(); - for (ComponentProperty property : getProperties()) { - clone.properties.add((ComponentProperty)property.clone()); - } - clone.references = new ArrayList<ComponentReference>(); - for (ComponentReference reference : getReferences()) { - clone.references.add((ComponentReference)reference.clone()); - } - clone.services = new ArrayList<ComponentService>(); - for (ComponentService service : getServices()) { - clone.services.add((ComponentService)service.clone()); - } - return clone; - } - - public String getURI() { - return uri; - } - - public void setURI(String uri) { - this.uri = uri; - } - - public ConstrainingType getConstrainingType() { - return constrainingType; - } - - public Implementation getImplementation() { - return implementation; - } - - public String getName() { - return name; - } - - public List<ComponentProperty> getProperties() { - return properties; - } - - public List<ComponentReference> getReferences() { - return references; - } - - public List<ComponentService> getServices() { - return services; - } - - public void setConstrainingType(ConstrainingType constrainingType) { - this.constrainingType = constrainingType; - } - - public void setImplementation(Implementation implementation) { - this.implementation = implementation; - } - - public void setName(String name) { - this.name = name; - } - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - public List<PolicySet> getPolicySets() { - return policySets; - } - - public boolean isAutowire() { - return (autowire == null) ? false : autowire.booleanValue(); - } - - public void setAutowire(Boolean autowire) { - this.autowire = autowire; - } - - public Boolean getAutowire() { - return autowire; - } - - public ExtensionType getType() { - return type; - } - - public void setType(ExtensionType type) { - this.type = type; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentPropertyImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentPropertyImpl.java deleted file mode 100644 index e2e7b59896..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentPropertyImpl.java +++ /dev/null @@ -1,93 +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 javax.xml.xpath.XPathExpression; - -import org.apache.tuscany.sca.assembly.ComponentProperty; -import org.apache.tuscany.sca.assembly.Property; - -/** - * Represents a component property. - * - * @version $Rev$ $Date$ - */ -public class ComponentPropertyImpl extends PropertyImpl implements ComponentProperty, Cloneable { - private String file; - private Property property; - private String source; - private XPathExpression sourceXPathExpression; - - /** - * Constructs a new component property. - */ - protected ComponentPropertyImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - // FIXME getValue should not delegate to property.getValue() - // Doing this violates the setValue/getValue semantics, as you - // can call setValue() then get a different value from getValue() - @Override - public Object getValue() { - if (super.getValue() == null && property != null) { - return property.getValue(); - } else { - return super.getValue(); - } - } - - public String getFile() { - return file; - } - - public Property getProperty() { - return property; - } - - public String getSource() { - return source; - } - - public void setFile(String file) { - this.file = file; - } - - public void setProperty(Property property) { - this.property = property; - } - - public void setSource(String source) { - this.source = source; - } - - public XPathExpression getSourceXPathExpression() { - return sourceXPathExpression; - } - - public void setSourceXPathExpression(XPathExpression sourceXPathExpression) { - this.sourceXPathExpression = sourceXPathExpression; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentReferenceImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentReferenceImpl.java deleted file mode 100644 index 2380bbf088..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentReferenceImpl.java +++ /dev/null @@ -1,111 +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 org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.ComponentReference; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.CompositeReference; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; - -/** - * Represents a component reference - * - * @version $Rev$ $Date$ - */ -public class ComponentReferenceImpl extends ReferenceImpl implements ComponentReference, Cloneable { - private Reference reference; - private Boolean autowire; - private boolean nonOverridable; - private List<CompositeReference> promotedAs = new ArrayList<CompositeReference>(); - private ComponentService callbackService; - - /** - * Constructs a new component reference. - */ - protected ComponentReferenceImpl() { - // Set multiplicity to null so that by default it'll inherit from the Reference - setMultiplicity(null); - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public Reference getReference() { - return reference; - } - - public void setReference(Reference reference) { - this.reference = reference; - } - - public boolean isAutowire() { - return (autowire == null) ? false : autowire.booleanValue(); - } - - public void setAutowire(Boolean autowire) { - this.autowire = autowire; - } - - public Boolean getAutowire() { - return autowire; - } - - public List<CompositeReference> promotedAs() { - return promotedAs; - } - - public ComponentService getCallbackService() { - return callbackService; - } - - public void setCallbackService(ComponentService callbackService) { - this.callbackService = callbackService; - } - - - /** - * Use endpoint information to work out what the interface contract for the - * binding is. - */ - @Override - public InterfaceContract getInterfaceContract(Binding binding){ - InterfaceContract interfaceContract = null; - - if (interfaceContract == null){ - interfaceContract = getInterfaceContract(); - } - return interfaceContract; - } - - public boolean isNonOverridable() { - return nonOverridable; - } - - public void setNonOverridable(boolean nonOverridable) { - this.nonOverridable = nonOverridable; - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentServiceImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentServiceImpl.java deleted file mode 100644 index 0c78a2505f..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentServiceImpl.java +++ /dev/null @@ -1,71 +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 org.apache.tuscany.sca.assembly.ComponentReference; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.CompositeService; -import org.apache.tuscany.sca.assembly.Service; - -/** - * Represents a component service - * - * @version $Rev$ $Date$ - */ -public class ComponentServiceImpl extends ServiceImpl implements ComponentService, Cloneable { - private Service service; - private List<CompositeService> promotedAs = new ArrayList<CompositeService>(); - private ComponentReference callbackReference; - - /** - * Constructs a new component service. - */ - protected ComponentServiceImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public Service getService() { - return service; - } - - public void setService(Service service) { - this.service = service; - } - - public List<CompositeService> promotedAs() { - return promotedAs; - } - - public ComponentReference getCallbackReference() { - return callbackReference; - } - - public void setCallbackReference(ComponentReference callbackReference) { - this.callbackReference = callbackReference; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java deleted file mode 100644 index c79aaf6b2e..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java +++ /dev/null @@ -1,135 +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 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; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Represents a component type. - * - * @version $Rev$ $Date$ - */ -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>(); - private List<Intent> requiredIntents = new ArrayList<Intent>(); - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - /** - * Constructs a new component type. - */ - protected ComponentTypeImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - ComponentTypeImpl clone = (ComponentTypeImpl)super.clone(); - - clone.services = new ArrayList<Service>(); - for (Service service : getServices()) { - clone.services.add((Service)service.clone()); - } - clone.references = new ArrayList<Reference>(); - for (Reference reference : getReferences()) { - clone.references.add((Reference)reference.clone()); - } - clone.properties = new ArrayList<Property>(); - for (Property property : getProperties()) { - clone.properties.add((Property)property.clone()); - } - return clone; - } - - public String getURI() { - return uri; - } - - public void setURI(String uri) { - this.uri = uri; - } - - public ConstrainingType getConstrainingType() { - return constrainingType; - } - - public List<Property> getProperties() { - return properties; - } - - public List<Reference> getReferences() { - return references; - } - - public List<Service> getServices() { - return services; - } - - public void setConstrainingType(ConstrainingType constrainingType) { - this.constrainingType = constrainingType; - } - - @Override - public int hashCode() { - return String.valueOf(getURI()).hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } else { - if (obj instanceof ComponentType) { - if (getURI() != null) { - return getURI().equals(((ComponentType)obj).getURI()); - } else { - return ((ComponentType)obj).getURI() == null; - } - } else { - return false; - } - } - } - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - public List<PolicySet> getPolicySets() { - return policySets; - } - - public ExtensionType getType() { - return null; - } - - public void setType(ExtensionType type) { - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java deleted file mode 100644 index 4e14cf0e53..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java +++ /dev/null @@ -1,162 +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.Component; -import org.apache.tuscany.sca.assembly.ComponentReference; -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.Reference; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.assembly.Wire; - -/** - * Implementation of a Composite. - * - * @version $Rev$ $Date$ - */ -public class CompositeImpl extends ImplementationImpl implements Composite, Cloneable { - private String specVersion = "undefined"; - private List<Component> components = new ArrayList<Component>(); - private List<Composite> includes = new ArrayList<Composite>(); - private QName name; - private List<Wire> wires = new ArrayList<Wire>(); - private Boolean autowire; - private boolean local = true; - - /** - * Constructs a new composite. - */ - protected CompositeImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - CompositeImpl clone = (CompositeImpl)super.clone(); - - clone.components = new ArrayList<Component>(); - for (Component component : getComponents()) { - Component clonedComponent = (Component)component.clone(); - for (Service service : clone.getServices()) { - CompositeService compositeService = (CompositeService)service; - // Force the promoted component/service to be rebuilt against the clone - if (compositeService.getPromotedComponent() != null) { - compositeService.getPromotedComponent().setUnresolved(true); - } - if (compositeService.getPromotedService() != null) { - compositeService.getPromotedService().setUnresolved(true); - } - } - for (Reference reference : clone.getReferences()) { - CompositeReference compositeReference = (CompositeReference)reference; - for (ComponentReference ref : compositeReference.getPromotedReferences()) { - // Force the promoted reference to be rebuilt against the clone - ref.setUnresolved(true); - } - } - - clone.components.add(clonedComponent); - } - clone.wires = new ArrayList<Wire>(); - for (Wire wire : getWires()) { - clone.wires.add((Wire)wire.clone()); - } - return clone; - } - - public String getSpecVersion() { - return specVersion; - } - - public void setSpecVersion(String specVersion) { - this.specVersion = specVersion; - } - - public List<Component> getComponents() { - return components; - } - - public List<Composite> getIncludes() { - return includes; - } - - public QName getName() { - return name; - } - - public List<Wire> getWires() { - return wires; - } - - public boolean isLocal() { - return local; - } - - public void setLocal(boolean local) { - this.local = local; - } - - public boolean isAutowire() { - return (autowire == null) ? false : autowire.booleanValue(); - } - - public void setAutowire(Boolean autowire) { - this.autowire = autowire; - } - - public Boolean getAutowire() { - return autowire; - } - - public void setName(QName name) { - this.name = name; - } - - @Override - public int hashCode() { - return String.valueOf(getName()).hashCode(); - } - - @Override - public boolean equals(Object obj) { - if (obj == this) { - return true; - } else if (obj instanceof Composite) { - if (getName() != null) { - return getName().equals(((Composite)obj).getName()); - } else { - return ((Composite)obj).getName() == null; - } - } else { - return false; - } - } - - @Override - public String toString(){ - return ( this.name != null ) ? getName().toString() : "null"; - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java deleted file mode 100644 index db88798cb5..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java +++ /dev/null @@ -1,57 +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 org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentReference; -import org.apache.tuscany.sca.assembly.CompositeReference; - -/** - * Represents a composite reference. - * - * @version $Rev$ $Date$ - */ -public class CompositeReferenceImpl extends ReferenceImpl implements CompositeReference, Cloneable { - private List<Component> promotedComponents = new ArrayList<Component>(); - private List<ComponentReference> promotedReferences = new ArrayList<ComponentReference>(); - - /** - * Constructs a new composite reference. - */ - protected CompositeReferenceImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public List<ComponentReference> getPromotedReferences() { - return promotedReferences; - } - - public List<Component> getPromotedComponents() { - return promotedComponents; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeServiceImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeServiceImpl.java deleted file mode 100644 index 6777a96982..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeServiceImpl.java +++ /dev/null @@ -1,62 +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 org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.CompositeService; - -/** - * Represents a composite service - * - * @version $Rev$ $Date$ - */ -public class CompositeServiceImpl extends ServiceImpl implements CompositeService, Cloneable { - private ComponentService promotedService; - private Component promotedComponent; - - /** - * Constructs a new composite service. - */ - protected CompositeServiceImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public ComponentService getPromotedService() { - return promotedService; - } - - public void setPromotedService(ComponentService promotedService) { - this.promotedService = promotedService; - } - - public Component getPromotedComponent() { - return promotedComponent; - } - - public void setPromotedComponent(Component promotedComponent) { - this.promotedComponent = promotedComponent; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java deleted file mode 100644 index 641e0f17df..0000000000 --- a/tags/java/sca/2.0-M2/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 getType() { - return null; - } - - public void setType(ExtensionType type) { - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ContractImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ContractImpl.java deleted file mode 100644 index a121635323..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ContractImpl.java +++ /dev/null @@ -1,88 +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 org.apache.tuscany.sca.assembly.AbstractContract; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Implementation of a Contract. - * - * @version $Rev$ $Date$ - */ -public class ContractImpl extends ExtensibleImpl implements AbstractContract { - private InterfaceContract interfaceContract; - private String name; - private List<Intent> requiredIntents = new ArrayList<Intent>(); - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - - private boolean isCallback = false; - - /** - * Constructs a new contract. - */ - protected ContractImpl() { - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public InterfaceContract getInterfaceContract() { - return interfaceContract; - } - - public void setInterfaceContract(InterfaceContract interfaceContract) { - this.interfaceContract = interfaceContract; - } - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - public boolean isCallback() { - return isCallback; - } - - public void setIsCallback(boolean isCallback) { - this.isCallback = isCallback; - } - - public ExtensionType getType() { - return null; - } - - public void setType(ExtensionType type) { - } - - public List<PolicySet> getPolicySets() { - return policySets; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java deleted file mode 100644 index eb3b87dec0..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/Endpoint2Impl.java +++ /dev/null @@ -1,138 +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 org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Endpoint2; -import org.apache.tuscany.sca.assembly.EndpointReference2; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySubject; - -/** - * The assembly model object for an endpoint. - * - * @version $Rev$ $Date$ - */ -public class Endpoint2Impl implements Endpoint2 { - - private Boolean unresolved; - private Component component; - private ComponentService service; - private Binding binding; - private InterfaceContract interfaceContract; - private List<EndpointReference2> callbackEndpointReferences = new ArrayList<EndpointReference2>(); - //private String uri; - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - private List<Intent> requiredIntents = new ArrayList<Intent>(); - - protected Endpoint2Impl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public boolean isUnresolved() { - return unresolved; - } - - public void setUnresolved(boolean unresolved) { - this.unresolved = unresolved; - } - - public Component getComponent() { - return component; - } - - public void setComponent(Component component) { - this.component = component; - } - - public ComponentService getService() { - return service; - } - - public void setService(ComponentService service) { - this.service = service; - } - - public Binding getBinding() { - return binding; - } - - public void setBinding(Binding binding) { - this.binding = binding; - } - - public InterfaceContract getInterfaceContract() { - return interfaceContract; - } - - public void setInterfaceContract(InterfaceContract interfaceContract) { - this.interfaceContract = interfaceContract; - } - - /** - * Get the services callbacl enpoint references that - * represent endpoint references from which callbacks - * originate - * - * @return callbackEndpoint the reference callback endpoint - */ - public List<EndpointReference2> getCallbackEndpointReferences(){ - return callbackEndpointReferences; - } - -/* - public String getURI() { - return uri; - } - - public void setURI(String uri) { - this.uri = uri; - } -*/ - public List<PolicySet> getPolicySets() { - return policySets; - } - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - public ExtensionType getType() { - if (binding instanceof PolicySubject) { - return ((PolicySubject)binding).getType(); - } - return null; - } - - public void setType(ExtensionType type) { - throw new UnsupportedOperationException(); - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReference2Impl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReference2Impl.java deleted file mode 100644 index 58b80d74ec..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointReference2Impl.java +++ /dev/null @@ -1,157 +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 org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Component; -import org.apache.tuscany.sca.assembly.ComponentReference; -import org.apache.tuscany.sca.assembly.Endpoint2; -import org.apache.tuscany.sca.assembly.EndpointReference2; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySubject; - -/** - * The assembly model object for an endpoint. - * - * @version $Rev$ $Date$ - */ -public class EndpointReference2Impl implements EndpointReference2 { - - // this endpoint reference - private Boolean unresolved = true; - private Component component; - private ComponentReference reference; - private Binding binding; - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - private List<Intent> requiredIntents = new ArrayList<Intent>(); - private InterfaceContract interfaceContract; - - // the target of the endpoint reference - private Endpoint2 targetEndpoint; -// private String uri; - - // callback endpoint that messages across this reference - // will be directed toward - private Endpoint2 callbackEndpoint; - - protected EndpointReference2Impl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - EndpointReference2 cloned = (EndpointReference2)super.clone(); - - if (targetEndpoint != null){ - cloned.setTargetEndpoint((Endpoint2)targetEndpoint.clone()); - } - - return cloned; - } - - public boolean isUnresolved() { - return unresolved; - } - - public void setUnresolved(boolean unresolved) { - this.unresolved = unresolved; - } - - public Component getComponent() { - return component; - } - - public void setComponent(Component component) { - this.component = component; - } - - public ComponentReference getReference() { - return reference; - } - - public void setReference(ComponentReference reference) { - this.reference = reference; - } - - public Binding getBinding() { - return binding; - } - - public void setBinding(Binding binding) { - this.binding = binding; - } - - public Endpoint2 getTargetEndpoint() { - return targetEndpoint; - } - - public void setTargetEndpoint(Endpoint2 targetEndpoint) { - this.targetEndpoint = targetEndpoint; - } - - public InterfaceContract getInterfaceContract() { - return interfaceContract; - } - - public void setInterfaceContract(InterfaceContract interfaceContract) { - this.interfaceContract = interfaceContract; - } - - /* - public String getURI() { - return uri; - } - - public void setURI(String uri) { - this.uri = uri; - } - */ - - public List<PolicySet> getPolicySets() { - return policySets; - } - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - public ExtensionType getType() { - if (binding instanceof PolicySubject) { - return ((PolicySubject)binding).getType(); - } - return null; - } - - public void setType(ExtensionType type) { - throw new UnsupportedOperationException(); - } - - public Endpoint2 getCallbackEndpoint() { - return callbackEndpoint; - } - - public void setCallbackEndpoint(Endpoint2 callbackEndpoint) { - this.callbackEndpoint = callbackEndpoint; - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensibleImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensibleImpl.java deleted file mode 100644 index 761799a4d5..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensibleImpl.java +++ /dev/null @@ -1,49 +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 org.apache.tuscany.sca.assembly.Extensible; -import org.apache.tuscany.sca.assembly.Extension; - -/** - * Convenience base class for extensible assembly model objects. - * - * @version $Rev$ $Date$ - */ -public abstract class ExtensibleImpl extends BaseImpl implements Extensible { - private List<Object> extensions = new ArrayList<Object>(); - private List<Extension> attributeExtensions = new ArrayList<Extension>(); - - /** - * Constructs a new base model object. - */ - protected ExtensibleImpl() { - } - - public List<Object> getExtensions() { - return extensions; - } - - public List<Extension> getAttributeExtensions() { - return attributeExtensions; - } -}
\ No newline at end of file diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensionImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensionImpl.java deleted file mode 100644 index 9befad9f2b..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensionImpl.java +++ /dev/null @@ -1,62 +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 javax.xml.namespace.QName; - -import org.apache.tuscany.sca.assembly.Extension; - -public class ExtensionImpl implements Extension { - private QName qName; - private Object value; - boolean isAttribute = false; - - public ExtensionImpl() { - } - - public ExtensionImpl(QName qName, Object value, boolean isAttribute) { - this.qName = qName; - this.value = value; - this.isAttribute = isAttribute; - } - - public QName getQName() { - return qName; - } - - public void setQName(QName qName) { - this.qName = qName; - } - - public <T> T getValue() { - return (T) value; - } - - public <T> void setValue(T value) { - this.value = value; - } - - public boolean isAttribute() { - return isAttribute; - } - - public void setAttribute(boolean isAttribute) { - this.isAttribute = isAttribute; - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java deleted file mode 100644 index 1c28192b3a..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java +++ /dev/null @@ -1,60 +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 org.apache.tuscany.sca.assembly.Implementation; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; -import org.apache.tuscany.sca.policy.PolicySubject; - -/** - * Base implementation class of Implementation model interface - * - * @version $Rev$ $Date$ - */ -public abstract class ImplementationImpl extends ComponentTypeImpl implements Implementation, PolicySubject { - private ExtensionType type; - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - private List<Intent> requiredIntents = new ArrayList<Intent>(); - - protected ImplementationImpl() { - super(); - } - - public List<PolicySet> getPolicySets() { - return policySets; - } - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - public ExtensionType getType() { - return type; - } - - public void setType(ExtensionType type) { - this.type = type; - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java deleted file mode 100644 index 0c1051199f..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java +++ /dev/null @@ -1,59 +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 org.apache.tuscany.sca.assembly.Property; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Represents a property. - * - * @version $Rev$ $Date$ - */ -public class PropertyImpl extends AbstractPropertyImpl implements Property, Cloneable { - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>(); - - /** - * Constructs a new property. - */ - protected PropertyImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public List<PolicySet> getPolicySets() { - return policySets; - } - - public void setPolicySets(List<PolicySet> policySets) { - this.policySets = policySets; - } - - public List<PolicySet> getApplicablePolicySets() { - return applicablePolicySets; - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java deleted file mode 100644 index 41d090c9d4..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java +++ /dev/null @@ -1,126 +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 org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Callback; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.EndpointReference2; -import org.apache.tuscany.sca.assembly.Reference; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; - -/** - * Represents a reference. - * - * @version $Rev$ $Date$ - */ -public class ReferenceImpl extends AbstractReferenceImpl implements Reference, Cloneable { - private List<Binding> bindings = new ArrayList<Binding>(); - private boolean wiredByImpl; - private List<ComponentService> targets = new ArrayList<ComponentService>(); - private Callback callback; - private boolean promotionOverride; - private List<EndpointReference2> endpointReferences = new ArrayList<EndpointReference2>(); - - /** - * Constructs a new reference. - */ - protected ReferenceImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - ReferenceImpl clone = (ReferenceImpl)super.clone(); - clone.bindings = new ArrayList<Binding>(); - clone.bindings.addAll(getBindings()); - clone.targets = new ArrayList<ComponentService>(); - clone.targets.addAll(getTargets()); - clone.endpointReferences = new ArrayList<EndpointReference2>(); - clone.endpointReferences.addAll(getEndpointReferences()); - return clone; - } - - public List<Binding> getBindings() { - return bindings; - } - - public <B> B getBinding(Class<B> bindingClass) { - for (Binding binding : bindings) { - if (bindingClass.isInstance(binding)) { - return bindingClass.cast(binding); - } - } - return null; - } - - public <B> B getCallbackBinding(Class<B> bindingClass) { - if (callback != null) { - for (Binding binding : callback.getBindings()) { - if (bindingClass.isInstance(binding)) { - return bindingClass.cast(binding); - } - } - } - return null; - } - - public boolean isWiredByImpl() { - return wiredByImpl; - } - - public void setWiredByImpl(boolean wiredByImpl) { - this.wiredByImpl = wiredByImpl; - } - - public boolean isPromotionOverride() { - return promotionOverride; - } - - public void setPromotionOverride(boolean promotionOverride) { - this.promotionOverride = promotionOverride; - } - - public List<ComponentService> getTargets() { - return targets; - } - - public Callback getCallback() { - return callback; - } - - public void setCallback(Callback callback) { - this.callback = callback; - } - - /** - * By default return the interface contract for the reference - */ - public InterfaceContract getInterfaceContract(Binding binding) { - return getInterfaceContract(); - } - - public List<EndpointReference2> getEndpointReferences() { - return endpointReferences; - } - -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java deleted file mode 100644 index a4010400e2..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java +++ /dev/null @@ -1,98 +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 org.apache.tuscany.sca.assembly.Binding; -import org.apache.tuscany.sca.assembly.Callback; -import org.apache.tuscany.sca.assembly.Endpoint2; -import org.apache.tuscany.sca.assembly.Service; -import org.apache.tuscany.sca.interfacedef.InterfaceContract; - -/** - * Represents a reference. - * - * @version $Rev$ $Date$ - */ -public class ServiceImpl extends AbstractServiceImpl implements Service, Cloneable { - private List<Binding> bindings = new ArrayList<Binding>(); - private Callback callback; - private List<Endpoint2> endpoints = new ArrayList<Endpoint2>(); - - - /** - * Constructs a new service. - */ - protected ServiceImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - ServiceImpl clone = (ServiceImpl)super.clone(); - clone.bindings = new ArrayList<Binding>(); - clone.bindings.addAll(getBindings()); - return clone; - } - - public List<Binding> getBindings() { - return bindings; - } - - public <B> B getBinding(Class<B> bindingClass) { - for (Binding binding : bindings) { - if (bindingClass.isInstance(binding)) { - return bindingClass.cast(binding); - } - } - return null; - } - - public <B> B getCallbackBinding(Class<B> bindingClass) { - if (callback != null) { - for (Binding binding : callback.getBindings()) { - if (bindingClass.isInstance(binding)) { - return bindingClass.cast(binding); - } - } - } - return null; - } - - public Callback getCallback() { - return callback; - } - - public void setCallback(Callback callback) { - this.callback = callback; - } - - /** - * By default return the interface contract for the service - */ - public InterfaceContract getInterfaceContract(Binding binding){ - return getInterfaceContract(); - } - - public List<Endpoint2> getEndpoints() { - return endpoints; - } -} diff --git a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java b/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java deleted file mode 100644 index 9f8af0907d..0000000000 --- a/tags/java/sca/2.0-M2/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java +++ /dev/null @@ -1,105 +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 org.apache.tuscany.sca.assembly.ComponentReference; -import org.apache.tuscany.sca.assembly.ComponentService; -import org.apache.tuscany.sca.assembly.Wire; -import org.apache.tuscany.sca.policy.ExtensionType; -import org.apache.tuscany.sca.policy.Intent; -import org.apache.tuscany.sca.policy.PolicySet; - -/** - * Represents a wire - * - * @version $Rev$ $Date$ - */ -public class WireImpl extends ExtensibleImpl implements Wire, Cloneable { - private ComponentReference source; - private ComponentService target; - private boolean replace; - private List<Intent> requiredIntents = new ArrayList<Intent>(); - private List<PolicySet> policySets = new ArrayList<PolicySet>(); - private List<PolicySet> applicablePolicySets = new ArrayList<PolicySet>(); - - public List<PolicySet> getApplicablePolicySets() { - return applicablePolicySets; - } - - /** - * Constructs a new wire. - */ - protected WireImpl() { - } - - @Override - public Object clone() throws CloneNotSupportedException { - return super.clone(); - } - - public ComponentReference getSource() { - return source; - } - - public ComponentService getTarget() { - return target; - } - - public void setSource(ComponentReference source) { - this.source = source; - } - - public void setTarget(ComponentService target) { - this.target = target; - } - - public List<Intent> getRequiredIntents() { - return requiredIntents; - } - - public List<PolicySet> getPolicySets() { - return policySets; - } - - public ExtensionType getType() { - return null; - } - - public void setType(ExtensionType type) { - } - - public void setPolicySets(List<PolicySet> policySets) { - this.policySets = policySets; - } - - public void setRequiredIntents(List<Intent> intents) { - this.requiredIntents = intents; - } - - public boolean isReplace() { - return replace; - } - - public void setReplace(boolean replace) { - this.replace = replace; - } -} |