summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model')
-rw-r--r--sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/CompositeImpl.java54
-rw-r--r--sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/ContributionImpl.java87
-rw-r--r--sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainImpl.java94
-rw-r--r--sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainModelFactoryImpl.java80
-rw-r--r--sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/NodeImpl.java93
-rw-r--r--sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/ServiceImpl.java89
6 files changed, 497 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/CompositeImpl.java b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/CompositeImpl.java
new file mode 100644
index 0000000000..f2717aeeef
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/CompositeImpl.java
@@ -0,0 +1,54 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.domain.model.impl;
+
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.domain.model.Composite;
+
+
+/**
+ * A composite.
+ *
+ * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
+ */
+public class CompositeImpl implements Composite {
+
+ private QName compositeQName;
+
+ /**
+ * Retrieve the composite qname
+ *
+ * @return composite qname
+ */
+ public QName getCompositeQName(){
+ return compositeQName;
+ }
+
+ /**
+ * Set the composite qname
+ *
+ * @param compositeQName
+ */
+ public void setCompositeQName(QName compositeQName) {
+ this.compositeQName = compositeQName;
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/ContributionImpl.java b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/ContributionImpl.java
new file mode 100644
index 0000000000..ed2456067e
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/ContributionImpl.java
@@ -0,0 +1,87 @@
+/*
+ * 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.domain.model.impl;
+
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.domain.model.Composite;
+import org.apache.tuscany.sca.domain.model.Contribution;
+
+/**
+ * A contribution.
+ *
+ * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
+ */
+public class ContributionImpl implements Contribution {
+
+ private String contributionURI;
+ private String contributionURL;
+ private Map<QName, Composite> composites = new HashMap<QName, Composite>();
+ private Map<QName, Composite> deployableComposites = new HashMap<QName, Composite>();
+
+
+ /**
+ * Retrieve the contribution uri
+ *
+ * @return contribution uri
+ */
+ public String getContributionURI() {
+ return contributionURI;
+ }
+
+ /**
+ * Set the contribution uri
+ *
+ * @param contributionURI
+ */
+ public void setContributionURI(String contributionURI){
+ this.contributionURI = contributionURI;
+ }
+
+ /**
+ * Retrieve the contribution url
+ *
+ * @return contribution url
+ */
+ public String getContributionURL(){
+ return contributionURL;
+ }
+
+ /**
+ * Set the contribution url
+ *
+ * @param contributionURL
+ */
+ public void setContributionURL(String contributionURL){
+ this.contributionURL = contributionURL;
+ }
+
+ public Map<QName, Composite> getComposites(){
+ return composites;
+ }
+
+ public Map<QName, Composite> getDeployableComposites(){
+ return deployableComposites;
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainImpl.java b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainImpl.java
new file mode 100644
index 0000000000..0f6af482f7
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainImpl.java
@@ -0,0 +1,94 @@
+/*
+ * 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.domain.model.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.domain.model.Composite;
+import org.apache.tuscany.sca.domain.model.Contribution;
+import org.apache.tuscany.sca.domain.model.Node;
+import org.apache.tuscany.sca.domain.model.Domain;
+
+
+/**
+ * A domain. Manages nodes
+ *
+ * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
+ */
+public class DomainImpl implements Domain {
+
+ private String domainURI;
+ private String domainURL;
+ private Map<String, Node> nodes = new HashMap<String, Node>();
+ private Map<String, Contribution> contributions = new HashMap<String, Contribution>();
+ private Map<QName, Composite> composites = new HashMap<QName, Composite>();
+
+
+ /**
+ * Retrieve the domain uri
+ *
+ * @return domain uri
+ */
+ public String getDomainURI(){
+ return domainURI;
+ }
+
+ /**
+ * Set the domain uri
+ *
+ * @param domainURI
+ */
+ public void setDomainURI(String domainURI){
+ this.domainURI = domainURI;
+ }
+
+ /**
+ * Retrieve the domain url
+ *
+ * @return domain url
+ */
+ public String getDomainURL(){
+ return domainURL;
+ }
+
+ /**
+ * Set the domain url
+ *
+ * @param domainURL
+ */
+ public void setDomainURL(String domainURL){
+ this.domainURL = domainURL;
+ }
+
+ public Map<String, Node> getNodes(){
+ return nodes;
+ }
+
+ public Map<String, Contribution> getContributions(){
+ return contributions;
+ }
+
+ public Map<QName, Composite> getDeployedComposites(){
+ return composites;
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainModelFactoryImpl.java b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainModelFactoryImpl.java
new file mode 100644
index 0000000000..768f2658a4
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/DomainModelFactoryImpl.java
@@ -0,0 +1,80 @@
+/*
+ * 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.domain.model.impl;
+
+import org.apache.tuscany.sca.domain.model.Composite;
+import org.apache.tuscany.sca.domain.model.Contribution;
+import org.apache.tuscany.sca.domain.model.Domain;
+import org.apache.tuscany.sca.domain.model.DomainModelFactory;
+import org.apache.tuscany.sca.domain.model.Node;
+import org.apache.tuscany.sca.domain.model.Service;
+
+/**
+ * A node. Runs SCA composites
+ *
+ * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
+ */
+public class DomainModelFactoryImpl implements DomainModelFactory {
+
+ /**
+ * Create a new domain model
+ *
+ * @return new domain model
+ */
+ public Domain createDomain(){
+ return new DomainImpl();
+ }
+ /**
+ * Create a new node model
+ *
+ * @return new node model
+ */
+ public Node createNode(){
+ return new NodeImpl();
+ }
+
+ /**
+ * Create a new contribution model
+ *
+ * @return new contribution model
+ */
+ public Contribution createContribution(){
+ return new ContributionImpl();
+ }
+
+ /**
+ * Create a new composite model
+ *
+ * @return new composite model
+ */
+ public Composite createComposite(){
+ return new CompositeImpl();
+ }
+
+ /**
+ * Create a new service model
+ *
+ * @return new service model
+ */
+ public Service createService(){
+ return new ServiceImpl();
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/NodeImpl.java b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/NodeImpl.java
new file mode 100644
index 0000000000..dc6454bf7e
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/NodeImpl.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.domain.model.impl;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.domain.model.Composite;
+import org.apache.tuscany.sca.domain.model.Contribution;
+import org.apache.tuscany.sca.domain.model.Node;
+import org.apache.tuscany.sca.domain.model.Service;
+
+
+/**
+ * A node. Runs SCA composites
+ *
+ * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
+ */
+public class NodeImpl implements Node {
+
+ private String nodeURI;
+ private String nodeURL;
+ private Map<String, Contribution> contributions = new HashMap<String, Contribution>();
+ private Map<QName, Composite> composites = new HashMap<QName, Composite>();
+ private Map<String, Service> services = new HashMap<String, Service>();
+
+ /**
+ * Retrieve the node uri
+ *
+ * @return node uri
+ */
+ public String getNodeURI(){
+ return nodeURI;
+ }
+
+ /**
+ * Set the node uri
+ *
+ * @param nodeURI
+ */
+ public void setNodeURI(String nodeURI){
+ this.nodeURI = nodeURI;
+ }
+
+ /**
+ * Retrieve the node url
+ *
+ * @return node url
+ */
+ public String getNodeURL() {
+ return nodeURL;
+ }
+
+ /**
+ * Set the node url
+ *
+ * @param nodeURL
+ */
+ public void setNodeURL(String nodeURL){
+ this.nodeURL = nodeURL;
+ }
+
+ public Map<String, Contribution> getContributions(){
+ return contributions;
+ }
+
+ public Map<QName, Composite> getDeployedComposites(){
+ return composites;
+ }
+
+ public Map<String, Service> getServices(){
+ return services;
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/ServiceImpl.java b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/ServiceImpl.java
new file mode 100644
index 0000000000..bf2ec8a6a3
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-1.0.1/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/model/impl/ServiceImpl.java
@@ -0,0 +1,89 @@
+/*
+ * 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.domain.model.impl;
+
+import org.apache.tuscany.sca.domain.model.Service;
+
+/**
+ * A service.
+ *
+ * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
+ */
+public class ServiceImpl implements Service {
+
+ private String serviceURI;
+ private String serviceURL;
+ private String serviceBinding;
+
+ /**
+ * Retrieve the service uri
+ *
+ * @return service uri
+ */
+ public String getServiceURI(){
+ return serviceURI;
+ }
+
+ /**
+ * Set the service uri
+ *
+ * @param serviceURI
+ */
+ public void setServiceURI(String serviceURI){
+ this.serviceURI = serviceURI;
+ }
+
+ /**
+ * Retrieve the service url
+ *
+ * @return service url
+ */
+ public String getServiceURL(){
+ return serviceURL;
+ }
+
+ /**
+ * Set the service url
+ *
+ * @param serviceURL
+ */
+ public void setServiceURL(String serviceURL){
+ this.serviceURL = serviceURL;
+ }
+
+
+ /**
+ * Retrieve the service binding
+ *
+ * @return service binding
+ */
+ public String getServiceBinding(){
+ return serviceBinding;
+ }
+
+ /**
+ * Set the service binding
+ *
+ * @param serviceBinding
+ */
+ public void setServiceBinding(String serviceBinding){
+ this.serviceBinding = serviceBinding;
+ }
+}