private boolean attachDeploymentComposite(Contribution contribution, Reader xml, String location, boolean attached, ProcessorContext context) throws XMLStreamException, ContributionReadException { // Read the composite model Composite composite = deployer.loadXMLDocument(xml, context.getMonitor()); // Replace the deployable composites with the deployment composites // Clear the deployable composites if it's the first deployment composite deployer.attachDeploymentComposite(contribution, composite, attached); if (!attached) { attached = true; } return attached; }
public <M> M read(URL contributionURL, URI artifactURI, URL artifactUrl, ProcessorContext context, Class<M> type) throws ContributionReadException { Object mo = read(contributionURL, artifactURI, artifactUrl, context); if (type.isInstance(mo)) { return type.cast(mo); } else { UnrecognizedElementException e = new UnrecognizedElementException(null); e.setResourceURI(artifactURI.toString()); error(context.getMonitor(), "UnrecognizedElementException", processors, artifactURI.toString()); throw e; } }
public <M> M read(URL contributionURL, URI artifactURI, URL artifactUrl, ProcessorContext context, Class<M> type) throws ContributionReadException { Object mo = read(contributionURL, artifactURI, artifactUrl, context); if (type.isInstance(mo)) { return type.cast(mo); } else { UnrecognizedElementException e = new UnrecognizedElementException(null); e.setResourceURI(artifactURI.toString()); error(context.getMonitor(), "UnrecognizedElementException", processors, artifactURI.toString()); throw e; } }
private boolean attachDeploymentComposite(Contribution contribution, Reader xml, String location, boolean attached, ProcessorContext context) throws XMLStreamException, ContributionReadException { // Read the composite model Composite composite = deployer.loadXMLDocument(xml, context.getMonitor()); // Replace the deployable composites with the deployment composites // Clear the deployable composites if it's the first deployment composite deployer.attachDeploymentComposite(contribution, composite, attached); if (!attached) { attached = true; } return attached; }
public void addModel(Object resolved, ProcessorContext context) { Composite composite = (Composite)resolved; Composite old = map.put(composite.getName(), composite); if (old != null) { Monitor.error(context.getMonitor(), this, Messages.RESOURCE_BUNDLE, "DuplicateCompositeName", composite.getName().toString(), contribution.getLocation()); } }
public void addModel(Object resolved, ProcessorContext context) { Composite composite = (Composite)resolved; Composite old = map.put(composite.getName(), composite); if (old != null) { Monitor.error(context.getMonitor(), this, Messages.RESOURCE_BUNDLE, "DuplicateCompositeName", composite.getName().toString(), contribution.getLocation()); } }
public void resolve(Composite composite, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { try { if (composite != null) extensionProcessor.resolve(composite, resolver, context); } catch (Throwable e ) { // Add information about which composite was being processed when the exception occurred String newMessage = context.getMonitor().getMessageString(CompositeDocumentProcessor.class.getName(), Messages.RESOURCE_BUNDLE, "ProcessingComposite") + " " + composite.getName() + ": " + e.getMessage(); throw new ContributionResolveException( newMessage, e ); } // end try }
public void resolve(Composite composite, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { try { if (composite != null) extensionProcessor.resolve(composite, resolver, context); } catch (Throwable e ) { // Add information about which composite was being processed when the exception occurred String newMessage = context.getMonitor().getMessageString(CompositeDocumentProcessor.class.getName(), Messages.RESOURCE_BUNDLE, "ProcessingComposite") + " " + composite.getName() + ": " + e.getMessage(); throw new ContributionResolveException( newMessage, e ); } // end try }
public XSDefinition read(URL contributionURL, URI artifactURI, URL artifactURL, ProcessorContext context) throws ContributionReadException { try { return indexRead(artifactURL); } catch (Exception e) { ContributionReadException ce = new ContributionReadException(e); error(context.getMonitor(), "ContributionReadException", artifactURL, ce); throw ce; } }
public XSDefinition read(URL contributionURL, URI artifactURI, URL artifactURL, ProcessorContext context) throws ContributionReadException { try { return indexRead(artifactURL); } catch (Exception e) { ContributionReadException ce = new ContributionReadException(e); error(context.getMonitor(), "ContributionReadException", artifactURL, ce); throw ce; } }
private void validateWSDLBinding(ProcessorContext context, WebServiceBinding model, Binding binding){ // BWS20005 & BWS20010 // Check that the WSDL binding is of a supported type if (!model.isHTTPTransport() && !model.isJMSTransport()){ error(context.getMonitor(), "InvalidWSDLBindingTransport", model, model.getBindingTransport()); } }
public WSDLDefinition read(URL contributionURL, URI artifactURI, URL artifactURL, ProcessorContext context) throws ContributionReadException { try { WSDLDefinition definition = indexRead(artifactURL); definition.setURI(artifactURI); return definition; } catch (Exception e) { ContributionReadException ce = new ContributionReadException(e); error(context.getMonitor(), "ContributionReadException", artifactURL, ce); //throw ce; return null; } }
private JMSBinding getConnectionBinding(JMSBinding model, String attrName, QName bindingName, ModelResolver resolver, ProcessorContext context) { JMSBinding binding = new JMSBinding(); binding.setTargetNamespace(bindingName.getNamespaceURI()); binding.setName(bindingName.getLocalPart()); binding.setUnresolved(true); binding = resolver.resolveModel(JMSBinding.class, binding, context); if (binding.isUnresolved()) error(context.getMonitor(), "BindingNotFound", model, attrName, bindingName); return binding; }
private void validateWSDLBinding(ProcessorContext context, WebServiceBinding model, Binding binding){ // BWS20005 & BWS20010 // Check that the WSDL binding is of a supported type if (!model.isHTTPTransport() && !model.isJMSTransport()){ error(context.getMonitor(), "InvalidWSDLBindingTransport", model, model.getBindingTransport()); } }
public WSDLDefinition read(URL contributionURL, URI artifactURI, URL artifactURL, ProcessorContext context) throws ContributionReadException { try { WSDLDefinition definition = indexRead(artifactURL); definition.setURI(artifactURI); return definition; } catch (Exception e) { ContributionReadException ce = new ContributionReadException(e); error(context.getMonitor(), "ContributionReadException", artifactURL, ce); //throw ce; return null; } }
private JMSBinding getConnectionBinding(JMSBinding model, String attrName, QName bindingName, ModelResolver resolver, ProcessorContext context) { JMSBinding binding = new JMSBinding(); binding.setTargetNamespace(bindingName.getNamespaceURI()); binding.setName(bindingName.getLocalPart()); binding.setUnresolved(true); binding = resolver.resolveModel(JMSBinding.class, binding, context); if (binding.isUnresolved()) error(context.getMonitor(), "BindingNotFound", model, attrName, bindingName); return binding; }
protected Composite configureNode(NodeConfiguration configuration, List<Contribution> contributions, ProcessorContext context) throws Throwable { if (contributions == null) { // Load contributions contributions = loadContributions(configuration, context); } Monitor monitor = context.getMonitor(); Map<QName, List<String>> bindingBaseURIs = new HashMap<QName, List<String>>(); for (BindingConfiguration config : configuration.getBindings()) { bindingBaseURIs.put(config.getBindingType(), config.getBaseURIs()); } List<Contribution> allContributions = getAllContributions(configuration.getDomainURI()); Composite domainComposite = deployer.build(contributions, allContributions, bindingBaseURIs, monitor); analyzeProblems(monitor); // postBuildEndpointReferenceMatching(domainComposite); return domainComposite; }
public void resolve(BPELImplementation implementation, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { if( implementation != null && implementation.isUnresolved()) { implementation.setModelResolver(resolver); BPELProcessDefinition processDefinition = resolveBPELProcessDefinition(implementation, resolver, context); //resolveBPELImports(processDefinition, resolver); if(processDefinition.isUnresolved()) { error(context.getMonitor(), "BPELProcessNotFound", implementation, processDefinition.getName()); } else { implementation.setProcessDefinition(processDefinition); // Get the component type from the process definition generateComponentType( implementation, context.getMonitor() ); //set current implementation resolved implementation.setUnresolved(false); } } } // end resolve
public void resolve(JaasAuthenticationPolicy policy, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { if (policy.getCallbackHandlerClassName() != null) { ClassReference classReference = new ClassReference(policy.getCallbackHandlerClassName()); classReference = resolver.resolveModel(ClassReference.class, classReference, context); Class<?> callbackClass = classReference.getJavaClass(); if (callbackClass == null) { error(context.getMonitor(), "ClassNotFoundException", resolver, policy.getCallbackHandlerClassName()); //throw new ContributionResolveException(new ClassNotFoundException(policy.getCallbackHandlerClassName())); } else { policy.setCallbackHandlerClass(callbackClass); policy.setUnresolved(false); } } }
public void resolve(JaasAuthenticationPolicy policy, ModelResolver resolver, ProcessorContext context) throws ContributionResolveException { if (policy.getCallbackHandlerClassName() != null) { ClassReference classReference = new ClassReference(policy.getCallbackHandlerClassName()); classReference = resolver.resolveModel(ClassReference.class, classReference, context); Class<?> callbackClass = classReference.getJavaClass(); if (callbackClass == null) { error(context.getMonitor(), "ClassNotFoundException", resolver, policy.getCallbackHandlerClassName()); //throw new ContributionResolveException(new ClassNotFoundException(policy.getCallbackHandlerClassName())); } else { policy.setCallbackHandlerClass(callbackClass); policy.setUnresolved(false); } } }