KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > services > organization > impl > UserProfileImpl


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.impl;
6
7 import java.util.HashMap JavaDoc;
8 import java.util.Map JavaDoc;
9
10 import org.exoplatform.services.organization.UserProfile;
11 /**
12  * Created by The eXo Platform SARL
13  * Author : Mestrallet Benjamin
14  * benjmestrallet@users.sourceforge.net
15  * Date: Aug 21, 2003
16  * Time: 3:22:54 PM
17  */

18 public class UserProfileImpl implements UserProfile {
19     private String JavaDoc userName ;
20   private Map JavaDoc attributes ;
21
22   public UserProfileImpl() {
23     attributes = new HashMap JavaDoc() ;
24   }
25   
26   public UserProfileImpl(String JavaDoc userName , Map JavaDoc map) {
27     this.userName = userName ;
28     attributes = map;
29   }
30
31   public String JavaDoc getUserName() { return userName ; }
32   public void setUserName(String JavaDoc s) { userName = s; }
33   
34   public Map JavaDoc getUserInfoMap() {
35     if(attributes == null) attributes = new HashMap JavaDoc() ;
36     return this.attributes ;
37   }
38   
39   public void setUserInfoMap(Map JavaDoc map) { this.attributes = map ; }
40   
41   public String JavaDoc getAttribute(String JavaDoc attName){
42     return (String JavaDoc) attributes.get(attName);
43   }
44
45   public void setAttribute(String JavaDoc key, String JavaDoc value){
46     attributes.put(key, value);
47   }
48 }
Popular Tags