/** * Throws a {@link BeanDefinitionParsingException} detailing the error * that has occurred. * @param problem the source of the error */ @Override public void fatal(Problem problem) { throw new BeanDefinitionParsingException(problem); }
/** * Throws a {@link BeanDefinitionParsingException} detailing the error * that has occurred. * @param problem the source of the error */ @Override public void error(Problem problem) { throw new BeanDefinitionParsingException(problem); }
/** * Throws a {@link BeanDefinitionParsingException} detailing the error * that has occurred. * @param problem the source of the error */ @Override public void error(Problem problem) { throw new BeanDefinitionParsingException(problem); }
/** * Throws a {@link BeanDefinitionParsingException} detailing the error * that has occurred. * @param problem the source of the error */ @Override public void fatal(Problem problem) { throw new BeanDefinitionParsingException(problem); }
@Override public void fatal(Problem problem) { throw new BeanDefinitionParsingException(problem); }
/** * Define a Spring XML namespace definition to use. * @param definition the namespace definition */ public void xmlns(Map<String, String> definition) { if (!definition.isEmpty()) { for (Map.Entry<String,String> entry : definition.entrySet()) { String namespace = entry.getKey(); String uri = entry.getValue(); if (uri == null) { throw new IllegalArgumentException("Namespace definition must supply a non-null URI"); } NamespaceHandler namespaceHandler = this.groovyDslXmlBeanDefinitionReader.getNamespaceHandlerResolver().resolve(uri); if (namespaceHandler == null) { throw new BeanDefinitionParsingException(new Problem("No namespace handler found for URI: " + uri, new Location(new DescriptiveResource(("Groovy"))))); } this.namespaces.put(namespace, uri); } } }
/** * Define a Spring XML namespace definition to use. * @param definition the namespace definition */ public void xmlns(Map<String, String> definition) { if (!definition.isEmpty()) { for (Map.Entry<String,String> entry : definition.entrySet()) { String namespace = entry.getKey(); String uri = entry.getValue(); if (uri == null) { throw new IllegalArgumentException("Namespace definition must supply a non-null URI"); } NamespaceHandler namespaceHandler = this.groovyDslXmlBeanDefinitionReader.getNamespaceHandlerResolver().resolve(uri); if (namespaceHandler == null) { throw new BeanDefinitionParsingException(new Problem("No namespace handler found for URI: " + uri, new Location(new DescriptiveResource(("Groovy"))))); } this.namespaces.put(namespace, uri); } } }
throw new BeanDefinitionParsingException(new Problem("Error evaluating Groovy script: " + ex.getMessage(), new Location(encodedResource.getResource()), null, ex));
throw new BeanDefinitionParsingException(new Problem("Error evaluating Groovy script: " + ex.getMessage(), new Location(encodedResource.getResource()), null, ex));
/** * Throws a {@link BeanDefinitionParsingException} detailing the error * that has occurred. * @param problem the source of the error */ public void fatal(Problem problem) { throw new BeanDefinitionParsingException(problem); }
/** * Throws a {@link BeanDefinitionParsingException} detailing the error * that has occurred. * @param problem the source of the error */ public void error(Problem problem) { throw new BeanDefinitionParsingException(problem); }
/** * Throws a {@link BeanDefinitionParsingException} detailing the error * that has occurred. * @param problem the source of the error */ @Override public void fatal(Problem problem) { throw new BeanDefinitionParsingException(problem); }
/** * Throws a {@link BeanDefinitionParsingException} detailing the error * that has occurred. * @param problem the source of the error */ @Override public void error(Problem problem) { throw new BeanDefinitionParsingException(problem); }
protected BeanDefinitionBuilder getBeanDefinitionBuilder(ParserContext parserContext) { try { return BeanDefinitionBuilder.rootBeanDefinition(messageProcessorClass.getName()); } catch (NoClassDefFoundError noClassDefFoundError) { throw new BeanDefinitionParsingException(new Problem(("Cannot launch the mule app, the message processor class " + messageProcessorClass.getName() + " was not found in the classpath."), new Location(parserContext.getReaderContext().getResource()), null, noClassDefFoundError)); } }
/** * Cause an error with the provided message. * * @param message the message. * @param parserContext the parser context. Used to provide the failing location. * @throws BeanDefinitionParsingException if we encounter a filter */ protected void error(final String message, final ParserContext parserContext) { log.error(message); throw new BeanDefinitionParsingException(new Problem(message, new Location(parserContext.getReaderContext() .getResource()))); }
/** {@inheritDoc} */ @Override protected void doNativeParse(final Element element, final ParserContext parserContext, final BeanDefinitionBuilder builder) { super.doNativeParse(element, parserContext, builder); if (element.hasAttributeNS(null, "maintainExpiredMetadata")) { log.error("{}: maintainExpiredMetadata is not supported", parserContext.getReaderContext().getResource() .getDescription()); throw new BeanDefinitionParsingException(new Problem("maintainExpiredMetadata is not supported", new Location(parserContext.getReaderContext().getResource()))); } builder.addConstructorArgValue(StringSupport.trimOrNull(element.getAttributeNS(null, "metadataFile"))); } }
public BeanDefinition parse(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = getBeanDefinitionBuilder(parserContext); builder.addConstructorArgValue("sampleStream"); builder.setScope(BeanDefinition.SCOPE_PROTOTYPE); if (!hasAttribute(element, "config-ref")) { throw new BeanDefinitionParsingException(new Problem("It seems that the config-ref for @Processor [sample-stream] within the connector [twitter] is null or missing. Please, fill the value with the correct global element.", new Location(parserContext.getReaderContext().getResource()), null)); } parseConfigRef(element, builder); BeanDefinition definition = builder.getBeanDefinition(); setNoRecurseOnDefinition(definition); attachSourceDefinition(parserContext, definition); return definition; }
public BeanDefinition parse(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = getBeanDefinitionBuilder(parserContext); builder.addConstructorArgValue("getAvailableTrends"); builder.setScope(BeanDefinition.SCOPE_PROTOTYPE); if (!hasAttribute(element, "config-ref")) { throw new BeanDefinitionParsingException(new Problem("It seems that the config-ref for @Processor [get-available-trends] within the connector [twitter] is null or missing. Please, fill the value with the correct global element.", new Location(parserContext.getReaderContext().getResource()), null)); } parseConfigRef(element, builder); BeanDefinition definition = builder.getBeanDefinition(); setNoRecurseOnDefinition(definition); attachProcessorDefinition(parserContext, definition); return definition; }
public BeanDefinition parse(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = getBeanDefinitionBuilder(parserContext); builder.addConstructorArgValue("allKeys"); builder.setScope(BeanDefinition.SCOPE_PROTOTYPE); if (!hasAttribute(element, "config-ref")) { throw new BeanDefinitionParsingException(new Problem("It seems that the config-ref for @Processor [all-keys] within the connector [objectstore] is null or missing. Please, fill the value with the correct global element.", new Location(parserContext.getReaderContext().getResource()), null)); } parseConfigRef(element, builder); BeanDefinition definition = builder.getBeanDefinition(); setNoRecurseOnDefinition(definition); attachProcessorDefinition(parserContext, definition); return definition; }
public BeanDefinition parse(Element element, ParserContext parserContext) { BeanDefinitionBuilder builder = getBeanDefinitionBuilder(parserContext); builder.addConstructorArgValue("showUser"); builder.setScope(BeanDefinition.SCOPE_PROTOTYPE); if (!hasAttribute(element, "config-ref")) { throw new BeanDefinitionParsingException(new Problem("It seems that the config-ref for @Processor [show-user] within the connector [twitter] is null or missing. Please, fill the value with the correct global element.", new Location(parserContext.getReaderContext().getResource()), null)); } parseConfigRef(element, builder); BeanDefinition definition = builder.getBeanDefinition(); setNoRecurseOnDefinition(definition); attachProcessorDefinition(parserContext, definition); return definition; }