Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
 
Go Back   Zimbra - Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra - Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-09-2009, 09:30 AM
Junior Member
 
Posts: 5
Default create a new filter via zimlet (ZmFilterRule)?

hi,
I'm developing an zimlet for creating a FILTER

i' use this code:

Code:
this._filter = new ZmFilterRule("name filter ",true);
this._filter.setName("test");
this._condition = new ZmCondition(ZmFilterRule.C_FROM,ZmFilterRule.OP_MATCHES,"myserver@sever.net");
this._action = new ZmAction(ZmFilterRule.A_FOLDER,"myfolder");
this._filter.addCondition(this._condition);
this._filter.addAction(this._action);
this._filterRule = new ZmFilterRules(this._appCtxt);
this._filterRule.addRule(this._filter);

but this code clear the the old filter and create only the filter "name filter"...

how can I create a new filter without removing the old filter?

Tnx
Reply With Quote
  #2 (permalink)  
Old 07-09-2009, 09:38 AM
Zimbra Consultant & Moderator
 
Posts: 12,395
Default

In general you'd have to get the old filter then add this to the end of it and then save the complete filter, AFAIK there is no facility for appending a new filter to the current ones.
__________________
Regards


Bill
Reply With Quote
Reply


Thread Tools
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

Zimbrablog.com