AnsweredAssumed Answered

Using BehaviorFilter

Question asked by rhinmass on Feb 3, 2015
Latest reply on Feb 4, 2015 by mlagneaux
I'm trying to use BehaviorFilter to disable the auditable aspect while I update a property. 

The reason is that this particular webscript needs to run as Administrator, but when it updates a property on the file, alfresco is changing the last modifier to Administrator.  So I am trying to use BehaviourFilter to disable this aspect while I update the property.


public class PublishWebscript extends PublishingWebScriptSupport {
   
   private BehaviourFilter behaviourFilter;
   public void setBehaviourFilter(BehaviourFilter policyBehaviourFilter)
   {
      this.behaviourFilter = policyBehaviourFilter;
   }
   
   
   public void execute(WebScriptRequest req, WebScriptResponse res) throws WebScriptException {   


And the associated bean:

   <bean id="webscript.com.czen.publish.post" class="com.czen.alfresco.web.webscripts.PublishWebscript" parent="webscript">
      <property name="username" value="administrator" />
      <property name="password" value="123456" />
      <property name="BehaviourFilter">
               <ref bean="policyBehaviourFilter" />
           </property>
   </bean>

When I try to start up the container I get:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'policyBehaviourFilter' is defined


Where do I need to define policyBehaviourFilter.



Outcomes