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

commerce.broadleaf-contentmanagement-module.1.6.1-GA.source-code.bl-cms-contentClient-applicationContext.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx"
    xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/beans
           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
           http://www.springframework.org/schema/context
           http://www.springframework.org/schema/context/spring-context-3.0.xsd
           http://www.springframework.org/schema/tx
           http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
           http://www.springframework.org/schema/aop
           http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
           http://www.springframework.org/schema/util
    	   http://www.springframework.org/schema/util/spring-util-3.0.xsd">

	<context:component-scan base-package="org.broadleafcommerce.cms"/>
    <context:component-scan base-package="org.broadleafcommerce.common.locale"/>

    <bean id="blConfiguration" class="org.broadleafcommerce.common.config.RuntimeEnvironmentPropertiesConfigurer">
    		<property name="propertyLocations">
    			<set>
    				<value>classpath:config/bc/</value>
    			</set>
    		</property>
    		<property name="environments">
    			<set>
    				<value>production</value>
    				<value>staging</value>
    				<value>integration</value>
    				<value>development</value>
    			</set>
    		</property>
    		<property name="defaultEnvironment" value="development"/>
    		<property name="ignoreUnresolvablePlaceholders" value="true"/>
    	</bean>

    <bean id="blPersistenceUnitManager" class="org.broadleafcommerce.common.extensibility.jpa.MergePersistenceUnitManager">
		<property name="persistenceXmlLocations">
			<list>
				<value>classpath*:/META-INF/persistence-cms.xml</value>
			</list>
		</property>
	</bean>

    <bean id="blEntityManagerFactoryAssetStorageInfo" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean" depends-on="blCacheManager">
		<property name="jpaVendorAdapter">
			<bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"/>
		</property>
		<property name="persistenceUnitManager" ref="blPersistenceUnitManager" />
		<property name="persistenceUnitName" value="blCMSStorage"/>
	</bean>

	<bean id="blTransactionManagerAssetStorageInfo" class="org.springframework.orm.jpa.JpaTransactionManager">
		<property name="entityManagerFactory" ref="blEntityManagerFactoryAssetStorageInfo" />
	</bean>

	<tx:advice id="blTxAdviceAssetStorageInfo" transaction-manager="blTransactionManagerAssetStorageInfo">
	    <tx:attributes>
	      <tx:method name="*" propagation="REQUIRED"/>
	    </tx:attributes>
	</tx:advice>

    <aop:config>
	    <aop:pointcut id="blAssetStorageServiceOperation" expression="execution(* org.broadleafcommerce.cms.file.service.StaticAssetStorageService.*(..))"/>
	    <aop:advisor advice-ref="blTxAdviceAssetStorageInfo" pointcut-ref="blAssetStorageServiceOperation"/>
	</aop:config>

	<bean id="blCacheManager" class="org.broadleafcommerce.common.extensibility.cache.ehcache.MergeEhCacheManagerFactoryBean">
		<property name="shared" value="true"/>
		<property name="configLocations">
			<list>
				<value>classpath:bl-cms-ehcache.xml</value>
			</list>
		</property>
	</bean>

    <bean id="blEntityConfiguration" class="org.broadleafcommerce.common.persistence.EntityConfiguration">
		<property name="entityContexts">
			<list>
				<value>classpath:bl-cms-applicationContext-entity.xml</value>
			</list>
		</property>
	</bean>

    <bean id="blSandBoxService" class="org.broadleafcommerce.openadmin.server.service.persistence.SandBoxServiceImpl">
		<property name="sandboxItemListeners">
			<list>
				<ref bean="blPageService"/>
                <ref bean="blStructuredContentService"/>
                <ref bean="blStaticAssetService"/>
			</list>
		</property>
	</bean>

    <bean id="blContentDefaultRuleProcessor" class="org.broadleafcommerce.cms.structure.service.StructuredContentDefaultRuleProcessor">
        <property name="contextClassNames">
            <map>
                <entry key="customer" value="org.broadleafcommerce.profile.core.domain.Customer" />
                <entry key="product" value="org.broadleafcommerce.core.catalog.domain.Product" />
                <entry key="time" value="org.broadleafcommerce.common.TimeDTO" />
                <entry key="request" value="org.broadleafcommerce.common.RequestDTO" />
            </map>
	    </property>
    </bean>

    <bean id="blContentRuleProcessors" class="org.springframework.beans.factory.config.ListFactoryBean">
        <property name="sourceList">
            <list>
                <ref bean="blContentDefaultRuleProcessor"/>
            </list>
        </property>
    </bean>

    <bean id="blStructuredContentService" class="org.broadleafcommerce.cms.structure.service.StructuredContentServiceImpl">
        <property name="contentRuleProcessors" ref="blContentRuleProcessors"/>
	</bean>

    <bean id="blStaticAssetService" class="org.broadleafcommerce.cms.file.service.StaticAssetServiceImpl">
        <property name="staticAssetUrlPrefix" value="${asset.server.url.prefix.internal}"/>
        <property name="staticAssetEnvironmentUrlPrefix" value="${asset.server.url.prefix}"/>
        <property name="staticAssetEnvironmentSecureUrlPrefix" value="${asset.server.url.prefix.secure}"/>
	</bean>

    <bean id="blNamedOperationManager" class="org.broadleafcommerce.cms.file.service.operation.NamedOperationManagerImpl">
        <property name="namedOperationComponents">
            <list>
                <ref bean="blStaticMapNamedOperationComponent"/>
            </list>
        </property>
    </bean>

    <bean id="blStaticMapNamedOperationComponent" class="org.broadleafcommerce.cms.file.service.operation.StaticMapNamedOperationComponent">
        <property name="namedOperations">
            <map>
                <entry key="smallAdminThumbnail">
                    <map>
                        <entry key="resize-width-amount" value="20"/>
                        <entry key="resize-height-amount" value="20"/>
                        <entry key="resize-high-quality" value="false"/>
                        <entry key="resize-maintain-aspect-ratio" value="true"/>
                        <entry key="resize-reduce-only" value="true"/>
                    </map>
                </entry>
                <entry key="largeAdminThumbnail">
                    <map>
                        <entry key="resize-width-amount" value="60"/>
                        <entry key="resize-height-amount" value="60"/>
                        <entry key="resize-high-quality" value="false"/>
                        <entry key="resize-maintain-aspect-ratio" value="true"/>
                        <entry key="resize-reduce-only" value="true"/>
                    </map>
                </entry>
            </map>
        </property>
    </bean>

    <bean id="blPageURLProcessor" class="org.broadleafcommerce.cms.web.PageURLProcessor"/>

    <bean id="blProcessURLFilter" class="org.broadleafcommerce.cms.web.BroadleafProcessURLFilter">
        <property name="urlProcessorList">
            <list>
                <ref bean="blPageURLProcessor"/>
            </list>
        </property>
    </bean>

    <bean id="broadleafApplicationFilterChain" class="org.springframework.security.web.FilterChainProxy">
        <property name="filterChainMap">
            <util:map map-class="java.util.LinkedHashMap">
                <entry key="/**">
                    <list>
                        <ref bean="blProcessURLFilter"/>
                    </list>
                </entry>
            </util:map>
        </property>
    </bean>

</beans>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy