KickJava   Java API By Example, From Geeks To Geeks.

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


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: GroupConstants.java,v $
31  * Revision 1.5 2005/04/29 02:48:13 colinmacleod
32  * Data bugfixes.
33  * Changed primary key back to Integer.
34  *
35  * Revision 1.4 2005/04/28 18:47:10 colinmacleod
36  * Fixed XHMTL, styles and resin compatibility.
37  * Added support for URL rewriting.
38  *
39  * Revision 1.3 2005/04/10 20:09:36 colinmacleod
40  * Added new themes.
41  * Changed id type to String.
42  * Changed i tag to em and b tag to strong.
43  * Improved PicoContainerFactory with NanoContainer scripts.
44  *
45  * Revision 1.2 2005/04/09 17:19:07 colinmacleod
46  * Changed copyright text to GPL v2 explicitly.
47  *
48  * Revision 1.1.1.1 2005/03/10 17:50:31 colinmacleod
49  * Restructured ivata op around Hibernate/PicoContainer.
50  * Renamed ivata groupware.
51  *
52  * Revision 1.3 2004/07/13 19:41:13 colinmacleod
53  * Moved project to POJOs from EJBs.
54  * Applied PicoContainer to services layer (replacing session EJBs).
55  * Applied Hibernate to persistence layer (replacing entity EJBs).
56  *
57  * Revision 1.2 2004/03/21 21:16:06 colinmacleod
58  * Shortened name to ivata op.
59  *
60  * Revision 1.1.1.1 2004/01/27 20:57:51 colinmacleod
61  * Moved ivata openportal to SourceForge..
62  *
63  * Revision 1.3 2003/10/17 12:36:12 jano
64  * fixing problems with building
65  * converting intranet -> portal
66  * Eclipse building
67  *
68  * Revision 1.2 2003/10/15 13:18:02 colin
69  * fixing for XDoclet
70  *
71  * Revision 1.3 2003/08/05 14:57:35 jano
72  * addressBook extension
73  *
74  * Revision 1.2 2003/07/25 11:42:11 jano
75  * adding functionality for addressBook extension
76  *
77  * Revision 1.1 2003/02/24 19:09:21 colin
78  * moved to business
79  *
80  * Revision 1.3 2003/02/04 17:43:45 colin
81  * copyright notice
82  *
83  * Revision 1.2 2002/12/03 15:25:36 jano
84  * we have new group - "USER" it's mandatory group
85  *
86  * Revision 1.1 2002/09/27 12:53:07 jano
87  * constants of GROUP
88  * -----------------------------------------------------------------------------
89  */

90 package com.ivata.groupware.business.addressbook.person.group;
91
92 /**
93  * <p>Store all the constants for groups.</p>
94  *
95  * @since 2002-09-26
96  * @author jano
97  * @version $Revision: 1.5 $
98  */

99 public class GroupConstants {
100
101     /**
102      * <p>Administrator group, this group can not be deleted.</p>
103      */

104     public final static Integer JavaDoc GROUP_ADMINISTRATOR = new Integer JavaDoc(1);
105     /**
106      * <p>User group. Each USER is int this group, this group can not be deleted.</p>
107      */

108     public final static Integer JavaDoc USER_GROUP = new Integer JavaDoc(2);
109
110     /**
111      * <p>each user has privete group, so those user groups are under this group</p>
112      */

113     public final static Integer JavaDoc USER_GROUP_PRIVATE = new Integer JavaDoc(3);
114
115     /**
116      * <p>This group contain addressBooks groups - private and public.</p>
117      */

118     public final static Integer JavaDoc ADDRESS_BOOK = new Integer JavaDoc(4);
119     /**
120      * <p>This group contain private addressBooks - one for each user.</p>
121      */

122     public final static Integer JavaDoc ADDRESS_BOOK_PRIVATE = new Integer JavaDoc(5);
123     /**
124      * <p>This group contain public addressBooks</p>
125      */

126     public final static Integer JavaDoc ADDRESS_BOOK_PUBLIC = new Integer JavaDoc(6);
127     /**
128      * <p>This is a default address book, present when the system is initially
129      * created. Everyone can see this address book.</p>
130      */

131     public final static Integer JavaDoc ADDRESS_BOOK_DEFAULT = new Integer JavaDoc(7);
132     public static boolean equals(
133             final Integer JavaDoc compareID,
134             final Integer JavaDoc constantGroupID) {
135         // none of the constants are null!
136
assert (constantGroupID != null);
137         if (compareID == null) {
138             return false;
139         }
140         return constantGroupID.equals(compareID);
141     }
142 }
143
Popular Tags