01: /**
02: * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE, version 2.1, dated February 1999.
03: *
04: * This program is free software; you can redistribute it and/or modify
05: * it under the terms of the latest version of the GNU Lesser General
06: * Public License as published by the Free Software Foundation;
07: *
08: * This program is distributed in the hope that it will be useful,
09: * but WITHOUT ANY WARRANTY; without even the implied warranty of
10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11: * GNU Lesser General Public License for more details.
12: *
13: * You should have received a copy of the GNU Lesser General Public License
14: * along with this program (LICENSE.txt); if not, write to the Free Software
15: * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16: */package org.jamwiki.model;
17:
18: import org.jamwiki.utils.WikiLogger;
19:
20: /**
21: * Provides an object representing a Wiki group.
22: */
23: public class WikiGroup {
24:
25: private static final WikiLogger logger = WikiLogger
26: .getLogger(WikiGroup.class.getName());
27: private String description = null;
28: private int groupId = -1;
29: private String name = null;
30:
31: public static final String GROUP_ANONYMOUS = "GROUP_ANONYMOUS";
32: public static final String GROUP_REGISTERED_USER = "GROUP_REGISTERED_USER";
33:
34: /**
35: *
36: */
37: public WikiGroup() {
38: }
39:
40: /**
41: *
42: */
43: public String getDescription() {
44: return this .description;
45: }
46:
47: /**
48: *
49: */
50: public void setDescription(String description) {
51: this .description = description;
52: }
53:
54: /**
55: *
56: */
57: public int getGroupId() {
58: return this .groupId;
59: }
60:
61: /**
62: *
63: */
64: public void setGroupId(int groupId) {
65: this .groupId = groupId;
66: }
67:
68: /**
69: * Retrieve the group name. Group names are returned in uppercase.
70: */
71: public String getName() {
72: return (this .name == null) ? null : this .name.toUpperCase();
73: }
74:
75: /**
76: * Set the group name. Group names will be forced to uppercase.
77: */
78: public void setName(String name) {
79: this.name = ((name == null) ? null : name.toUpperCase());
80: }
81: }
|