1 10 11 package org.mule.routing.filters.logic; 12 13 import org.mule.umo.UMOFilter; 14 import org.mule.umo.UMOMessage; 15 16 19 20 public class OrFilter implements UMOFilter 21 { 22 private UMOFilter leftFilter; 23 private UMOFilter rightFilter; 24 25 public OrFilter(UMOFilter leftFilter, UMOFilter rightFilder) 26 { 27 this.leftFilter = leftFilter; 28 this.rightFilter = rightFilder; 29 } 30 31 public OrFilter() 32 { 33 super(); 34 } 35 36 public void setLeftFilter(UMOFilter leftFilter) 37 { 38 this.leftFilter = leftFilter; 39 } 40 41 public void setRightFilter(UMOFilter rightFilter) 42 { 43 this.rightFilter = rightFilter; 44 } 45 46 public UMOFilter getLeftFilter() 47 { 48 return leftFilter; 49 } 50 51 public UMOFilter getRightFilter() 52 { 53 return rightFilter; 54 } 55 56 public boolean accept(UMOMessage message) 57 { 58 return ((leftFilter != null && leftFilter.accept(message)) || (rightFilter != null && rightFilter 59 .accept(message))); 60 } 61 62 } 63 | Popular Tags |