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

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

<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Copyright (C) 2007-2023 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">

    <!-- Content Store Adapter -->

    <bean id="crafter.contentStoreAdapter.filesystem" class="org.craftercms.core.store.impl.filesystem.FileSystemContentStoreAdapter">
        <property name="cacheTemplate" ref="crafter.cacheTemplate"/>
        <property name="metadataFileExtension" value="${crafter.core.store.metadataFile.extension}"/>
        <property name="descriptorFileExtension" value="${crafter.core.store.descriptorFile.extension}"/>
        <property name="pathValidator">
            <bean class="org.craftercms.commons.validation.validators.impl.SecurePathValidator">
            </bean>
        </property>
    </bean>

    <!-- Content Store Adapter Registry -->

    <bean id="crafter.contentStoreAdapterRegistry" class="org.craftercms.core.store.impl.ContentStoreAdapterRegistryImpl" >
        <property name="adapters">
            <map>
                <entry key="filesystem" value-ref="crafter.contentStoreAdapter.filesystem"/>
            </map>
        </property>
    </bean>

    <!-- Content Store Service -->

    <bean id="crafter.contentStoreService" class="org.craftercms.core.service.impl.ContentStoreServiceImpl">
        <constructor-arg name="cacheTemplate" ref="crafter.cacheTemplate"/>
        <constructor-arg name="merger" ref="crafter.merger"/>
        <constructor-arg name="processorResolver" ref="crafter.procesorResolverChain"/>
        <constructor-arg name="mergeStrategyResolver" ref="crafter.mergeStrategyResolverChain"/>
        <constructor-arg name="storeAdapterRegistry" ref="crafter.contentStoreAdapterRegistry"/>

        <constructor-arg name="blobUrlResolver" ref="crafter.blobUrlResolver"/>
        <constructor-arg name="blobStoreResolver" ref="crafter.blobStoreResolver"/>

        <constructor-arg name="sourceAttributeName" value="${crafter.core.store.source.attribute.name}"/>
        <constructor-arg name="sourceTypeAttributeName" value="${crafter.core.store.source.type.attribute.name}"/>
        <constructor-arg name="sourceTypeXPath" value="${crafter.core.store.source.type.xpath}"/>

        <property name="sourceAttributeEnabled" value="${crafter.core.store.source.attribute.enabled}"/>
        <property name="flatteningProcessor" ref="crafter.includeDescriptorsProcessor"/>
    </bean>

    <bean id="crafter.includeDescriptorsProcessor"
          class="org.craftercms.core.processors.impl.PageAwareIncludeDescriptorsProcessor">
        <property name="includeElementXPathQuery" value="${crafter.core.flattening.include.xpath.query}"/>
        <property name="removeIncludeElement" value="${crafter.core.flattening.include.remove.tags}"/>
        <property name="disabledIncludeNodeXPathQuery" value="${crafter.core.flattening.include.disable.xpath.query}"/>
        <property name="localeCodeXPathQuery" value="${crafter.core.flattening.locale.xpath.query}"/>
        <property name="pagesPathPattern" value="${crafter.core.flattening.pages.pattern}"/>
        <property name="includedItemsProcessor" ref="crafter.includeDescriptorsProcessor"/>
        <property name="contentStoreService" ref="crafter.contentStoreService"/>
    </bean>

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy