View Javadoc

1   /*
2    * $Id: ViewImpl.java 113 2004-10-22 19:22:56Z josem $
3    *
4    * Tarsis
5    * Copyright (C) 2002 Talika Open Source Group
6    *
7    * This program is free software; you can redistribute it and/or modify
8    * it under the terms of the GNU General Public License as published by
9    * the Free Software Foundation; either version 2 of the License, or
10   * (at your option) any later version.
11   *
12   * This program is distributed in the hope that it will be useful,
13   * but WITHOUT ANY WARRANTY; without even the implied warranty of
14   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15   * GNU General Public License for more details.
16   *
17   * You should have received a copy of the GNU General Public License
18   * along with this program; if not, write to the Free Software
19   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
20   *
21   */
22  
23  package org.talika.tarsis.command.view;
24  
25  /**
26   * Default implementation of <code>View</code> interface.<br>
27   *
28   * @author  Jose M. Palomar
29   * @version $Revision: 113 $
30   */
31  public class ViewImpl implements View {
32  
33      // Fields
34      /**
35       * Name of view.
36       */
37      private final String name;
38  
39      /**
40       * Path of view.
41       */
42      private final String path;
43  
44      /**
45       * Type of view.
46       */
47      private final int type;
48  
49      /**
50       * Constructs a new <code>ViewImpl</code> object for given name, path and type.
51       *
52       * @param name String name of view.
53       * @param path String path fo view.
54       * @param type int type of view.
55       */
56      public ViewImpl(String name, String path, int type) {
57          this.name = name;
58          this.path = path;
59          this.type = type;
60      }
61  
62      /**
63       * Returns name of view.
64       *
65       * @return String name of view.
66       * @see org.talika.tarsis.command.view.View#getName()
67       */
68      public final String getName() {
69          return name;
70      }
71  
72      /**
73       * Returns path fo view.
74       *
75       * @return String path fo view.
76       * @see org.talika.tarsis.command.view.View#getPath()
77       */
78      public final String getPath() {
79          return path;
80      }
81  
82      /**
83       * Returns view's type. View's can be FORWARD, REDIRECT or INCLUDE.
84       *
85       * @return int view's type.
86       * @see org.talika.tarsis.command.view.View#getType()
87       */
88      public final int getType() {
89          return type;
90      }
91  
92  }