KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > common > command > filter > ExecuteFilter


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Forums JBoss Portlet *
6  * *
7  * Distributable under LGPL license. *
8  * See terms of license at gnu.org. *
9  * *
10  *****************************************/

11 package org.jboss.portal.common.command.filter;
12
13 import org.jboss.portal.common.command.result.Result;
14 import org.jboss.portal.common.command.CommandException;
15 import org.jboss.portal.common.command.Command;
16
17 /**
18  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
19  * @version $Revision: 1.1 $
20  */

21 public class ExecuteFilter extends AbstractCommandFilter
22 {
23    public Result filter(Command cmd) throws CommandException
24    {
25       Result result = cmd.execute();
26       // Allow post processing
27
if (getNext() != null)
28       {
29          getNext().filter(cmd);
30       }
31       return result;
32    }
33 }
34
Popular Tags