001 package org.rakeshv.xml.addressbook;
002
003 import java.util.List;
004
005 /**
006 * A <code>bean</code> that represents a email group entry in the
007 * address book XML file.
008 *
009 * <p>Copyright 2003 Rakesh Vidyadharan</p>
010 *
011 * @author Rakesh Vidyadharan 2003 February 12
012 * @version $Id: Group.java,v 1.3 2004/05/26 11:42:40 rakesh Exp $
013 */
014 public class Group extends Object
015 {
016 /**
017 * The name of the email group.
018 */
019 private String nickname = null;
020
021 /**
022 * A description of the group.
023 */
024 private String description = null;
025
026 /**
027 * The list of {@link Member} beans that together constitute the
028 * email group.
029 */
030 private List members;
031
032 /**
033 * Default constructor. Simply serves to obtain an instance of the
034 * class, which can then be populated by invoking the class
035 * mutator methods.
036 */
037 public Group()
038 {
039 super();
040 }
041
042 /**
043 * Create a new instance of the class with the specified {@link
044 * #nickname}.
045 *
046 * @param nickname - The {@link #nickname} value to set.
047 */
048 public Group( String nickname )
049 {
050 this.nickname = nickname;
051 }
052
053 /**
054 * Create a new instance of the class with the specified {@link
055 * #nickname} and the specified list of {@link #members}.
056 *
057 * @param nickname - The {@link #nickname} value to set.
058 * @param members - The {@link #members} value to set.
059 */
060 public Group( String nickname, List members )
061 {
062 this.nickname = nickname;
063 this.members = members;
064 }
065
066 /**
067 * Create a new instance of the class with the specified {@link
068 * #nickname}, {@link #description} and the specified list of {@link
069 * #members}.
070 *
071 * @param nickname - The {@link #nickname} value to set.
072 * @param description - The {@link #description} value to set.
073 * @param members - The {@link #members} value to set.
074 */
075 public Group( String nickname, String description, List members )
076 {
077 this.nickname = nickname;
078 this.description = description;
079 this.members = members;
080 }
081
082 /**
083 * Return the value/reference of the {@link #nickname}.
084 *
085 * @return String - The value/reference of nickname.
086 */
087 public final String getNickname()
088 {
089 return nickname;
090 }
091
092 /**
093 * Set the value of {@link #nickname}.
094 *
095 * @param nickname - The value to set.
096 */
097 public final void setNickname(String nickname)
098 {
099 this.nickname = nickname;
100 }
101
102 /**
103 * Return the value/reference of the {@link #members}.
104 *
105 * @return List - The value/reference of members.
106 */
107 public final List getMembers()
108 {
109 return members;
110 }
111
112 /**
113 * Set the value of {@link #members}.
114 *
115 * @param members - The value to set.
116 */
117 public final void setMembers(List members)
118 {
119 this.members = members;
120 }
121
122 /**
123 * Return the value/reference of the {@link #description}.
124 *
125 * @return String - The value/reference of description.
126 */
127 public final String getDescription()
128 {
129 return description;
130 }
131
132 /**
133 * Set the value of {@link #description}.
134 *
135 * @param description - The value to set.
136 */
137 public final void setDescription(String description)
138 {
139 this.description = description;
140 }
141 }