KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > organization > hibernate > NewUserConfig


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.services.organization.hibernate;
6
7 import java.util.ArrayList JavaDoc;
8 import java.util.HashSet JavaDoc;
9 import java.util.List JavaDoc;
10 /**
11  * @author Tuan Nguyen (tuan08@users.sourceforge.net)
12  * @since Oct 27, 2004
13  * @version $Id: NewUserConfig.java,v 1.1 2004/10/28 15:36:43 tuan08 Exp $
14  */

15 public class NewUserConfig {
16   private List JavaDoc role ;
17   private List JavaDoc group ;
18   private HashSet JavaDoc ignoredUser ;
19   
20   public NewUserConfig() {
21     role = new ArrayList JavaDoc(3) ;
22     group = new ArrayList JavaDoc(3) ;
23     ignoredUser = new HashSet JavaDoc() ;
24   }
25   
26   public List JavaDoc getRole() { return role ; }
27   public List JavaDoc getGroup() { return group ; }
28   public HashSet JavaDoc getIgnoredUser() { return ignoredUser ; }
29   public void setIgnoredUser(String JavaDoc user) { ignoredUser.add(user) ; }
30   
31   public boolean isIgnoreUser(String JavaDoc user) { return ignoredUser.contains(user) ; }
32   
33   static public class JoinGroup {
34     public String JavaDoc groupId ;
35     public String JavaDoc membership ;
36     public boolean validateGroupId = true ;
37     public boolean validateMembership = true ;
38     
39     public JoinGroup() {
40     }
41     
42     public String JavaDoc getGroupId() { return groupId ; }
43     public void setGroupId(String JavaDoc s) { groupId = s ; }
44     
45     public String JavaDoc getMembership() { return membership ; }
46     public void setMembership(String JavaDoc s) { membership = s ; }
47     
48     public boolean getValidateGroupId() { return validateGroupId ; }
49     public void setValidateGroupId(boolean b) { validateGroupId = b ; }
50     public void setValidateGroupId(String JavaDoc b) { validateGroupId = "true".equals(b) ; }
51     
52     public boolean getValidateMembership() { return validateMembership ; }
53     public void setValidateMembership(boolean b) { validateMembership = b ; }
54     public void setValidateMembership(String JavaDoc b) { validateMembership = "true".equals(b) ; }
55   }
56 }
Popular Tags