01: /*
02: * $Id: QuartzNamespaceHandler.java 10494 2008-01-23 21:09:56Z acooke $
03: * --------------------------------------------------------------------------------------
04: * Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
05: *
06: * The software in this package is published under the terms of the CPAL v1.0
07: * license, a copy of which has been included with this distribution in the
08: * LICENSE.txt file.
09: */
10: package org.mule.transport.quartz.config;
11:
12: import org.mule.config.spring.handlers.AbstractMuleNamespaceHandler;
13: import org.mule.config.spring.parsers.collection.ChildMapDefinitionParser;
14: import org.mule.config.spring.parsers.collection.ChildSingletonMapDefinitionParser;
15: import org.mule.config.spring.parsers.generic.MuleOrphanDefinitionParser;
16: import org.mule.endpoint.URIBuilder;
17: import org.mule.transport.quartz.QuartzConnector;
18:
19: /**
20: * Registers Bean Definition Parsers for the "quartz" namespace
21: */
22: public class QuartzNamespaceHandler extends
23: AbstractMuleNamespaceHandler {
24:
25: public void init() {
26: registerStandardTransportEndpoints(QuartzConnector.QUARTZ,
27: URIBuilder.PATH_ATTRIBUTES);
28: registerMuleBeanDefinitionParser(
29: "connector",
30: new MuleOrphanDefinitionParser(QuartzConnector.class,
31: true)).addAlias("scheduler", "quartzScheduler");
32: // note that we use the singular (factoryProperty) for the setter so that we auto-detect a collection
33: registerBeanDefinitionParser(
34: "factory-property",
35: new ChildSingletonMapDefinitionParser("factoryProperty"));
36: registerBeanDefinitionParser("factory-properties",
37: new ChildMapDefinitionParser("factoryProperty"));
38: }
39:
40: }
|