1 5 package org.exoplatform.services.organization.impl; 6 7 import java.util.HashMap ; 8 import java.util.Map ; 9 10 import org.exoplatform.services.organization.UserProfile; 11 18 public class UserProfileImpl implements UserProfile { 19 private String userName ; 20 private Map attributes ; 21 22 public UserProfileImpl() { 23 attributes = new HashMap () ; 24 } 25 26 public UserProfileImpl(String userName , Map map) { 27 this.userName = userName ; 28 attributes = map; 29 } 30 31 public String getUserName() { return userName ; } 32 public void setUserName(String s) { userName = s; } 33 34 public Map getUserInfoMap() { 35 if(attributes == null) attributes = new HashMap () ; 36 return this.attributes ; 37 } 38 39 public void setUserInfoMap(Map map) { this.attributes = map ; } 40 41 public String getAttribute(String attName){ 42 return (String ) attributes.get(attName); 43 } 44 45 public void setAttribute(String key, String value){ 46 attributes.put(key, value); 47 } 48 } | Popular Tags |