001// Copyright 2004, 2005 The Apache Software Foundation 002// 003// Licensed under the Apache License, Version 2.0 (the "License"); 004// you may not use this file except in compliance with the License. 005// You may obtain a copy of the License at 006// 007// http://www.apache.org/licenses/LICENSE-2.0 008// 009// Unless required by applicable law or agreed to in writing, software 010// distributed under the License is distributed on an "AS IS" BASIS, 011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 012// See the License for the specific language governing permissions and 013// limitations under the License. 014 015package org.apache.hivemind.lib.pipeline; 016 017import org.apache.hivemind.impl.BaseLocatable; 018 019/** 020 * A contribution used to add a filter to the pipeline. 021 * 022 * @author Howard Lewis Ship 023 */ 024public class FilterContribution extends BaseLocatable implements PipelineContribution 025{ 026 private String _name; 027 private Object _filter; 028 private String _before; 029 private String _after; 030 031 public void informAssembler(PipelineAssembler pa) 032 { 033 pa.addFilter(_name, _after, _before, _filter, getLocation()); 034 } 035 036 public void setAfter(String string) 037 { 038 _after = string; 039 } 040 041 public void setBefore(String string) 042 { 043 _before = string; 044 } 045 046 public void setFilter(Object object) 047 { 048 _filter = object; 049 } 050 051 public void setName(String string) 052 { 053 _name = string; 054 } 055 056}