summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl
diff options
context:
space:
mode:
Diffstat (limited to 'branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl')
-rw-r--r--branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/ContributionInfoImpl.java89
-rw-r--r--branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/DomainInfoImpl.java93
-rw-r--r--branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/NodeInfoImpl.java93
-rw-r--r--branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/SCADomainManagerServiceImpl.java228
4 files changed, 0 insertions, 503 deletions
diff --git a/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/ContributionInfoImpl.java b/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/ContributionInfoImpl.java
deleted file mode 100644
index 0ce961ae27..0000000000
--- a/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/ContributionInfoImpl.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.domain.management.impl;
-
-import java.io.Serializable;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.domain.management.ContributionInfo;
-/**
- * Information relating to an exposed service
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-public class ContributionInfoImpl implements ContributionInfo, Serializable {
-
- static final long serialVersionUID = 7669181086005969428L;
-
- private String contributionURI;
- private URL contributionURL;
- private List<QName> composites = new ArrayList<QName>();
- private List<QName> deployableComposites = new ArrayList<QName>();
-
-
- /**
- * 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 URL getContributionURL(){
- return contributionURL;
- }
-
- /**
- * Set the contribution url
- *
- * @param contributionURL
- */
- public void setContributionURL(URL contributionURL){
- this.contributionURL = contributionURL;
- }
-
- public List<QName> getComposites(){
- return composites;
- }
-
- public List<QName> getDeployableComposites(){
- return deployableComposites;
- }
-
-}
diff --git a/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/DomainInfoImpl.java b/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/DomainInfoImpl.java
deleted file mode 100644
index 4abbbd9466..0000000000
--- a/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/DomainInfoImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.domain.management.impl;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.domain.management.DomainInfo;
-
-/**
- * A data transport object for the management interface
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-public class DomainInfoImpl implements DomainInfo, Serializable {
-
- static final long serialVersionUID = 7669181086005969428L;
-
- private String domainURI;
- private String domainURL;
- private List<String> nodes = new ArrayList<String>();
- private List<String> contributions = new ArrayList<String>();
- private List<QName> composites = new ArrayList<QName>();
-
- /**
- * 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 List<String> getNodes(){
- return nodes;
- }
-
- public List<String> getContributions(){
- return contributions;
- }
-
- public List<QName> getDeployedComposites(){
- return composites;
- }
-
-}
diff --git a/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/NodeInfoImpl.java b/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/NodeInfoImpl.java
deleted file mode 100644
index 558439db99..0000000000
--- a/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/NodeInfoImpl.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.domain.management.impl;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.domain.management.NodeInfo;
-
-/**
- * Information relating to an exposed service
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-public class NodeInfoImpl implements NodeInfo, Serializable {
-
- static final long serialVersionUID = 7669181086005969428L;
-
- private String nodeURI;
- private String nodeURL;
- private List<String> contributions = new ArrayList<String>();
- private List<QName> composites = new ArrayList<QName>();
- private List<String> services = new ArrayList<String>();
-
- /**
- * 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 List<String> getContributions(){
- return contributions;
- }
-
- public List<QName> getDeployedComposites(){
- return composites;
- }
-
- public List<String> getServices(){
- return services;
- }
-
-}
diff --git a/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/SCADomainManagerServiceImpl.java b/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/SCADomainManagerServiceImpl.java
deleted file mode 100644
index b4e1ff5972..0000000000
--- a/branches/sca-java-1.2/modules/domain-impl/src/main/java/org/apache/tuscany/sca/domain/management/impl/SCADomainManagerServiceImpl.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.tuscany.sca.domain.management.impl;
-
-import java.io.Externalizable;
-import java.net.URL;
-import java.util.logging.Logger;
-
-import javax.xml.namespace.QName;
-
-import org.apache.tuscany.sca.domain.DomainException;
-import org.apache.tuscany.sca.domain.SCADomain;
-import org.apache.tuscany.sca.domain.SCADomainAPIService;
-import org.apache.tuscany.sca.domain.SCADomainEventService;
-import org.apache.tuscany.sca.domain.SCADomainSPI;
-import org.apache.tuscany.sca.domain.management.DomainInfo;
-import org.apache.tuscany.sca.domain.management.NodeInfo;
-import org.apache.tuscany.sca.domain.management.SCADomainManagerInitService;
-import org.apache.tuscany.sca.domain.management.SCADomainManagerService;
-import org.apache.tuscany.sca.domain.model.DomainModel;
-import org.apache.tuscany.sca.domain.model.NodeModel;
-import org.apache.tuscany.sca.node.management.SCANodeManagerService;
-import org.osoa.sca.CallableReference;
-import org.osoa.sca.annotations.Scope;
-import org.osoa.sca.annotations.Service;
-
-
-/**
- * Stores details of services exposed and retrieves details of remote services
- *
- * @version $Rev: 552343 $ $Date: 2007-09-07 12:41:52 +0100 (Fri, 07 Sep 2007) $
- */
-@Scope("COMPOSITE")
-@Service(interfaces = {SCADomainEventService.class, SCADomainManagerInitService.class, SCADomainManagerService.class, SCADomainAPIService.class})
-public class SCADomainManagerServiceImpl implements SCADomainEventService, SCADomainManagerInitService, SCADomainManagerService, SCADomainAPIService {
-
- private final static Logger logger = Logger.getLogger(SCADomainManagerServiceImpl.class.getName());
-
- private SCADomain domain;
- private SCADomainSPI domainSPI;
- private SCADomainEventService domainEventService;
-
- // DomainManagerInitService methods
-
- public void setDomain(SCADomain domain) {
- this.domain = domain;
- }
-
- public void setDomainSPI(SCADomainSPI domainSPI) {
- this.domainSPI = domainSPI;
- }
-
- public void setDomainEventService(SCADomainEventService domainEventService) {
- this.domainEventService = domainEventService;
- }
-
- // DomainEventService methods
-
- public void registerNode(String nodeURI, String nodeURL, Externalizable nodeManagerReference) throws DomainException{
- // get a reference to the node manager here so that the callable reference
- // the right context to construct itself. Don't actually have to do
- // anything with the result as the context is cached inside the callable
- // reference
- ((CallableReference<SCANodeManagerService>)nodeManagerReference).getService();
-
- // pass on to the domain
- domainEventService.registerNode(nodeURI, nodeURL, nodeManagerReference);
- }
-
- public void unregisterNode(String nodeURI) throws DomainException {
- domainEventService.unregisterNode(nodeURI);
- }
-
- public void registerNodeStart(String nodeURI) throws DomainException {
- domainEventService.registerNodeStart(nodeURI);
- }
-
- public void registerNodeStop(String nodeURI) throws DomainException {
- domainEventService.registerNodeStop(nodeURI);
- }
-
- public void registerContribution(String nodeURI, String contributionURI, String contributionURL) throws DomainException {
- domainEventService.registerContribution(nodeURI, contributionURI, contributionURL);
- }
-
- public void unregisterContribution(String nodeURI,String contributionURI)throws DomainException {
- domainEventService.unregisterContribution(nodeURI, contributionURI);
- }
-
- public void registerDomainLevelComposite(String nodeURI, String compositeQNameString) throws DomainException{
- domainEventService.registerDomainLevelComposite(nodeURI, compositeQNameString);
- }
-
- public void registerServiceEndpoint(String domainURI, String nodeUri, String serviceName, String bindingName, String URL) throws DomainException {
- domainEventService.registerServiceEndpoint(domainURI, nodeUri, serviceName, bindingName, URL);
- }
-
- public void unregisterServiceEndpoint(String domainURI, String nodeUri, String serviceName, String bindingName) throws DomainException{
- domainEventService.unregisterServiceEndpoint(domainURI, nodeUri, serviceName, bindingName);
- }
-
-
- public String findServiceEndpoint(String domainURI, String serviceName, String bindingName) throws DomainException{
- return domainEventService.findServiceEndpoint(domainURI, serviceName, bindingName);
- }
-
- public String findServiceNode(String domainURI, String serviceName, String bindingName) throws DomainException {
- return domainEventService.findServiceNode(domainURI, serviceName, bindingName);
- }
-
- // DomainAPIService methods
-
- public void start() throws DomainException {
- domain.start();
- }
-
- public void stop() throws DomainException {
- domain.stop();
- }
-
- public void destroyDomain() throws DomainException {
- domain.destroy();
- }
-
- public String getURI() {
- return domain.getURI();
- }
-
- public void addContribution(String contributionURI, String contributionURL) throws DomainException {
- try {
- domain.addContribution(contributionURI, new URL(contributionURL));
- } catch (Exception ex) {
- throw new DomainException (ex);
- }
- }
-
- public void updateContribution(String contributionURI, String contributionURL) throws DomainException {
- try {
- domain.updateContribution(contributionURI, new URL(contributionURL));
- } catch (Exception ex) {
- throw new DomainException (ex);
- }
- }
-
- public void removeContribution(String contributionURI) throws DomainException {
- domain.removeContribution(contributionURI);
- }
-
- public void addDeploymentComposite(String contributionURI, String compositeXML) throws DomainException {
- domain.addDeploymentComposite(contributionURI, compositeXML);
- }
-
- public void updateDeploymentComposite(String contributionURI, String compositeXML) throws DomainException {
- domain.updateDeploymentComposite(contributionURI, compositeXML);
- }
-
- public void addToDomainLevelComposite(String compositeQName) throws DomainException {
- domain.addToDomainLevelComposite(QName.valueOf(compositeQName));
- }
-
- public void removeFromDomainLevelComposite(String compositeQName) throws DomainException {
- domain.removeFromDomainLevelComposite(QName.valueOf(compositeQName));
- }
-
- public String getDomainLevelComposite() throws DomainException {
- return domain.getDomainLevelComposite();
- }
-
- public String getQNameDefinition(String artifact) throws DomainException {
- return domain.getQNameDefinition(QName.valueOf(artifact));
- }
-
- public void startComposite(String compositeQName) throws DomainException {
- domain.startComposite(QName.valueOf(compositeQName));
- }
-
- public void stopComposite(String compositeQName) throws DomainException {
- domain.stopComposite(QName.valueOf(compositeQName));
- }
-
- // DomainManagementService methods
-
- public DomainInfo getDomainDescription(){
-
- DomainInfo domainInfo = new DomainInfoImpl();
- DomainModel domain = domainSPI.getDomainModel();
-
- domainInfo.setDomainURI(domain.getDomainURI());
- domainInfo.setDomainURL(domain.getDomainURL());
- domainInfo.getNodes().addAll(domain.getNodes().keySet());
- domainInfo.getContributions().addAll(domain.getContributions().keySet());
- domainInfo.getDeployedComposites().addAll(domain.getDeployedComposites().keySet());
-
- return domainInfo;
- }
-
- public NodeInfo getNodeDescription(String nodeURI){
-
- NodeInfo nodeInfo = new NodeInfoImpl();
- DomainModel domain = domainSPI.getDomainModel();
- NodeModel node = domain.getNodes().get(nodeURI);
-
- nodeInfo.setNodeURI(nodeURI);
- nodeInfo.setNodeURL(node.getNodeURL());
- nodeInfo.getContributions().addAll(node.getContributions().keySet());
- nodeInfo.getDeployedComposites().addAll(node.getDeployedComposites().keySet());
- nodeInfo.getServices().addAll(node.getServices().keySet());
-
- return nodeInfo;
- }
-}