Package org.mule.config.spring.parsers.generic

Examples of org.mule.config.spring.parsers.generic.OrphanDefinitionParser


public abstract class AbstractPojoNamespaceHandler extends AbstractMuleNamespaceHandler
{
    public void registerPojo(String configElementName, Class<?> cls)
    {
        // register a generic configuration element
        OrphanDefinitionParser parser = new OrphanDefinitionParser(cls, true);
        parser.addIgnored("name");
        registerMuleBeanDefinitionParser(configElementName, parser);

        // register invoker parser for each non setter
        try
        {
View Full Code Here


        // registerBeanDefinitionParser("custom-source", new ChildDefinitionParser("messageSource", null, MessageSource.class));
        registerBeanDefinitionParser("composite-source", new ChildDefinitionParser("messageSource", CompositeMessageSourceFactoryBean.class));

        // Models
        registerBeanDefinitionParser("model", new ModelDefinitionParser());
        registerBeanDefinitionParser("seda-model", new InheritDefinitionParser(new OrphanDefinitionParser(SedaModel.class, true), new NamedDefinitionParser()));

        registerBeanDefinitionParser("entry-point-resolver-set", new ChildDefinitionParser("entryPointResolverSet", DefaultEntryPointResolverSet.class));
        registerBeanDefinitionParser("legacy-entry-point-resolver-set", new ChildDefinitionParser("entryPointResolverSet", LegacyEntryPointResolverSet.class));
        registerBeanDefinitionParser("custom-entry-point-resolver-set", new ChildDefinitionParser("entryPointResolverSet"));

        registerBeanDefinitionParser("custom-entry-point-resolver", new ChildDefinitionParser("entryPointResolver"));
        registerBeanDefinitionParser("callable-entry-point-resolver", new ChildDefinitionParser("entryPointResolver", CallableEntryPointResolver.class));
        registerMuleBeanDefinitionParser("property-entry-point-resolver", new ChildDefinitionParser("entryPointResolver", MethodHeaderPropertyEntryPointResolver.class)).addAlias("property", "methodProperty");
        registerBeanDefinitionParser("method-entry-point-resolver", new ChildDefinitionParser("entryPointResolver", ExplicitMethodEntryPointResolver.class));
        registerBeanDefinitionParser("reflection-entry-point-resolver", new ChildDefinitionParser("entryPointResolver", ReflectionEntryPointResolver.class));
        registerBeanDefinitionParser("no-arguments-entry-point-resolver", new ChildDefinitionParser("entryPointResolver", NoArgumentsEntryPointResolver.class));
        registerBeanDefinitionParser("array-entry-point-resolver", new ChildDefinitionParser("entryPointResolver", ArrayEntryPointResolver.class));
        registerMuleBeanDefinitionParser("include-entry-point", new ParentDefinitionParser());
        registerMuleBeanDefinitionParser("exclude-entry-point", new ParentDefinitionParser()).addAlias("method", "ignoredMethod");
        registerMuleBeanDefinitionParser("exclude-object-methods", new IgnoreObjectMethodsDefinitionParser());

        // Services
        registerBeanDefinitionParser("seda-service", new ServiceDefinitionParser(SedaService.class));
        registerBeanDefinitionParser("service", new ServiceDefinitionParser(SedaService.class));
        registerBeanDefinitionParser("custom-service", new ServiceDefinitionParser());

        // Flow Constructs
        registerBeanDefinitionParser("flow", new FlowDefinitionParser());
        registerBeanDefinitionParser("simple-service", new SimpleServiceDefinitionParser());
        registerBeanDefinitionParser("bridge", new BridgeDefinitionParser());
        registerBeanDefinitionParser("validator", new ValidatorDefinitionParser());

        registerBeanDefinitionParser("flow-ref", new FlowRefDefinitionParser());
       
        // Processing Strategies
        registerMuleBeanDefinitionParser("asynchronous-processing-strategy",
            new OrphanDefinitionParser(AsynchronousProcessingStrategy.class, false)).addMapping(
            "poolExhaustedAction", ThreadingProfile.POOL_EXHAUSTED_ACTIONS).addIgnored("name");
        registerMuleBeanDefinitionParser("queued-asynchronous-processing-strategy",
            new OrphanDefinitionParser(QueuedAsynchronousProcessingStrategy.class, false)).addMapping(
            "poolExhaustedAction", ThreadingProfile.POOL_EXHAUSTED_ACTIONS).addIgnored("name");
        registerMuleBeanDefinitionParser("thread-per-processor-processing-strategy",
            new OrphanDefinitionParser(ThreadPerProcessorProcessingStrategy.class, false)).addMapping(
            "poolExhaustedAction", ThreadingProfile.POOL_EXHAUSTED_ACTIONS).addIgnored("name");
        registerMuleBeanDefinitionParser("queued-thread-per-processor-processing-strategy",
            new OrphanDefinitionParser(QueuedThreadPerProcessorProcessingStrategy.class, false)).addMapping(
            "poolExhaustedAction", ThreadingProfile.POOL_EXHAUSTED_ACTIONS).addIgnored("name");
        registerMuleBeanDefinitionParser("custom-processing-strategy", new OrphanDefinitionParser(false)).addIgnored(
            "name");

        // Components
        registerBeanDefinitionParser("component", new ComponentDelegatingDefinitionParser(DefaultJavaComponent.class));
        registerBeanDefinitionParser("pooled-component", new ComponentDelegatingDefinitionParser(PooledJavaComponent.class));
View Full Code Here

public class ParsersTestNamespaceHandler extends AbstractMuleNamespaceHandler
{

    public void init()
    {
        registerMuleBeanDefinitionParser("orphan", new OrphanDefinitionParser(OrphanBean.class, true)).addAlias("bar", "foo").addIgnored("ignored").addCollection("offspring");
        registerMuleBeanDefinitionParser("child", new ChildDefinitionParser("child", ChildBean.class)).addAlias("bar", "foo").addIgnored("ignored").addCollection("offspring");
        registerMuleBeanDefinitionParser("mapped-child", new MapDefinitionParserMutator("map", new ChildDefinitionParser("child", ChildBean.class))).addAlias("bar", "foo").addIgnored("ignored").addCollection("offspring");
        registerMuleBeanDefinitionParser("kid", new ChildDefinitionParser("kid", ChildBean.class)).addAlias("bar", "foo").addIgnored("ignored");
        registerMuleBeanDefinitionParser("parent", new ParentDefinitionParser()).addAlias("bar", "foo").addIgnored("ignored").addCollection("offspring");
        registerMuleBeanDefinitionParser("orphan1", new NamedDefinitionParser("orphan1")).addAlias("bar", "foo").addIgnored("ignored").addCollection("offspring");
        registerMuleBeanDefinitionParser("orphan2", new NamedDefinitionParser("orphan2")).addAlias("bar", "foo").addIgnored("ignored");
        registerMuleBeanDefinitionParser("map-entry", new ChildMapEntryDefinitionParser("map", "key", "value")).addCollection("map");
        registerMuleBeanDefinitionParser("map-entry-combiner", new ChildSingletonMapDefinitionParser("map")).addCollection("map");
        registerMuleBeanDefinitionParser("properties", new ChildMapDefinitionParser("map")).addCollection("map");
        registerBeanDefinitionParser("list-entry", new ChildListEntryDefinitionParser("list"));
        registerMuleBeanDefinitionParser("named", new NamedDefinitionParser()).addAlias("bar", "foo").addIgnored("ignored");
        registerMuleBeanDefinitionParser("inherit",
                new InheritDefinitionParser(
                        new OrphanDefinitionParser(OrphanBean.class, true),
                        new NamedDefinitionParser())).addAlias("bar", "foo").addIgnored("ignored").addCollection("offspring");

        registerMuleBeanDefinitionParser("address", new ChildAddressDefinitionParser("test")).addAlias("address", "host");
        registerBeanDefinitionParser("orphan-endpoint", new OrphanEndpointDefinitionParser(EndpointURIEndpointBuilder.class));
        registerBeanDefinitionParser("child-endpoint", new ChildEndpointDefinitionParser(InboundEndpointFactoryBean.class));
        registerBeanDefinitionParser("unaddressed-orphan-endpoint", new OrphanEndpointDefinitionParser(EndpointURIEndpointBuilder.class));
        registerBeanDefinitionParser("addressed-orphan-endpoint", new AddressedEndpointDefinitionParser("test", AddressedEndpointDefinitionParser.PROTOCOL, new OrphanEndpointDefinitionParser(EndpointURIEndpointBuilder.class), new String[]{"path"}, new String[]{}));
        registerBeanDefinitionParser("addressed-child-endpoint", new TransportEndpointDefinitionParser("test", InboundEndpointFactoryBean.class, new String[]{}));

        registerBeanDefinitionParser("list-element-test-1", new ChildListEntryDefinitionParser("kids", "listAttribute"));
        registerBeanDefinitionParser("list-element-test-2",
                new SingleParentFamilyDefinitionParser(
                        new OrphanDefinitionParser(OrphanBean.class, true))
                        .addChildDelegate("kid1", new ChildListEntryDefinitionParser("kids", "kid1"))
                        .addChildDelegate("kid2", new ChildListEntryDefinitionParser("kids", "kid2")));
        // simpler list element parser doesn't support dynamic attribute
//        registerBeanDefinitionParser("list-element-test-3", new AllAttributeChildDefinitionParser(new ChildListEntryDefinitionParser("kids")));

        // TODO ComplexComponentDefinitionParser is not longer used, is there any way to rewrite/reuse the "factory" element for testing?
//         registerBeanDefinitionParser("factory",
//                new ComplexComponentDefinitionParser(
//                        new SimpleComponentDefinitionParser(ChildBean.class),
//                        (ChildDefinitionParser) new ChildDefinitionParser("child", ChildBean.class).addAlias("bar", "foo").addIgnored("ignored").addCollection("offspring")));

        registerMuleBeanDefinitionParser("complex-endpoint",
                new TransportGlobalEndpointDefinitionParser(
                        "test", TransportGlobalEndpointDefinitionParser.PROTOCOL,
                        new String[]{"path"}, new String[]{"string", "bar"})).addAlias("bar", "foo");

        registerBeanDefinitionParser("no-name", new OrphanDefinitionParser(OrphanBean.class, true));
        registerBeanDefinitionParser("no-name-2", new IndependentDefinitionParser());
        registerBeanDefinitionParser("container", new ThirdPartyContainerDefinitionParser());
    }
View Full Code Here

    public static final String SECURITY_FILTER = "filter";
    public static final String ATTRIBUTE_NAME = AbstractMuleBeanDefinitionParser.ATTRIBUTE_NAME;

    public SecurityFilterDefinitionParser(Class filter)
    {
        super(MuleOrphanDefinitionParser.ROOT_ELEMENT, new OrphanDefinitionParser(filter, false));
        otherwise(
            new WrappingChildDefinitionParser(
                "messageProcessor", filter, SecurityFilter.class, false, SecurityFilterMessageProcessor.class,
                SECURITY_FILTER, SECURITY_FILTER, this));
        addIgnored(ATTRIBUTE_NAME);
View Full Code Here

        addIgnored(ATTRIBUTE_NAME);
    }

    public SecurityFilterDefinitionParser()
    {
        super(MuleOrphanDefinitionParser.ROOT_ELEMENT, new OrphanDefinitionParser(false));
        otherwise(
            new WrappingChildDefinitionParser(
                "messageProcessor", null, SecurityFilter.class, true, SecurityFilterMessageProcessor.class,
                SECURITY_FILTER, SECURITY_FILTER, this));
        addIgnored(ATTRIBUTE_NAME);
View Full Code Here

        super(makeOrphan(), new NamedDefinitionParser());
    }

    private static OrphanDefinitionParser makeOrphan()
    {
        OrphanDefinitionParser orphan = new OrphanDefinitionParser(SedaModel.class, true);
        orphan.registerPreProcessor(new ProvideDefaultName("model"));
        return orphan;
    }
View Full Code Here

public class DummyNamespaceHandler extends MuleNamespaceHandler
{

    public void init()
    {
        registerBeanDefinitionParser("root", new OrphanDefinitionParser(Nestable.class, false));
        registerBeanDefinitionParser("simple", new OrphanDefinitionParser(Nestable.class, false));
        registerBeanDefinitionParser("subclass", new OrphanDefinitionParser(Nestable.class, false));
        registerBeanDefinitionParser("random", new OrphanDefinitionParser(Nestable.class, false));
        registerBeanDefinitionParser("another", new OrphanDefinitionParser(Nestable.class, false));
    }
View Full Code Here

        registerBeanDefinitionParser("object-to-json-transformer", new MessageProcessorDefinitionParser(ObjectToJson.class));
        registerBeanDefinitionParser("json-to-object-transformer", new MessageProcessorDefinitionParser(JsonToObject.class));
        registerBeanDefinitionParser("serialization-mixin", new ChildMapEntryDefinitionParser("serializationMixins", "targetClass", "mixinClass"));
        registerBeanDefinitionParser("deserialization-mixin", new ChildMapEntryDefinitionParser("deserializationMixins", "targetClass", "mixinClass"));
        registerBeanDefinitionParser("mixin", new ChildMapEntryDefinitionParser("mixins", "targetClass", "mixinClass"));
        registerBeanDefinitionParser("mapper", new OrphanDefinitionParser(MapperFactoryBean.class, true));
    }
View Full Code Here

        registerBeanDefinitionParser("xpath-extractor-transformer", new MessageProcessorDefinitionParser(XPathExtractor.class));

        //JAXB
        registerBeanDefinitionParser("jaxb-object-to-xml-transformer", new MessageProcessorDefinitionParser(JAXBMarshallerTransformer.class));
        registerBeanDefinitionParser("jaxb-xml-to-object-transformer", new MessageProcessorDefinitionParser(JAXBUnmarshallerTransformer.class));
        registerBeanDefinitionParser("jaxb-context", new OrphanDefinitionParser(JaxbContextFactoryBean.class, true));

        //XStream
        registerBeanDefinitionParser("object-to-xml-transformer", new MessageProcessorDefinitionParser(ObjectToXml.class));
        registerBeanDefinitionParser("xml-to-object-transformer", new MessageProcessorDefinitionParser(XmlToObject.class));
        registerBeanDefinitionParser("alias", new ChildMapEntryDefinitionParser("aliases", "name", "class"));
View Full Code Here

*/
public class SftpNamespaceHandler extends AbstractMuleNamespaceHandler
{
    public void init()
    {
        registerBeanDefinitionParser("connector", new OrphanDefinitionParser(SftpConnector.class, true));
        registerBeanDefinitionParser("expression-filename-parser", new ChildDefinitionParser(
            "filenameParser", ExpressionFilenameParser.class));
        registerStandardTransportEndpoints("sftp", URIBuilder.SOCKET_ATTRIBUTES);
        registerConnectorDefinitionParser(SftpConnector.class);
    }
View Full Code Here

TOP

Related Classes of org.mule.config.spring.parsers.generic.OrphanDefinitionParser

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.