001: /******************************************************************************
002: * JBoss, a division of Red Hat *
003: * Copyright 2006, Red Hat Middleware, LLC, and individual *
004: * contributors as indicated by the @authors tag. See the *
005: * copyright.txt in the distribution for a full listing of *
006: * individual contributors. *
007: * *
008: * This is free software; you can redistribute it and/or modify it *
009: * under the terms of the GNU Lesser General Public License as *
010: * published by the Free Software Foundation; either version 2.1 of *
011: * the License, or (at your option) any later version. *
012: * *
013: * This software is distributed in the hope that it will be useful, *
014: * but WITHOUT ANY WARRANTY; without even the implied warranty of *
015: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
016: * Lesser General Public License for more details. *
017: * *
018: * You should have received a copy of the GNU Lesser General Public *
019: * License along with this software; if not, write to the Free *
020: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
021: * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
022: ******************************************************************************/package org.jboss.portal.core.identity.services.workflow;
023:
024: import java.io.Serializable;
025: import java.util.List;
026: import java.util.Map;
027:
028: import org.jboss.portal.identity.User;
029:
030: /**
031: * @author <a href="mailto:emuckenh@redhat.com">Emanuel Muckenhuber</a>
032: * @version $Revision$
033: */
034: public class UserContainer implements Serializable {
035: /** The serialVersionUID */
036: private static final long serialVersionUID = 7703409026217713647L;
037:
038: /** The jBPM process id */
039: private String processId;
040:
041: /** The identity userName */
042: private String username;
043:
044: /** The password */
045: private String password;
046:
047: /** The profile Map */
048: private Map profileMap;
049:
050: /** The assigned roles */
051: private List roles;
052:
053: /** Is selected */
054: private boolean selected = false;
055:
056: /** The current node */
057: private String currentNode;
058:
059: public UserContainer(User user) {
060: this .username = user.getUserName();
061: }
062:
063: public UserContainer(String username, String password,
064: Map profileMap, List roles) {
065: this .username = username;
066: this .password = password;
067: this .profileMap = profileMap;
068: this .roles = roles;
069: }
070:
071: public String getUsername() {
072: return username;
073: }
074:
075: public void setUsername(String username) {
076: this .username = username;
077: }
078:
079: public String getPassword() {
080: return password;
081: }
082:
083: public void setPassword(String password) {
084: this .password = password;
085: }
086:
087: public String getProcessId() {
088: return processId;
089: }
090:
091: public void setProcessId(String processId) {
092: this .processId = processId;
093: }
094:
095: public Map getProfileMap() {
096: return profileMap;
097: }
098:
099: public void setProfileMap(Map profileMap) {
100: this .profileMap = profileMap;
101: }
102:
103: public List getRoles() {
104: return roles;
105: }
106:
107: public void setRoles(List roles) {
108: this .roles = roles;
109: }
110:
111: public boolean isSelected() {
112: return selected;
113: }
114:
115: public void setSelected(boolean selected) {
116: this .selected = selected;
117: }
118:
119: public String getCurrentNode() {
120: return currentNode;
121: }
122:
123: public void setCurrentNode(String currentNode) {
124: this .currentNode = currentNode;
125: }
126:
127: public String getEmail() {
128: return (String) this .profileMap.get(User.INFO_USER_EMAIL_REAL);
129: }
130:
131: public String getRegistrationDate() {
132: Object obj = this.profileMap
133: .get(User.INFO_USER_REGISTRATION_DATE);
134: return obj != null ? obj.toString() : null;
135: }
136: }
|