View Javadoc

1   package net.sf.tomp.xtcl.command;
2   
3   /***
4    * Creates a XTCL script template.
5    * 
6    * @author tomp
7    */
8   public class Template extends AbstractCommand {
9   	
10      /*** Template name */
11      private String name;
12  
13      /*** Template command */
14      private String body;
15  
16      /***
17       * @return Returns the body.
18       */
19      public String getBody() {
20          return body;
21      }
22  
23      /***
24       * @return Returns the name.
25       */
26      public String getName() {
27          return name;
28      }
29  
30      /***
31       * DOCUMENT ME!
32       * 
33       * @param p DOCUMENT ME!
34       */
35      public void setName(String p) {
36          name = p;
37      }
38  
39      /***
40       * Set the command (sequence) found in this template body
41       * 
42       * @param c the command from the body
43       */
44      public void setBody(String b) {
45          body = b;
46      }
47  
48      /***
49       * @return "TEMPLATE " + name + " {" + body + "}";
50       */
51      public String toString() {
52          return "TEMPLATE " + name + " {" + body + "}";
53      }
54  }
55  
56  /*
57   * The contents of this file are subject to the Mozilla Public License Version
58   * 1.1 (the "License"); you may not use this file except in compliance with the
59   * License. You may obtain a copy of the License at http://www.mozilla.org/MPL/
60   * Software distributed under the License is distributed on an "AS IS" basis,
61   * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
62   * the specific language governing rights and limitations under the License. The
63   * Original Code is: all this file. The Initial Developer of the Original Code
64   * is: Tomas Pitner, Masaryk University in Brno, Czech Republic. Contributor(s):
65   */