Package org.apache.tuscany.sca.assembly.builder

Examples of org.apache.tuscany.sca.assembly.builder.CompositeBuilderException


                }
                if (source.charAt(0) == '$') {
                    String name = source.substring(1, index);
                    Property compositeProp = compositeProperties.get(name);
                    if (compositeProp == null) {
                        throw new CompositeBuilderException("The 'source' cannot be resolved to a composite property: " + source);
                    }

                    Document compositePropDefValues = (Document)compositeProp.getValue();

                    // FIXME: How to deal with namespaces?
                    Document node = evaluate(compositePropDefValues, aProperty.getSourceXPathExpression());

                    if (node != null) {
                        aProperty.setValue(node);
                    }
                } else {
                    throw new CompositeBuilderException("The 'source' has an invalid value: " + source);
                }
            } else if (file != null) {
                aProperty.setValue(loadFromFile(aProperty.getFile()));

            }
View Full Code Here


        throws CompositeBuilderException {
        try {
            Composite patched = applyXPath(composite, context.getDefinitions(), context.getMonitor());
            return patched;
        } catch (Exception e) {
            throw new CompositeBuilderException(e);
        }
    }
View Full Code Here

            // for all implementations, endpoint and endpoint references check that
            // the policy sets validly apply
            return checkAppliesTo(document, appliesToSubjects, composite, context);
          
        } catch (Exception e) {
            throw new CompositeBuilderException(e);
        }
    }
View Full Code Here

        throws CompositeBuilderException {
        try {
            Composite patched = applyXPath(composite, context.getDefinitions(), context.getMonitor());
            return patched;
        } catch (Exception e) {
            throw new CompositeBuilderException(e);
        }
    }
View Full Code Here

           
            return composite;
        } catch (Exception e) {
            // For debugging - in failure cases
            //System.out.println(dumpBuiltComposite(composite));
            throw new CompositeBuilderException("Exception while building model " + composite.getName(), e);
        }
    }
View Full Code Here

            // for all implementations, endpoint and endpoint references check that
            // the policy sets validly apply
            return checkAppliesTo(document, appliesToSubjects, composite, context);
          
        } catch (Exception e) {
            throw new CompositeBuilderException(e);
        }
    }
View Full Code Here

                else
                    epr.getPolicySets().remove(ps);            
            }
         
        } catch (Exception e) {
            throw new CompositeBuilderException(e);
        }
    }   
View Full Code Here

                }
                if (source.charAt(0) == '$') {
                    String name = source.substring(1, index);
                    Property compositeProp = compositeProperties.get(name);
                    if (compositeProp == null) {
                        throw new CompositeBuilderException("The 'source' cannot be resolved to a composite property: " + source);
                    }

                    Document compositePropDefValues = (Document)compositeProp.getValue();

                    // Adding /value because the document root is "value"
                    String path = source.substring(index);
                    String xpath = null;

                    if ("/".equals(path)) {
                        // trailing / is not legal for xpath
                        xpath = "/value";
                    } else {
                        xpath = "/value" + path;
                    }

                    // FIXME: How to deal with namespaces?
                    Document node = evaluate(null, compositePropDefValues, xpath);

                    if (node != null) {
                        aProperty.setValue(node);
                    }
                } else {
                    throw new CompositeBuilderException("The 'source' has an invalid value: " + source);
                }
            } else if (file != null) {
                aProperty.setValue(loadFromFile(aProperty.getFile()));

            }
View Full Code Here

                }
                if (source.charAt(0) == '$') {
                    String name = source.substring(1, index);
                    Property compositeProp = compositeProperties.get(name);
                    if (compositeProp == null) {
                        throw new CompositeBuilderException("The 'source' cannot be resolved to a composite property: " + source);
                    }

                    Document compositePropDefValues = (Document)compositeProp.getValue();

                    // FIXME: How to deal with namespaces?
                    Document node = evaluate(compositePropDefValues, aProperty.getSourceXPathExpression());

                    if (node != null) {
                        aProperty.setValue(node);
                    }
                } else {
                    throw new CompositeBuilderException("The 'source' has an invalid value: " + source);
                }
            } else if (file != null) {
                aProperty.setValue(loadFromFile(aProperty.getFile()));

            }
View Full Code Here

          componentReferenceBindingBuilder.build(composite, definitions, monitor);
         
          // Compute the policies across the model hierarchy
          compositePolicyBuilder.build(composite, definitions, monitor);
      } catch (Exception e) {
        throw new CompositeBuilderException("Exception while building composite " + composite.getName(), e);
      } // end try
     
    } // end method build
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.assembly.builder.CompositeBuilderException

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.