001: /*
002: * Copyright (c) 2001 - 2005 ivata limited.
003: * All rights reserved.
004: * -----------------------------------------------------------------------------
005: * ivata groupware may be redistributed under the GNU General Public
006: * License as published by the Free Software Foundation;
007: * version 2 of the License.
008: *
009: * These programs are free software; you can redistribute them and/or
010: * modify them under the terms of the GNU General Public License
011: * as published by the Free Software Foundation; version 2 of the License.
012: *
013: * These programs are distributed in the hope that they will be useful,
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
016: *
017: * See the GNU General Public License in the file LICENSE.txt for more
018: * details.
019: *
020: * If you would like a copy of the GNU General Public License write to
021: *
022: * Free Software Foundation, Inc.
023: * 59 Temple Place - Suite 330
024: * Boston, MA 02111-1307, USA.
025: *
026: *
027: * To arrange commercial support and licensing, contact ivata at
028: * http://www.ivata.com/contact.jsp
029: * -----------------------------------------------------------------------------
030: * $Log: RightDO.java,v $
031: * Revision 1.4 2005/04/29 02:48:13 colinmacleod
032: * Data bugfixes.
033: * Changed primary key back to Integer.
034: *
035: * Revision 1.3 2005/04/10 20:09:36 colinmacleod
036: * Added new themes.
037: * Changed id type to String.
038: * Changed i tag to em and b tag to strong.
039: * Improved PicoContainerFactory with NanoContainer scripts.
040: *
041: * Revision 1.2 2005/04/09 17:19:07 colinmacleod
042: * Changed copyright text to GPL v2 explicitly.
043: *
044: * Revision 1.1.1.1 2005/03/10 17:50:35 colinmacleod
045: * Restructured ivata op around Hibernate/PicoContainer.
046: * Renamed ivata groupware.
047: *
048: * Revision 1.1 2004/07/13 19:41:14 colinmacleod
049: * Moved project to POJOs from EJBs.
050: * Applied PicoContainer to services layer (replacing session EJBs).
051: * Applied Hibernate to persistence layer (replacing entity EJBs).
052: *
053: * Revision 1.3 2004/03/21 21:16:06 colinmacleod
054: * Shortened name to ivata op.
055: *
056: * Revision 1.2 2004/02/01 22:00:32 colinmacleod
057: * Added full names to author tags
058: *
059: * Revision 1.1.1.1 2004/01/27 20:57:51 colinmacleod
060: * Moved ivata openportal to SourceForge..
061: *
062: * Revision 1.6 2003/11/13 16:03:15 jano
063: * commitng everything to CVS
064: * can deploy and application is ruuning, can login into
065: *
066: * Revision 1.5 2003/11/03 11:28:24 jano
067: * commiting addressbook,
068: * tryinjg to fix deploying problem
069: *
070: * Revision 1.4 2003/10/17 12:36:12 jano
071: * fixing problems with building
072: * converting intranet -> portal
073: * Eclipse building
074: *
075: * Revision 1.3 2003/10/15 13:45:32 jano
076: * converting to XDoclet
077: *
078: * Revision 1.2 2003/10/15 13:18:02 colin
079: * fixing for XDoclet
080: *
081: * Revision 1.3 2003/05/01 12:13:22 jano
082: * tidy up names of sequeneces
083: *
084: * Revision 1.2 2003/02/25 14:38:13 colin
085: * implemented setModified methods on entity beans thro IvataEntityBean superclass
086: *
087: * Revision 1.1 2003/02/24 19:09:21 colin
088: * moved to business
089: *
090: * Revision 1.11 2003/02/04 17:43:45 colin
091: * copyright notice
092: *
093: * Revision 1.10 2003/01/08 17:17:10 jano
094: * fixing bug
095: *
096: * Revision 1.9 2003/01/03 15:42:30 jano
097: * we don't need tempFindTarge...... method, we are using select method
098: *
099: * 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: * <p>Assigns the right to perform a specific action to a group of people. Each
126: * right allows a group to add, amend, view or delete entries from the intranet.
127: * The element which is allowed to be changed by this right is described by the
128: * {@link com.ivata.groupware.adddressbook.person.group.right.detail.RightDetailBean
129: * detail EJB} associated with it.</p>
130: *
131: * @since 2002-05-19
132: * @author Colin MacLeod
133: * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
134: * @see
135: * com.ivata.groupware.adddressbook.person.group.right.detail.RightDetailBean
136: * @see RightConstants
137: * @version $Revision: 1.4 $
138: *
139: * @hibernate.class
140: * table="person_group_right"
141: * @hibernate.cache
142: * usage="read-write"
143: */
144: public class RightDO extends BaseDO {
145: /**
146: * <p>Access level allowed. This will give the group the right to
147: * add, amend, view or delete the associated data, as defined in
148: * {@link RightConstants RightConstants}.</p>
149: */
150: private Integer access;
151:
152: /**
153: * <p>The detail, which provides clear text information about this
154: * right.</p>
155: */
156: private RightDetailDO detail;
157:
158: /**
159: * <p>Group who is entitled by this right. Rights in ivata groupware
160: * are allocated on a per-group basis.</p>
161: */
162: private GroupDO group;
163:
164: /**
165: * <p>Id of the DO this right targets. Some rights allow a group
166: * access to a specific instance of an EJB. This id is the id of that
167: * instance.</p>
168: */
169: private Integer targetId;
170:
171: /**
172: * <p>Get the access level allowed. This will give the group the right to
173: * add, amend, view or delete the associated data, as defined in
174: * {@link RightConstants RightConstants}.</p>
175: *
176: * @return access level allowed, as defined in {@link RightConstants
177: * RightConstants}.
178: *
179: * @hibernate.property
180: * column="access"
181: */
182: public final Integer getAccess() {
183: return access;
184: }
185:
186: /**
187: * <p>Get the detail, which provides clear text information about this
188: * right.</p>
189: *
190: * @return instance providing clear text information about this right
191: *
192: * @hibernate.many-to-one
193: * column="detail"
194: */
195: public final RightDetailDO getDetail() {
196: return detail;
197: }
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: /**
213: * <p>Get the id of the DO this right targets. Some rights allow a group
214: * access to a specific instance of an EJB. This id is the id of that
215: * instance.</p>
216: *
217: * @return the id of the EJB the right targets, or null if this right is not
218: * specific to a single instance.
219: *
220: * @hibernate.property
221: * column="target_id"
222: */
223: public final Integer getTargetId() {
224: return targetId;
225: }
226:
227: /**
228: * <p>Set the access level allowed. This will give the group the right to
229: * add, amend, view or delete the associated data, as defined in
230: * {@link RightConstants RightConstants}.</p>
231: *
232: * @param access access level allowed, as defined in {@link RightConstants
233: * RightConstants}
234: */
235: public final void setAccess(final Integer access) {
236: this .access = access;
237: }
238:
239: /**
240: * <p>Set the detail, which provides clear text information about this
241: * right.</p>
242: *
243: * @param detail instance providing clear text information about this right
244: */
245: public final void setDetail(final RightDetailDO detail) {
246: this .detail = detail;
247: }
248:
249: /**
250: * <p>Set the group who is entitled by this right. Rights in ivata groupware
251: * are allocated on a per-group basis.</p>
252: *
253: * @param group group bean entitled to this right.
254: */
255: public final void setGroup(final GroupDO group) {
256: this .group = group;
257: }
258:
259: /**
260: * <p>Set the id of the DO this right targets. Some rights allow a group
261: * access to a specific instance of an EJB. This id is the id of that
262: * instance.</p>
263: *
264: * @param targetId the id of the EJB the right targets, or null if this
265: * right is not specific to a single instance.
266: */
267: public final void setTargetId(final Integer targetId) {
268: this.targetId = targetId;
269: }
270: }
|