All Downloads are FREE. Search and download functionalities are using the official Maven repository.

crafter.core.processors-context.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2007-2022 Crafter Software Corporation. All Rights Reserved.
  ~
  ~ This program is free software: you can redistribute it and/or modify
  ~ it under the terms of the GNU General Public License version 3 as published by
  ~ the Free Software Foundation.
  ~
  ~ This program is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  ~ GNU General Public License for more details.
  ~
  ~ You should have received a copy of the GNU General Public License
  ~ along with this program.  If not, see <http://www.gnu.org/licenses/>.
  -->

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

    <!-- Processors -->

    <bean id="crafter.templateNodeScanner" class="org.craftercms.core.util.xml.impl.RegexNodeScanner">
        <property name="patterns" value="\#\{"/>
        <property name="matchEntireNodeText" value="false"/>
    </bean>

    <bean id="crafter.templateCompiler" class="org.craftercms.core.util.template.impl.spel.SpELStringTemplateCompiler"/>

    <bean id="crafter.templateModelFactory" class="org.craftercms.core.processors.impl.template.BeanFactoryModelFactory"/>

    <bean id="crafter.templateProcessor" class="org.craftercms.core.processors.impl.template.TemplateProcessor">
        <property name="templateNodeScanner" ref="crafter.templateNodeScanner"/>
        <property name="templateCompiler" ref="crafter.templateCompiler"/>
        <property name="modelFactory" ref="crafter.templateModelFactory"/>
    </bean>

    <bean id="crafter.defaultProcessorPipeline" class="org.craftercms.core.processors.impl.ItemProcessorPipeline">
        <constructor-arg index="0">
            <list>
                <!--ref bean="crafter.templateProcessor"/-->
            </list>
        </constructor-arg>
    </bean>

    <!-- Processor Resolvers -->

    <bean id="crafter.procesorResolver" class="org.craftercms.core.processors.impl.resolvers.MetaDataProcessorResolver">
        <property name="processorElementXPathQuery" value="${crafter.core.processors.processor.element.xpathQuery}"/>
        <property name="elementValueToProcessorMappings">
            <map>
                <entry key="${crafter.core.processors.processor.element.value.default}" value-ref="crafter.defaultProcessorPipeline"/>
            </map>
        </property>
    </bean>

    <bean id="crafter.procesorResolverChain" class="org.craftercms.core.processors.impl.resolvers.ItemProcessorResolverChain">
        <property name="defaultProcessor" ref="crafter.defaultProcessorPipeline"/>
        <property name="resolvers">
            <list>
                <ref bean="crafter.procesorResolver"/>
            </list>
        </property>
    </bean>

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy