KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > openinventions > webappfilter > processor > PluginDestroy


1 package com.openinventions.webappfilter.processor;
2
3 import com.openinventions.metaframework.*;
4 import org.apache.commons.logging.*;
5 import java.util.*;
6
7 public class PluginDestroy implements Processor {
8     private static final Log log = LogFactory.getLog(PluginDestroy.class);
9     
10     public void process(State state, Element context) throws Exception JavaDoc {
11         Iterator plugins = context.getElements("plugin");
12         while (plugins.hasNext()) {
13             Element pluginContext = (Element) plugins.next();
14             Plugin plugin = (Plugin) state.get(pluginContext.getValue("processor"));
15             plugin.destroy(state, pluginContext);
16         }
17     }
18 }
19 /* ====================================================================
20  * The webappfilter License, Version 1.1
21  *
22  * Copyright (c) 2002 Ivar Chan. All rights
23  * reserved.
24  *
25  * Redistribution and use in source and binary forms, with or without
26  * modification, are permitted provided that the following conditions
27  * are met:
28  *
29  * 1. Redistributions of source code must retain the above copyright
30  * notice, this list of conditions and the following disclaimer.
31  *
32  * 2. Redistributions in binary form must reproduce the above copyright
33  * notice, this list of conditions and the following disclaimer in
34  * the documentation and/or other materials provided with the
35  * distribution.
36  *
37  * 3. The end-user documentation included with the redistribution,
38  * if any, must include the following acknowledgment:
39  * "This product includes software developed by
40  * Ivar Chan (http://www.openinventions.com/webappfilter/)."
41  * Alternately, this acknowledgment may appear in the software itself,
42  * if and wherever such third-party acknowledgments normally appear.
43  *
44  * 4. The name "webappfilter" must not be used to endorse or promote products
45  * derived from this software without prior written permission. For
46  * written permission, please contact ivarchan@acm.org.
47  *
48  * 5. Products derived from this software may not be called "webappfilter",
49  * nor may "webappfilter" appear in their name, without
50  * prior written permission of Ivar Chan.
51  *
52  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
53  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
54  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
55  * DISCLAIMED. IN NO EVENT SHALL THE IVAR CHAN BE LIABLE FOR ANY
56  * DIRECT, INDIRECT, INCIDENTAL,
57  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
58  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
59  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
60  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
61  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
62  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
63  * SUCH DAMAGE.
64  * ====================================================================
65  *
66  * This software consists of voluntary contributions made by many
67  * individuals. For more information on webappfilter, please see
68  * <http://www.openinventions/webappfilter/>.
69  */

70
Popular Tags