Save This Page
Home » openjdk-7 » net » sf » rvpf » messaging » [javadoc | source]
    1   /**
    2    * Related Values Processing Framework.
    3    * 
    4    * Copyright (C) 2003 Serge Brisson.
    5    * 
    6    * This software is distributable under LGPL license.
    7    * See details at the bottom of this file.
    8    * 
    9    * $Header: /cvsroot/rvpf/RVPF/java/src/net/sf/rvpf/messaging/NoticeDispatcherFilter.java,v 1.5 2003/09/19 19:48:25 sfb Exp $
   10    */
   11   package net.sf.rvpf.messaging;
   12   
   13   import java.util.Map;
   14   
   15   import net.sf.rvpf.document.MetadataFilter;
   16   import net.sf.rvpf.metadata.OriginEntity;
   17   import net.sf.rvpf.metadata.PointEntity;
   18   
   19   /** Notice Dispatcher Filter.
   20    *
   21    * @author Serge Brisson
   22    * @version $Revision: 1.5 $
   23    */
   24   public class NoticeDispatcherFilter extends MetadataFilter {
   25   
   26       // Constructors.
   27   
   28       /** Constructs a filter for the destinations.
   29        * 
   30        * @param destinations The destinations.
   31        */
   32       NoticeDispatcherFilter(Map destinations) {
   33           this.destinations = destinations;
   34       }
   35   
   36       // Public Instance Methods.
   37   
   38       /**
   39        */
   40       public boolean areOriginsFiltered() {
   41           return true;
   42       }
   43   
   44       /**
   45        */
   46       public boolean areOriginsNeeded() {
   47           return true;
   48       }
   49   
   50       /**
   51        */
   52       public boolean areOriginsRequired() {
   53           return false;
   54       }
   55   
   56       /**
   57        */
   58       public boolean arePointInputsNeeded() {
   59           return true;
   60       }
   61   
   62       /**
   63        */
   64       public boolean arePointInputsNeeded(PointEntity pointEntity) {
   65           OriginEntity originEntity = pointEntity.getOriginEntity();
   66           boolean needed;
   67   
   68           if (originEntity == null) needed = false;
   69           else
   70               needed = this.destinations.containsKey(originEntity.getName());
   71   
   72           return needed;
   73       }
   74   
   75       /**
   76        */
   77       public boolean isOriginNeeded(OriginEntity originEntity) {
   78           return this.destinations.containsKey(originEntity.getName());
   79       }
   80   
   81       // Instance Attributes.
   82   
   83       private Map destinations;
   84   }
   85   
   86   // $Log: NoticeDispatcherFilter.java,v $
   87   // Revision 1.5  2003/09/19 19:48:25  sfb
   88   // Refactored Behaviour and Relation.
   89   //
   90   // Revision 1.4  2003/09/19 16:18:31  sfb
   91   // Refactored DefEntity.
   92   //
   93   
   94   /*
   95    * This is free software; you can redistribute it and/or modify
   96    * it under the terms of the GNU Lesser General Public License
   97    * as published by the Free Software Foundation; either version 2.1
   98    * of the License, or (at your option) any later version.
   99    *
  100    * This software is distributed in the hope that it will be useful,
  101    * but WITHOUT ANY WARRANTY; without even the implied warranty of
  102    * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  103    * Lesser General Public License for more details.
  104    *
  105    * You should have received a copy of the GNU Lesser General Public
  106    * License along with this software; if not, write to the Free Software
  107    * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  108    */

Save This Page
Home » openjdk-7 » net » sf » rvpf » messaging » [javadoc | source]