KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > ivata > groupware > business > addressbook > person > group > right > RightDO


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: RightDO.java,v $
31  * Revision 1.4 2005/04/29 02:48:13 colinmacleod
32  * Data bugfixes.
33  * Changed primary key back to Integer.
34  *
35  * Revision 1.3 2005/04/10 20:09:36 colinmacleod
36  * Added new themes.
37  * Changed id type to String.
38  * Changed i tag to em and b tag to strong.
39  * Improved PicoContainerFactory with NanoContainer scripts.
40  *
41  * Revision 1.2 2005/04/09 17:19:07 colinmacleod
42  * Changed copyright text to GPL v2 explicitly.
43  *
44  * Revision 1.1.1.1 2005/03/10 17:50:35 colinmacleod
45  * Restructured ivata op around Hibernate/PicoContainer.
46  * Renamed ivata groupware.
47  *
48  * Revision 1.1 2004/07/13 19:41:14 colinmacleod
49  * Moved project to POJOs from EJBs.
50  * Applied PicoContainer to services layer (replacing session EJBs).
51  * Applied Hibernate to persistence layer (replacing entity EJBs).
52  *
53  * Revision 1.3 2004/03/21 21:16:06 colinmacleod
54  * Shortened name to ivata op.
55  *
56  * Revision 1.2 2004/02/01 22:00:32 colinmacleod
57  * Added full names to author tags
58  *
59  * Revision 1.1.1.1 2004/01/27 20:57:51 colinmacleod
60  * Moved ivata openportal to SourceForge..
61  *
62  * Revision 1.6 2003/11/13 16:03:15 jano
63  * commitng everything to CVS
64  * can deploy and application is ruuning, can login into
65  *
66  * Revision 1.5 2003/11/03 11:28:24 jano
67  * commiting addressbook,
68  * tryinjg to fix deploying problem
69  *
70  * Revision 1.4 2003/10/17 12:36:12 jano
71  * fixing problems with building
72  * converting intranet -> portal
73  * Eclipse building
74  *
75  * Revision 1.3 2003/10/15 13:45:32 jano
76  * converting to XDoclet
77  *
78  * Revision 1.2 2003/10/15 13:18:02 colin
79  * fixing for XDoclet
80  *
81  * Revision 1.3 2003/05/01 12:13:22 jano
82  * tidy up names of sequeneces
83  *
84  * Revision 1.2 2003/02/25 14:38:13 colin
85  * implemented setModified methods on entity beans thro IvataEntityBean superclass
86  *
87  * Revision 1.1 2003/02/24 19:09:21 colin
88  * moved to business
89  *
90  * Revision 1.11 2003/02/04 17:43:45 colin
91  * copyright notice
92  *
93  * Revision 1.10 2003/01/08 17:17:10 jano
94  * fixing bug
95  *
96  * Revision 1.9 2003/01/03 15:42:30 jano
97  * we don't need tempFindTarge...... method, we are using select method
98  *
99  * Revision 1.8 2003/01/03 15:01:46 jano
100  * we have new selec method and method where we are calling that select method
101  *
102  * Revision 1.7 2003/01/03 10:21:45 jano
103  * fixing bug
104  *
105  * Revision 1.6 2003/01/03 09:11:15 jano
106  * taking VIEW of
107  *
108  * Revision 1.4 2002/09/27 12:50:57 jano
109  * ejbCreate ejbPost was change
110  *
111  * Revision 1.3 2002/07/04 12:29:28 jano
112  * i put readonly script to CVS and i will commit all SRC directory
113  *
114  * Revision 1.2 2002/06/17 07:28:44 colin
115  * improved and extended javadoc documentation
116  * -----------------------------------------------------------------------------
117  */

118 package com.ivata.groupware.business.addressbook.person.group.right;
119
120 import com.ivata.groupware.business.addressbook.person.group.GroupDO;
121 import com.ivata.groupware.business.addressbook.person.group.right.detail.RightDetailDO;
122 import com.ivata.groupware.container.persistence.BaseDO;
123
124
125 /**
126  * <p>Assigns the right to perform a specific action to a group of people. Each
127  * right allows a group to add, amend, view or delete entries from the intranet.
128  * The element which is allowed to be changed by this right is described by the
129  * {@link com.ivata.groupware.adddressbook.person.group.right.detail.RightDetailBean
130  * detail EJB} associated with it.</p>
131  *
132  * @since 2002-05-19
133  * @author Colin MacLeod
134  * <a HREF='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
135  * @see
136  * com.ivata.groupware.adddressbook.person.group.right.detail.RightDetailBean
137  * @see RightConstants
138  * @version $Revision: 1.4 $
139  *
140  * @hibernate.class
141  * table="person_group_right"
142  * @hibernate.cache
143  * usage="read-write"
144  */

145 public class RightDO extends BaseDO {
146     /**
147      * <p>Access level allowed. This will give the group the right to
148      * add, amend, view or delete the associated data, as defined in
149      * {@link RightConstants RightConstants}.</p>
150      */

151     private Integer JavaDoc access;
152
153     /**
154      * <p>The detail, which provides clear text information about this
155      * right.</p>
156      */

157     private RightDetailDO detail;
158
159     /**
160      * <p>Group who is entitled by this right. Rights in ivata groupware
161      * are allocated on a per-group basis.</p>
162      */

163     private GroupDO group;
164
165     /**
166      * <p>Id of the DO this right targets. Some rights allow a group
167      * access to a specific instance of an EJB. This id is the id of that
168      * instance.</p>
169      */

170     private Integer JavaDoc targetId;
171
172     /**
173      * <p>Get the access level allowed. This will give the group the right to
174      * add, amend, view or delete the associated data, as defined in
175      * {@link RightConstants RightConstants}.</p>
176      *
177      * @return access level allowed, as defined in {@link RightConstants
178      * RightConstants}.
179      *
180      * @hibernate.property
181      * column="access"
182      */

183     public final Integer JavaDoc getAccess() {
184         return access;
185     }
186
187     /**
188      * <p>Get the detail, which provides clear text information about this
189      * right.</p>
190      *
191      * @return instance providing clear text information about this right
192      *
193      * @hibernate.many-to-one
194      * column="detail"
195      */

196     public final RightDetailDO getDetail() {
197         return detail;
198     }
199     /**
200      * <p>Get the group who is entitled by this right. Rights in ivata groupware
201      * are allocated on a per-group basis.</p>
202      *
203      * @return group entitled to this right.
204      *
205      * @hibernate.many-to-one
206      * column="person_group"
207      */

208     public final GroupDO getGroup() {
209         return group;
210     }
211     /**
212      * <p>Get the id of the DO this right targets. Some rights allow a group
213      * access to a specific instance of an EJB. This id is the id of that
214      * instance.</p>
215      *
216      * @return the id of the EJB the right targets, or null if this right is not
217      * specific to a single instance.
218      *
219      * @hibernate.property
220      * column="target_id"
221      */

222     public final Integer JavaDoc getTargetId() {
223         return targetId;
224     }
225
226     /**
227      * <p>Set the access level allowed. This will give the group the right to
228      * add, amend, view or delete the associated data, as defined in
229      * {@link RightConstants RightConstants}.</p>
230      *
231      * @param access access level allowed, as defined in {@link RightConstants
232      * RightConstants}
233      */

234     public final void setAccess(final Integer JavaDoc access) {
235         this.access = access;
236     }
237
238     /**
239      * <p>Set the detail, which provides clear text information about this
240      * right.</p>
241      *
242      * @param detail instance providing clear text information about this right
243      */

244     public final void setDetail(final RightDetailDO detail) {
245         this.detail = detail;
246     }
247
248     /**
249      * <p>Set the group who is entitled by this right. Rights in ivata groupware
250      * are allocated on a per-group basis.</p>
251      *
252      * @param group group bean entitled to this right.
253      */

254     public final void setGroup(final GroupDO group) {
255         this.group = group;
256     }
257
258     /**
259      * <p>Set the id of the DO this right targets. Some rights allow a group
260      * access to a specific instance of an EJB. This id is the id of that
261      * instance.</p>
262      *
263      * @param targetId the id of the EJB the right targets, or null if this
264      * right is not specific to a single instance.
265      */

266     public final void setTargetId(final Integer JavaDoc targetId) {
267         this.targetId = targetId;
268     }
269 }
270
Popular Tags