View Javadoc

1   package net.sf.tomp.xtcl.test;
2   
3   import net.sf.tomp.xtcl.Context;
4   import net.sf.tomp.xtcl.command.VarCommand;
5   
6   /***
7    * DOCUMENT ME!
8    * 
9    * @author tomp
10   */
11  public class MyMultiFilterCommand extends VarCommand {
12      MyMultiFilter af;
13  
14      /***
15       * DOCUMENT ME!
16       * 
17       * @param context DOCUMENT ME!
18       * @return DOCUMENT ME!
19       * @throws Exception DOCUMENT ME!
20       */
21      public int execute(Context context) throws Exception {
22          af = new MyMultiFilter();
23          context.put(var, af);
24  
25          return done(context, 0);
26      }
27  
28      /***
29       * DOCUMENT ME!
30       * 
31       * @return DOCUMENT ME!
32       */
33      public String toString() {
34          return "MYMULTIFILTER " + var + " (" + listFilters() + ")";
35      }
36  
37      /***
38       * DOCUMENT ME!
39       * 
40       * @return DOCUMENT ME!
41       */
42      protected String listFilters() {
43          return af.getFilters().toString();
44      }
45  }
46  
47  /*
48   * The contents of this file are subject to the Mozilla Public License Version
49   * 1.1 (the "License"); you may not use this file except in compliance with the
50   * License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
51   * Software distributed under the License is distributed on an "AS IS" basis,
52   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
53   * the specific language governing rights and limitations under the License. The
54   * Original Code is: all this file. The Initial Developer of the Original Code
55   * is: Tomas Pitner, Masaryk University in Brno, Czech Republic. Contributor(s):
56   */