From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001 From: dims Date: Tue, 17 Jun 2008 00:23:01 +0000 Subject: Move Tuscany from Incubator to top level. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/assembly/impl/AbstractPropertyImpl.java | 114 ++++++++++++++ .../sca/assembly/impl/AbstractReferenceImpl.java | 46 ++++++ .../sca/assembly/impl/AbstractServiceImpl.java | 36 +++++ .../sca/assembly/impl/AssemblyFactoryImpl.java | 121 ++++++++++++++ .../apache/tuscany/sca/assembly/impl/BaseImpl.java | 45 ++++++ .../tuscany/sca/assembly/impl/CallbackImpl.java | 82 ++++++++++ .../tuscany/sca/assembly/impl/ComponentImpl.java | 174 +++++++++++++++++++++ .../sca/assembly/impl/ComponentPropertyImpl.java | 93 +++++++++++ .../sca/assembly/impl/ComponentReferenceImpl.java | 91 +++++++++++ .../sca/assembly/impl/ComponentServiceImpl.java | 71 +++++++++ .../sca/assembly/impl/ComponentTypeImpl.java | 115 ++++++++++++++ .../tuscany/sca/assembly/impl/CompositeImpl.java | 153 ++++++++++++++++++ .../sca/assembly/impl/CompositeReferenceImpl.java | 51 ++++++ .../sca/assembly/impl/CompositeServiceImpl.java | 62 ++++++++ .../sca/assembly/impl/ConfiguredOperationImpl.java | 93 +++++++++++ .../sca/assembly/impl/ConstrainingTypeImpl.java | 105 +++++++++++++ .../tuscany/sca/assembly/impl/ContractImpl.java | 96 ++++++++++++ .../sca/assembly/impl/EndpointFactoryImpl.java | 41 +++++ .../tuscany/sca/assembly/impl/EndpointImpl.java | 143 +++++++++++++++++ .../tuscany/sca/assembly/impl/ExtensibleImpl.java | 44 ++++++ .../sca/assembly/impl/ImplementationImpl.java | 75 +++++++++ .../tuscany/sca/assembly/impl/PropertyImpl.java | 59 +++++++ .../tuscany/sca/assembly/impl/ReferenceImpl.java | 116 ++++++++++++++ .../tuscany/sca/assembly/impl/ServiceImpl.java | 99 ++++++++++++ .../apache/tuscany/sca/assembly/impl/WireImpl.java | 96 ++++++++++++ 25 files changed, 2221 insertions(+) create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractReferenceImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractServiceImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BaseImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentPropertyImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentReferenceImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentServiceImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeServiceImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ContractImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointFactoryImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensibleImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java create mode 100644 sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java (limited to 'sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl') diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java new file mode 100644 index 0000000000..b7c63dc2b4 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractPropertyImpl.java @@ -0,0 +1,114 @@ +/* + * 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.policy.Intent; +import org.apache.tuscany.sca.policy.IntentAttachPointType; + +/** + * 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; + private List requiredIntents = new ArrayList(); + + + public List getRequiredIntents() { + return requiredIntents; + } + + /** + * 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; + } + + public IntentAttachPointType getType() { + return null; + } + + public void setType(IntentAttachPointType type) { + } + + public void setRequiredIntents(List intents) { + this.requiredIntents = intents; + } +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractReferenceImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractReferenceImpl.java new file mode 100644 index 0000000000..d0ee3832c5 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractReferenceImpl.java @@ -0,0 +1,46 @@ +/* + * 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/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractServiceImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractServiceImpl.java new file mode 100644 index 0000000000..346764b1b4 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AbstractServiceImpl.java @@ -0,0 +1,36 @@ +/* + * 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/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java new file mode 100644 index 0000000000..016a9a5b05 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/AssemblyFactoryImpl.java @@ -0,0 +1,121 @@ +/* + * 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.ConfiguredOperation; +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.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 ConfiguredOperation createConfiguredOperation() { + return new ConfiguredOperationImpl(); + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BaseImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BaseImpl.java new file mode 100644 index 0000000000..553e600bc9 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/BaseImpl.java @@ -0,0 +1,45 @@ +/* + * 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/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java new file mode 100644 index 0000000000..4082d81fdb --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CallbackImpl.java @@ -0,0 +1,82 @@ +/* + * 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.ConfiguredOperation; +import org.apache.tuscany.sca.policy.Intent; +import org.apache.tuscany.sca.policy.IntentAttachPointType; +import org.apache.tuscany.sca.policy.PolicySet; + +/** + * Represents a reference. + * + * @version $Rev$ $Date$ + */ +public class CallbackImpl extends ExtensibleImpl implements Callback { + private List bindings = new ArrayList(); + private List requiredIntents = new ArrayList(); + private List policySets = new ArrayList(); + private List configuredOperations = new ArrayList(); + private List applicablePolicySets = new ArrayList(); + + public List getPolicySets() { + return policySets; + } + + public List getRequiredIntents() { + return requiredIntents; + } + + protected CallbackImpl() { + } + + public List getBindings() { + return bindings; + } + + public IntentAttachPointType getType() { + return null; + } + + public void setType(IntentAttachPointType type) { + } + + public void setPolicySets(List policySets) { + this.policySets = policySets; + } + + public void setRequiredIntents(List intents) { + this.requiredIntents = intents; + } + + public List getConfiguredOperations() { + return configuredOperations; + } + + public List getApplicablePolicySets() { + return applicablePolicySets; + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java new file mode 100644 index 0000000000..34429a6703 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentImpl.java @@ -0,0 +1,174 @@ +/* + * 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.ConfiguredOperation; +import org.apache.tuscany.sca.assembly.ConstrainingType; +import org.apache.tuscany.sca.assembly.Implementation; +import org.apache.tuscany.sca.assembly.OperationsConfigurator; +import org.apache.tuscany.sca.policy.Intent; +import org.apache.tuscany.sca.policy.IntentAttachPointType; +import org.apache.tuscany.sca.policy.PolicySet; + +/** + * Represents a component. + * + * @version $Rev$ $Date$ + */ +public class ComponentImpl extends ExtensibleImpl implements Component, Cloneable, OperationsConfigurator { + private ConstrainingType constrainingType; + private Implementation implementation; + private String name; + private String uri; + private List properties = new ArrayList(); + private List references = new ArrayList(); + private List services = new ArrayList(); + private List requiredIntents = new ArrayList(); + private List policySets = new ArrayList(); + private Boolean autowire; + private IntentAttachPointType type; + private List configuredImplOperations = new ArrayList(); + private List applicablePolicySets = new ArrayList(); + /** + * Constructs a new component. + */ + protected ComponentImpl() { + } + + @Override + public Object clone() throws CloneNotSupportedException { + ComponentImpl clone = (ComponentImpl)super.clone(); + + clone.properties = new ArrayList(); + for (ComponentProperty property : getProperties()) { + clone.properties.add((ComponentProperty)property.clone()); + } + clone.references = new ArrayList(); + for (ComponentReference reference : getReferences()) { + clone.references.add((ComponentReference)reference.clone()); + } + clone.services = new ArrayList(); + 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 getProperties() { + return properties; + } + + public List getReferences() { + return references; + } + + public List 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 getRequiredIntents() { + return requiredIntents; + } + + public List 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 IntentAttachPointType getType() { + return type; + } + + public void setType(IntentAttachPointType type) { + this.type = type; + } + + public void setPolicySets(List policySets) { + this.policySets = policySets; + + } + + public void setRequiredIntents(List intents) { + this.requiredIntents = intents; + + } + + public List getConfiguredOperations() { + return configuredImplOperations; + } + + public void setConfiguredOperations(List configuredOperations) { + this.configuredImplOperations = configuredOperations; + } + + public List getApplicablePolicySets() { + return applicablePolicySets; + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentPropertyImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentPropertyImpl.java new file mode 100644 index 0000000000..e2e7b59896 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentPropertyImpl.java @@ -0,0 +1,93 @@ +/* + * 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/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentReferenceImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentReferenceImpl.java new file mode 100644 index 0000000000..b3fdd32aee --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentReferenceImpl.java @@ -0,0 +1,91 @@ +/* + * 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.CompositeReference; +import org.apache.tuscany.sca.assembly.Endpoint; +import org.apache.tuscany.sca.assembly.Reference; + +/** + * Represents a component reference + * + * @version $Rev$ $Date$ + */ +public class ComponentReferenceImpl extends ReferenceImpl implements ComponentReference, Cloneable { + private Reference reference; + private Boolean autowire; + private List promotedAs = new ArrayList(); + private ComponentService callbackService; + private List endpoints = new ArrayList(); + + /** + * 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 promotedAs() { + return promotedAs; + } + + public ComponentService getCallbackService() { + return callbackService; + } + + public void setCallbackService(ComponentService callbackService) { + this.callbackService = callbackService; + } + + public List getEndpoints(){ + return endpoints; + } +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentServiceImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentServiceImpl.java new file mode 100644 index 0000000000..0c78a2505f --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentServiceImpl.java @@ -0,0 +1,71 @@ +/* + * 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 promotedAs = new ArrayList(); + 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 promotedAs() { + return promotedAs; + } + + public ComponentReference getCallbackReference() { + return callbackReference; + } + + public void setCallbackReference(ComponentReference callbackReference) { + this.callbackReference = callbackReference; + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java new file mode 100644 index 0000000000..bbe665d52f --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ComponentTypeImpl.java @@ -0,0 +1,115 @@ +/* + * 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; + +/** + * Represents a component type. + * + * @version $Rev$ $Date$ + */ +public class ComponentTypeImpl extends ExtensibleImpl implements ComponentType, Cloneable { + private String uri; + private ConstrainingType constrainingType; + private List properties = new ArrayList(); + private List references = new ArrayList(); + private List services = new ArrayList(); + /** + * Constructs a new component type. + */ + protected ComponentTypeImpl() { + } + + @Override + public Object clone() throws CloneNotSupportedException { + ComponentTypeImpl clone = (ComponentTypeImpl)super.clone(); + + clone.services = new ArrayList(); + for (Service service : getServices()) { + clone.services.add((Service)service.clone()); + } + clone.references = new ArrayList(); + for (Reference reference : getReferences()) { + clone.references.add((Reference)reference.clone()); + } + clone.properties = new ArrayList(); + 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 getProperties() { + return properties; + } + + public List getReferences() { + return references; + } + + public List 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; + } + } + } +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java new file mode 100644 index 0000000000..a0ec95023a --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeImpl.java @@ -0,0 +1,153 @@ +/* + * 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 List components = new ArrayList(); + private List includes = new ArrayList(); + private QName name; + private List wires = new ArrayList(); + 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(); + 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(); + for (Wire wire : getWires()) { + clone.wires.add((Wire)wire.clone()); + } + return clone; + } + + public List getComponents() { + return components; + } + + public List getIncludes() { + return includes; + } + + public QName getName() { + return name; + } + + public List 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 getName().toString(); + } +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java new file mode 100644 index 0000000000..4348e08fcb --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeReferenceImpl.java @@ -0,0 +1,51 @@ +/* + * 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.CompositeReference; + +/** + * Represents a composite reference. + * + * @version $Rev$ $Date$ + */ +public class CompositeReferenceImpl extends ReferenceImpl implements CompositeReference, Cloneable { + private List promotedReferences = new ArrayList(); + + /** + * Constructs a new composite reference. + */ + protected CompositeReferenceImpl() { + } + + @Override + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + public List getPromotedReferences() { + return promotedReferences; + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeServiceImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeServiceImpl.java new file mode 100644 index 0000000000..6777a96982 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/CompositeServiceImpl.java @@ -0,0 +1,62 @@ +/* + * 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/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java new file mode 100644 index 0000000000..1373ce511b --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConfiguredOperationImpl.java @@ -0,0 +1,93 @@ +/* + * 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.ConfiguredOperation; +import org.apache.tuscany.sca.policy.Intent; +import org.apache.tuscany.sca.policy.IntentAttachPointType; +import org.apache.tuscany.sca.policy.PolicySet; + +/** + * Represents an Operation. + * + * @version $Rev$ $Date$ + */ +public class ConfiguredOperationImpl extends BaseImpl implements ConfiguredOperation { + private List policySets = new ArrayList(); + private List requiredIntents = new ArrayList(); + private List applicablePolicySets = new ArrayList(); + + private String name; + private String contractName; + + /** + * Constructs a new Operation. + */ + protected ConfiguredOperationImpl() { + } + + public List getPolicySets() { + return policySets; + } + + public void setPolicySets(List policySets) { + this.policySets = policySets; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public List getRequiredIntents() { + return requiredIntents; + } + + public void setRequiredIntents(List intents) { + this.requiredIntents = intents; + } + + public String getContractName() { + return contractName; + } + + public void setContractName(String contractName) { + this.contractName = contractName; + } + + public IntentAttachPointType getType() { + return null; + } + + public void setType(IntentAttachPointType type) { + } + + public List getApplicablePolicySets() { + return applicablePolicySets; + } + + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java new file mode 100644 index 0000000000..d5701df74e --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ConstrainingTypeImpl.java @@ -0,0 +1,105 @@ +/* + * 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.Intent; +import org.apache.tuscany.sca.policy.IntentAttachPointType; + +/** + * Represents a constraining type. + * + * @version $Rev$ $Date$ + */ +public class ConstrainingTypeImpl extends ExtensibleImpl implements ConstrainingType { + private QName name; + private List properties = new ArrayList(); + private List references = new ArrayList(); + private List services = new ArrayList(); + private List requiredIntents = new ArrayList(); + + /** + * Constructs a new ConstrainingType + */ + protected ConstrainingTypeImpl() { + } + + public QName getName() { + return name; + } + + public void setName(QName name) { + this.name = name; + } + + public List getProperties() { + return properties; + } + + public List getReferences() { + return references; + } + + public List getServices() { + return services; + } + + public List getRequiredIntents() { + return requiredIntents; + } + + @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 IntentAttachPointType getType() { + return null; + } + + public void setType(IntentAttachPointType type) { + } + + public void setRequiredIntents(List intents) { + this.requiredIntents = intents; + } +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ContractImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ContractImpl.java new file mode 100644 index 0000000000..491c835246 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ContractImpl.java @@ -0,0 +1,96 @@ +/* + * 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.assembly.ConfiguredOperation; +import org.apache.tuscany.sca.interfacedef.InterfaceContract; +import org.apache.tuscany.sca.policy.Intent; +import org.apache.tuscany.sca.policy.IntentAttachPointType; + +/** + * Implementation of a Contract. + * + * @version $Rev$ $Date$ + */ +public class ContractImpl extends ExtensibleImpl implements AbstractContract { + private InterfaceContract interfaceContract; + private String name; + private List requiredIntents = new ArrayList(); + private List configuredOperations = new ArrayList(); + + 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 getRequiredIntents() { + return requiredIntents; + } + + public boolean isCallback() { + return isCallback; + } + + public void setIsCallback(boolean isCallback) { + this.isCallback = isCallback; + } + + public IntentAttachPointType getType() { + return null; + } + + public void setType(IntentAttachPointType type) { + } + + public void setRequiredIntents(List intents) { + this.requiredIntents = intents; + } + + public List getConfiguredOperations() { + return configuredOperations; + } + + public void setConfiguredOperations(List configuredOperations) { + this.configuredOperations = configuredOperations; + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointFactoryImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointFactoryImpl.java new file mode 100644 index 0000000000..ece51cbe9b --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointFactoryImpl.java @@ -0,0 +1,41 @@ +/* + * 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.Endpoint; +import org.apache.tuscany.sca.assembly.EndpointFactory; + +/** + * A factory for the Endpoint model. + * + * @version $Rev$ $Date$ + */ +public abstract class EndpointFactoryImpl implements EndpointFactory { + + public EndpointFactoryImpl (){ + + } + + public Endpoint createEndpoint() { + return new EndpointImpl(); + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java new file mode 100644 index 0000000000..4396967137 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/EndpointImpl.java @@ -0,0 +1,143 @@ +/* + * 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.ComponentService; +import org.apache.tuscany.sca.assembly.Endpoint; + +/** + * The assembly model object for an endpoint. + * + * @version $Rev$ $Date$ + */ +public class EndpointImpl implements Endpoint { + + private String targetName; + + private Component sourceComponent; + private ComponentReference sourceComponentReference; + private Binding resolvedBinding; + private Binding resolvedCallbackBinding; + + private List candidateBindings = new ArrayList(); + + private Component targetComponent; + private ComponentService targetComponentService; + private Binding targetBinding; + private Binding targetCallbackBinding; + + protected EndpointImpl() { + } + + public boolean isUnresolved() { + return resolvedBinding == null; + } + + public void setUnresolved(boolean unresolved) { + // do nothing as the status is determined by having + // a resolved source binding + } + + @Override + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + public String getTargetName(){ + return targetName; + } + + public void setTargetName(String targetName){ + this.targetName = targetName; + } + + public Component getSourceComponent() { + return sourceComponent; + } + + public void setSourceComponent(Component sourceComponent) { + this.sourceComponent = sourceComponent; + } + + public ComponentReference getSourceComponentReference() { + return sourceComponentReference; + } + + public void setSourceComponentReference(ComponentReference sourceComponentReference) { + this.sourceComponentReference = sourceComponentReference; + } + + public Binding getSourceBinding() { + return resolvedBinding; + } + + public void setSourceBinding(Binding resolvedBinding) { + this.resolvedBinding = resolvedBinding; + } + + public Binding getSourceCallbackBinding(){ + return resolvedCallbackBinding; + } + + public void setSourceCallbackBinding(Binding resolvedCallbackBinding){ + this.resolvedCallbackBinding = resolvedCallbackBinding; + } + + public List getCandidateBindings() { + return candidateBindings; + } + + public Component getTargetComponent() { + return targetComponent; + } + + public void setTargetComponent(Component targetComponent) { + this.targetComponent = targetComponent; + } + + public ComponentService getTargetComponentService() { + return targetComponentService; + } + + public void setTargetComponentService(ComponentService targetComponentService) { + this.targetComponentService = targetComponentService; + } + + public Binding getTargetBinding() { + return targetBinding; + } + + public void setTargetBinding(Binding targetBinding) { + this.targetBinding = targetBinding; + } + + public Binding getTargetCallbackBinding(){ + return targetCallbackBinding; + } + + public void setTargetCallbackBinding(Binding targetCallbackBinding){ + this.targetCallbackBinding = targetCallbackBinding; + } +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensibleImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensibleImpl.java new file mode 100644 index 0000000000..9a7ca09e43 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ExtensibleImpl.java @@ -0,0 +1,44 @@ +/* + * 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; + +/** + * Convenience base class for extensible assembly model objects. + * + * @version $Rev$ $Date$ + */ +public abstract class ExtensibleImpl extends BaseImpl implements Extensible { + private List extensions = new ArrayList(); + + /** + * Constructs a new base model object. + */ + protected ExtensibleImpl() { + } + + public List getExtensions() { + return extensions; + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java new file mode 100644 index 0000000000..aa75922489 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ImplementationImpl.java @@ -0,0 +1,75 @@ +/* + * 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.ConfiguredOperation; +import org.apache.tuscany.sca.assembly.Implementation; +import org.apache.tuscany.sca.assembly.OperationsConfigurator; +import org.apache.tuscany.sca.policy.Intent; +import org.apache.tuscany.sca.policy.IntentAttachPointType; +import org.apache.tuscany.sca.policy.PolicySet; +import org.apache.tuscany.sca.policy.PolicySetAttachPoint; + +/** + * Base implementation class of Implementation model interface + * + * @version $Rev$ $Date$ + */ +public abstract class ImplementationImpl extends ComponentTypeImpl implements Implementation, PolicySetAttachPoint, + OperationsConfigurator { + + private List applicablePolicySets = new ArrayList(); + private List configuredOperations = new ArrayList(); + private IntentAttachPointType type; + private List policySets = new ArrayList(); + private List requiredIntents = new ArrayList(); + + protected ImplementationImpl() { + super(); + } + + public List getApplicablePolicySets() { + return applicablePolicySets; + } + + public List getConfiguredOperations() { + return configuredOperations; + } + + public List getPolicySets() { + return policySets; + } + + public List getRequiredIntents() { + return requiredIntents; + } + + public IntentAttachPointType getType() { + return type; + } + + public void setType(IntentAttachPointType type) { + this.type = type; + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java new file mode 100644 index 0000000000..0c1051199f --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/PropertyImpl.java @@ -0,0 +1,59 @@ +/* + * 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 policySets = new ArrayList(); + private List applicablePolicySets = new ArrayList(); + + /** + * Constructs a new property. + */ + protected PropertyImpl() { + } + + @Override + public Object clone() throws CloneNotSupportedException { + return super.clone(); + } + + public List getPolicySets() { + return policySets; + } + + public void setPolicySets(List policySets) { + this.policySets = policySets; + } + + public List getApplicablePolicySets() { + return applicablePolicySets; + } +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java new file mode 100644 index 0000000000..297a7c3a99 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ReferenceImpl.java @@ -0,0 +1,116 @@ +/* + * 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.Reference; +import org.apache.tuscany.sca.policy.PolicySet; + +/** + * Represents a reference. + * + * @version $Rev$ $Date$ + */ +public class ReferenceImpl extends AbstractReferenceImpl implements Reference, Cloneable { + private List bindings = new ArrayList(); + private boolean wiredByImpl; + private List policySets = new ArrayList(); + private List targets = new ArrayList(); + private Callback callback; + private List applicablePolicySets = new ArrayList(); + + public List getApplicablePolicySets() { + return applicablePolicySets; + } + + /** + * Constructs a new reference. + */ + protected ReferenceImpl() { + } + + @Override + public Object clone() throws CloneNotSupportedException { + ReferenceImpl clone = (ReferenceImpl)super.clone(); + clone.bindings = new ArrayList(); + clone.bindings.addAll(getBindings()); + clone.targets = new ArrayList(); + clone.targets.addAll(getTargets()); + return clone; + } + + public List getBindings() { + return bindings; + } + + public B getBinding(Class bindingClass) { + for (Binding binding : bindings) { + if (bindingClass.isInstance(binding)) { + return bindingClass.cast(binding); + } + } + return null; + } + + public B getCallbackBinding(Class 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 List getPolicySets() { + return policySets; + } + + public List getTargets() { + return targets; + } + + public Callback getCallback() { + return callback; + } + + public void setCallback(Callback callback) { + this.callback = callback; + } + + public void setPolicySets(List policySets) { + this.policySets = policySets; + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java new file mode 100644 index 0000000000..bee7cbec2d --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/ServiceImpl.java @@ -0,0 +1,99 @@ +/* + * 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.Service; +import org.apache.tuscany.sca.policy.PolicySet; + +/** + * Represents a reference. + * + * @version $Rev$ $Date$ + */ +public class ServiceImpl extends AbstractServiceImpl implements Service, Cloneable { + private List bindings = new ArrayList(); + private List policySets = new ArrayList(); + private Callback callback; + private List applicablePolicySets = new ArrayList(); + + public List getApplicablePolicySets() { + return applicablePolicySets; + } + + /** + * Constructs a new service. + */ + protected ServiceImpl() { + } + + @Override + public Object clone() throws CloneNotSupportedException { + ServiceImpl clone = (ServiceImpl)super.clone(); + clone.bindings = new ArrayList(); + clone.bindings.addAll(getBindings()); + return clone; + } + + public List getBindings() { + return bindings; + } + + public B getBinding(Class bindingClass) { + for (Binding binding : bindings) { + if (bindingClass.isInstance(binding)) { + return bindingClass.cast(binding); + } + } + return null; + } + + public B getCallbackBinding(Class bindingClass) { + if (callback != null) { + for (Binding binding : callback.getBindings()) { + if (bindingClass.isInstance(binding)) { + return bindingClass.cast(binding); + } + } + } + return null; + } + + public List getPolicySets() { + return policySets; + } + + public Callback getCallback() { + return callback; + } + + public void setCallback(Callback callback) { + this.callback = callback; + } + + public void setPolicySets(List policySets) { + this.policySets = policySets; + } + +} diff --git a/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java new file mode 100644 index 0000000000..1a7abc8564 --- /dev/null +++ b/sandbox/axis2-1.4/modules/assembly/src/main/java/org/apache/tuscany/sca/assembly/impl/WireImpl.java @@ -0,0 +1,96 @@ +/* + * 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.Intent; +import org.apache.tuscany.sca.policy.IntentAttachPointType; +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 List requiredIntents = new ArrayList(); + private List policySets = new ArrayList(); + private List applicablePolicySets = new ArrayList(); + + public List 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 getRequiredIntents() { + return requiredIntents; + } + + public List getPolicySets() { + return policySets; + } + + public IntentAttachPointType getType() { + return null; + } + + public void setType(IntentAttachPointType type) { + } + + public void setPolicySets(List policySets) { + this.policySets = policySets; + } + + public void setRequiredIntents(List intents) { + this.requiredIntents = intents; + } +} -- cgit v1.2.3