<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans.dtd">

<beans>

    <bean id="viewSecurityAdvisor"
          class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
        <property name="advice">
            <ref local="viewSecurityAdvice"/>
        </property>
        <property name="mappedNames">
            <list>
                <value>getMindmapUserBy</value>
                <value>getMindmapById</value>
                <value>find*</value>
                <value>filter*</value>
            </list>
        </property>
    </bean>

    <bean id="updateSecurityAdvisor"
          class="org.springframework.aop.support.NameMatchMethodPointcutAdvisor">
        <property name="advice">
            <ref local="updateSecurityAdvice"/>
        </property>
        <property name="mappedNames">
            <list>
                <value>save*</value>
                <value>update*</value>
                <value>add*</value>
                <value>remove*</value>
                <value>revert*</value>
            </list>
        </property>
    </bean>

    <bean id="updateSecurityAdvice" class="com.wisemapping.security.aop.UpdateSecurityAdvise">
        <property name="mindmapService" ref="mindmapService"/>
    </bean>

    <bean id="viewSecurityAdvice" class="com.wisemapping.security.aop.ViewBaseSecurityAdvise">
        <property name="mindmapService" ref="mindmapService"/>
    </bean>

</beans>
