Coverage Report - org.mule.routing.filters.logic.OrFilter
 
Classes in this File Line Coverage Branch Coverage Complexity
OrFilter
0%
0/13
0%
0/1
1
 
 1  
 /*
 2  
  * $Id: OrFilter.java 7976 2007-08-21 14:26:13Z dirk.olmes $
 3  
  * --------------------------------------------------------------------------------------
 4  
  * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.com
 5  
  *
 6  
  * The software in this package is published under the terms of the CPAL v1.0
 7  
  * license, a copy of which has been included with this distribution in the
 8  
  * LICENSE.txt file.
 9  
  */
 10  
 
 11  
 package org.mule.routing.filters.logic;
 12  
 
 13  
 import org.mule.umo.UMOFilter;
 14  
 import org.mule.umo.UMOMessage;
 15  
 
 16  
 /**
 17  
  * <code>OrFilter</code> accepts if the leftFilter or rightFilter filter accept.
 18  
  */
 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  0
     {
 27  0
         this.leftFilter = leftFilter;
 28  0
         this.rightFilter = rightFilder;
 29  0
     }
 30  
 
 31  
     public OrFilter()
 32  
     {
 33  0
         super();
 34  0
     }
 35  
 
 36  
     public void setLeftFilter(UMOFilter leftFilter)
 37  
     {
 38  0
         this.leftFilter = leftFilter;
 39  0
     }
 40  
 
 41  
     public void setRightFilter(UMOFilter rightFilter)
 42  
     {
 43  0
         this.rightFilter = rightFilter;
 44  0
     }
 45  
 
 46  
     public UMOFilter getLeftFilter()
 47  
     {
 48  0
         return leftFilter;
 49  
     }
 50  
 
 51  
     public UMOFilter getRightFilter()
 52  
     {
 53  0
         return rightFilter;
 54  
     }
 55  
 
 56  
     public boolean accept(UMOMessage message)
 57  
     {
 58  0
         return ((leftFilter != null && leftFilter.accept(message)) || (rightFilter != null && rightFilter
 59  
             .accept(message)));
 60  
     }
 61  
 
 62  
 }