Package org.apache.tuscany.sca.domain

Examples of org.apache.tuscany.sca.domain.DomainException


   
    public void addToDomainLevelComposite(QName compositeQName) throws DomainException {
        if ((domainModel.getDomainURL() != null) && (domainAPIService != null)){
            domainAPIService.addToDomainLevelComposite(compositeQName.toString());
        } else {
            throw new DomainException("Not connected to domain");
        }
    }
View Full Code Here


     
    public void removeFromDomainLevelComposite(QName compositeQName) throws DomainException {
        if ((domainModel.getDomainURL() != null) && (domainAPIService != null)){
            domainAPIService.removeFromDomainLevelComposite(compositeQName.toString());
        } else {
            throw new DomainException("Not connected to domain");
        }       
    }   
View Full Code Here

   
    public String getDomainLevelComposite() throws DomainException {
        if ((domainModel.getDomainURL() != null) && (domainAPIService != null)){
            return domainAPIService.getDomainLevelComposite();
        } else {
            throw new DomainException("Not connected to domain");
        }
    }
View Full Code Here

   
    public String getQNameDefinition(QName artifact) throws DomainException {
        if ((domainModel.getDomainURL() != null) && (domainAPIService != null)){
            return domainAPIService.getQNameDefinition(artifact.toString());
        } else {
            throw new DomainException("Not connected to domain");
        }
    }
View Full Code Here

                                              " not found on the classpath");
           
           
           
        } catch(Exception ex) {
            throw new DomainException(ex);
        }
    }         
View Full Code Here

                            // notify node
                            ((NodeModelImpl)node).getSCANodeManagerService().updateComposite(composite.getName().toString(),
                                                                                             Base64Binary.encode(compositeXML.getBytes()));
                        }
                    } catch (Exception ex) {
                        throw new DomainException(ex);
                    }                       
                }
            }
        }
    }
View Full Code Here

                CompositeModel compositeModel = contributionModel.getComposites().get(composite.getName());
               
                if (compositeModel != null){
                    contributionModel.getDeployableComposites().put(compositeModel.getCompositeQName(), compositeModel);
                } else {
                    throw new DomainException("Deployable composite name " +
                                              composite.getName() +
                                              " doesn't match a composite in the contribution " +
                                              contributionURI );
                }
            }
        } catch(DomainException ex) {  
            throw ex;
        } catch(Exception ex) {
            throw new DomainException(ex);
        }
       
        return contributionModel;
    }   
View Full Code Here

                // get the composite from the node
                NodeModel node = domainModel.getNodes().get(nodeURI);
               
                if (node != null) {
                    if (node.getLifecycleState() != LifecyleState.AVAILABLE){
                        throw new DomainException("Node " + nodeURI + " is already marked as active");
                    } else {
                        for (ContributionModel contributionModel : node.getContributions().values()){
                            CompositeModel compositeModel = contributionModel.getComposites().get(compositeQName);
                           
                            if (compositeModel != null){
                                contributionModel.getDeployedComposites().put(compositeQName, compositeModel);
                                node.getDeployedComposites().put(compositeQName, compositeModel);
                                domainModel.getDeployedComposites().put(compositeQName, compositeModel);
                                domainManagementRuntime.getCompositeBuilder().build(compositeModel.getComposite());
                                domainModel.getDomainLevelComposite().getIncludes().add(compositeModel.getComposite());
                               

                            }
                        }
                    }
                }  
            } else {
                throw new DomainException("Composite " + compositeQNameString +
                                          " is already marked as deployed on node " + nodeURI);
            }
        } catch (Exception ex) {
            logger.log(Level.SEVERE, "Exception when registering domain level composite " +
                                     nodeURI +  " " +
View Full Code Here

            // Stop the SCA runtime that the domain is using
            domainManagementRuntime.stop();

                       
        } catch(ActivationException ex) {
            throw new DomainException(ex);
        }        
    }
View Full Code Here

            // automatically start all the composites
            for (QName compositeName : deployedCompositeNames) {
                startComposite(compositeName);
            }
        } else {
            throw new DomainException("Contribution " + contributionURI + " not found in domain contributions");
        }       
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.domain.DomainException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.