Example #1
0
  /* (non-Javadoc)
   * @see net.sf.gilead.test.domain.stateless.IGroup#addMember(net.sf.gilead.test.domain.IUser)
   */
  public void addMember(IUser user) {
    if (members == null) {
      members = new HashSet<IUser>();
    }

    if (members.contains(user) == false) {
      members.add(user);
      user.addToGroup(this);
    }
  }
Example #2
0
 /* (non-Javadoc)
  * @see net.sf.gilead.test.domain.stateless.IGroup#removeMember(net.sf.gilead.test.domain.IUser)
  */
 public void removeMember(IUser user) {
   if ((members != null) && (members.contains(user))) {
     members.remove(user);
     user.removeUserFromGroup(this);
   }
 }