KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ivata > groupware > business > library > struts > LibraryForm


1 /*
2  * Copyright (c) 2001 - 2005 ivata limited.
3  * All rights reserved.
4  * -----------------------------------------------------------------------------
5  * ivata groupware may be redistributed under the GNU General Public
6  * License as published by the Free Software Foundation;
7  * version 2 of the License.
8  *
9  * These programs are free software; you can redistribute them and/or
10  * modify them under the terms of the GNU General Public License
11  * as published by the Free Software Foundation; version 2 of the License.
12  *
13  * These programs are distributed in the hope that they will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16  *
17  * See the GNU General Public License in the file LICENSE.txt for more
18  * details.
19  *
20  * If you would like a copy of the GNU General Public License write to
21  *
22  * Free Software Foundation, Inc.
23  * 59 Temple Place - Suite 330
24  * Boston, MA 02111-1307, USA.
25  *
26  *
27  * To arrange commercial support and licensing, contact ivata at
28  * http://www.ivata.com/contact.jsp
29  * -----------------------------------------------------------------------------
30  * $Log: LibraryForm.java,v $
31  * Revision 1.3 2005/04/10 20:31:58 colinmacleod
32  * Added new themes.
33  * Changed id type to String.
34  * Changed i tag to em and b tag to strong.
35  * Improved PicoContainerFactory with NanoContainer scripts.
36  *
37  * Revision 1.2 2005/04/09 17:19:46 colinmacleod
38  * Changed copyright text to GPL v2 explicitly.
39  *
40  * Revision 1.1.1.1 2005/03/10 17:52:01 colinmacleod
41  * Restructured ivata op around Hibernate/PicoContainer.
42  * Renamed ivata groupware.
43  *
44  * Revision 1.4 2004/11/12 18:19:15 colinmacleod
45  * Change action and form classes to extend MaskAction, MaskForm respectively.
46  *
47  * Revision 1.3 2004/03/21 21:16:29 colinmacleod
48  * Shortened name to ivata op.
49  *
50  * Revision 1.2 2004/02/01 22:07:31 colinmacleod
51  * Added full names to author tags
52  *
53  * Revision 1.1.1.1 2004/01/27 20:58:41 colinmacleod
54  * Moved ivata openportal to SourceForge..
55  *
56  * Revision 1.2 2003/10/15 14:16:53 colin
57  * fixing for XDoclet
58  *
59  * Revision 1.2 2003/02/28 07:30:22 colin
60  * implemented editing/displaying of faqs & notes
61  * Revision 1.1 2003/02/24 19:09:24 colin
62  * moved to business
63  * -----------------------------------------------------------------------------
64  */

65 package com.ivata.groupware.business.library.struts;
66
67 import com.ivata.mask.Mask;
68 import com.ivata.mask.web.struts.DialogForm;
69
70
71 /**
72  * <p>Provides a base class for library form
73  * classes, to retrieve the library objects.</p>
74  *
75  *
76  * @since 2003-02-18
77  * @author Colin MacLeod
78  * <a HREF='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
79  * @version $Revision: 1.3 $
80  */

81 public abstract class LibraryForm extends DialogForm {
82
83     /**
84      * <p>Indicates the current item/comment should be edited.</p>
85      */

86     private String JavaDoc edit = null;
87     /**
88      * <p>When submitting library items and comments, they must be
89      * previewed once before submitting.</p>
90      */

91     private String JavaDoc preview = null;
92     /**
93      * <p>
94      * Defines the base class of all objects in the value object list.
95      * </p>
96      */

97     private Class JavaDoc baseClass;
98     /**
99      * <p>
100      * Mask containing all the field definitions for this list.
101      * </p>
102      */

103     private Mask mask;
104
105     /**
106      * <p>Default constructor. Overridden to set <code>bundle</code>.</p>
107      *
108      * @param maskParam
109      * Refer to {@link #getMask}.
110      * @param baseClassParam
111      * Refer to {@link #getBaseClass}.
112      */

113     public LibraryForm() {
114         // we want messages from the library
115
setBundle("library");
116     }
117
118     /**
119      * <p>Indicates the current item/comment should be edited.</p>
120      *
121      * @return the current value of edit.
122      */

123     public final String JavaDoc getEdit() {
124         return edit;
125     }
126
127     /**
128      * <p>When submitting library items and comments, they must be
129      * previewed once before submitting.</p>
130      *
131      * @return the current value of preview.
132      */

133     public final String JavaDoc getPreview() {
134         return preview;
135     }
136
137     /**
138      * <p>Indicates the current item/comment should be edited.</p>
139      *
140      * @param edit the new value of edit.
141      */

142     public final void setEdit(final String JavaDoc edit) {
143         this.edit = edit;
144     }
145
146     /**
147      * <p>When submitting library items and comments, they must be
148      * previewed once before submitting.</p>
149      *
150      * @param preview the new value of preview.
151      */

152     public final void setPreview(final String JavaDoc preview) {
153         this.preview = preview;
154     }
155
156     /**
157      * <p>
158      * Defines the base class of all objects in the value object list.
159      * </p>
160      *
161      * @return base class of all objects in the value object list.
162      */

163     public final Class JavaDoc getBaseClass() {
164         return baseClass;
165     }
166
167     /**
168      * <p>
169      * Mask containing all the field definitions for this list.
170      * </p>
171      *
172      * @return mask containing all the field definitions for this list.
173      */

174     public final Mask getMask() {
175         return mask;
176     }
177 }
178
Popular Tags