01: /*---------------------------------------------------------------------------*\
02: $Id: OutputHandlerConfigItemPlugIn.java 7041 2007-09-09 01:04:47Z bmc $
03: ---------------------------------------------------------------------------
04: This software is released under a BSD-style license:
05:
06: Copyright (c) 2004-2007 Brian M. Clapper. All rights reserved.
07:
08: Redistribution and use in source and binary forms, with or without
09: modification, are permitted provided that the following conditions are
10: met:
11:
12: 1. Redistributions of source code must retain the above copyright notice,
13: this list of conditions and the following disclaimer.
14:
15: 2. The end-user documentation included with the redistribution, if any,
16: must include the following acknowlegement:
17:
18: "This product includes software developed by Brian M. Clapper
19: (bmc@clapper.org, http://www.clapper.org/bmc/). That software is
20: copyright (c) 2004-2007 Brian M. Clapper."
21:
22: Alternately, this acknowlegement may appear in the software itself,
23: if wherever such third-party acknowlegements normally appear.
24:
25: 3. Neither the names "clapper.org", "curn", nor any of the names of the
26: project contributors may be used to endorse or promote products
27: derived from this software without prior written permission. For
28: written permission, please contact bmc@clapper.org.
29:
30: 4. Products derived from this software may not be called "curn", nor may
31: "clapper.org" appear in their names without prior written permission
32: of Brian M. Clapper.
33:
34: THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
35: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
36: MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
37: NO EVENT SHALL BRIAN M. CLAPPER BE LIABLE FOR ANY DIRECT, INDIRECT,
38: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
39: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
40: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
41: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
42: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
43: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
44: \*---------------------------------------------------------------------------*/
45:
46: package org.clapper.curn;
47:
48: /**
49: * This interface defines the methods that must be supported by plug-ins
50: * that wish intercept <i>curn</i> output handler-related configuration items.
51: *
52: * @see PlugIn
53: * @see MetaPlugIn
54: * @see FeedConfigItemPlugIn
55: * @see MainConfigItemPlugIn
56: * @see UnknownSectionConfigItemPlugIn
57: * @see Curn
58: *
59: * @version <tt>$Revision: 7041 $</tt>
60: */
61: public interface OutputHandlerConfigItemPlugIn extends PlugIn {
62: /*----------------------------------------------------------------------*\
63: Public Methods
64: \*----------------------------------------------------------------------*/
65:
66: /**
67: * Called immediately after <i>curn</i> has read and processed a
68: * configuration item in an output handler configuration section. All
69: * configuration items are passed, one by one, to each loaded plug-in.
70: * If a plug-in class is not interested in a particular configuration
71: * item, this method should simply return without doing anything. Note
72: * that some configuration items may simply be variable assignment;
73: * there's no real way to distinguish a variable assignment from a
74: * blessed configuration item.
75: *
76: * @param sectionName the name of the configuration section where
77: * the item was found
78: * @param paramName the name of the parameter
79: * @param config the {@link CurnConfig} object
80: * @param handler partially complete {@link ConfiguredOutputHandler}
81: * object. The class name is guaranteed to be set,
82: * but the other fields may not be.
83: *
84: * @return <tt>true</tt> to continue processing the handler,
85: * <tt>false</tt> to skip it
86: *
87: * @throws CurnException on error
88: *
89: * @see CurnConfig
90: * @see ConfiguredOutputHandler
91: */
92: public boolean runOutputHandlerConfigItemPlugIn(String sectionName,
93: String paramName, CurnConfig config,
94: ConfiguredOutputHandler handler) throws CurnException;
95: }
|