01: /*---------------------------------------------------------------------------*\
02: $Id: RSSLinkChangeListener.java 7044 2007-09-10 12:19:46Z 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.parser;
47:
48: import java.net.URL;
49:
50: /**
51: * Implements a change listener for <tt>RSSLink</tt> objects. An
52: * <tt>RSSLink</tt> object can be associated with change listeners that
53: * fire if the <tt>RSSLink</tt> object is changed. This capability exists
54: * primarily to permit underlying parser adapters to detect when a link
55: * has been changed (e.g., by a plug-in).
56: *
57: * @version <tt>$Revision: 7044 $</tt>
58: */
59: public interface RSSLinkChangeListener {
60: /**
61: * Fired when the URL is changed.
62: *
63: * @param rssLink the changed object
64: * @param oldURL the old URL
65: * @param newURL the new URL
66: */
67: public void onURLChange(RSSLink rssLink, URL oldURL, URL newURL);
68:
69: /**
70: * Fired when the link type is changed.
71: *
72: * @param rssLink the changed object
73: * @param oldType the old link type
74: * @param newType the new link type
75: */
76: public void onLinkTypeChange(RSSLink rssLink, RSSLink.Type oldType,
77: RSSLink.Type newType);
78:
79: /**
80: * Fired when the MIME type changes.
81: *
82: * @param rssLink the changed object
83: * @param oldType the old MIME type
84: * @param newType the new MIME type
85: */
86: public void onMIMETypeChange(RSSLink rssLink, String oldType,
87: String newType);
88: }
|