Source Code Cross Referenced for DefaultUserBase.java in  » Workflow-Engines » bonita-v3.1 » hero » user » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » bonita v3.1 » hero.user 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package hero.user;
002:
003:        /**
004:         *
005:         * Bonita
006:         * Copyright (C) 1999 Bull S.A.
007:         * Bull 68 route de versailles  78434 Louveciennes Cedex France
008:         * Further information: bonita@objectweb.org
009:         *
010:         * This library is free software; you can redistribute it and/or
011:         * modify it under the terms of the GNU Lesser General Public
012:         * License as published by the Free Software Foundation; either
013:         * version 2.1 of the License, or any later version.
014:         *
015:         * This library is distributed in the hope that it will be useful,
016:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
017:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
018:         * Lesser General Public License for more details.
019:         *
020:         * You should have received a copy of the GNU Lesser General Public
021:         * License along with this library; if not, write to the Free Software
022:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
023:         * USA
024:         *
025:         *
026:         --------------------------------------------------------------------------
027:         * $Id: DefaultUserBase.java,v 1.3 2005/11/15 15:22:31 dparisek Exp $
028:         *
029:         --------------------------------------------------------------------------
030:         */
031:        import hero.interfaces.BnUserLocal;
032:        import hero.interfaces.BnUserLocalHome;
033:        import javax.ejb.FinderException;
034:
035:        import java.util.ArrayList;
036:        import java.util.Collection;
037:        import java.util.Iterator;
038:        import java.util.Map;
039:        import java.util.Hashtable;
040:
041:        public class DefaultUserBase implements  UserBase {
042:            /**
043:             * 
044:             */
045:            private String url;
046:            private String user;
047:            private String password;
048:            private String driver;
049:
050:            public DefaultUserBase() {
051:
052:            }
053:
054:            /* (non-Javadoc)
055:             * @see hero.util.user.UserBase#getUserName(java.lang.String)
056:             */
057:            public String getUserName(String userId) throws UserBaseException {
058:                return userId;
059:            }
060:
061:            /* (non-Javadoc)
062:             * @see hero.util.user.UserBase#getUserInfos(java.lang.String)
063:             */
064:            public Map getUserInfos(String userId) throws UserBaseException {
065:                Hashtable uinfos = new Hashtable();
066:                try {
067:                    BnUserLocalHome userhome = hero.interfaces.BnUserUtil
068:                            .getLocalHome();
069:                    BnUserLocal user = userhome.findByName(userId);
070:                    uinfos.put("name", userId);
071:                    if (user.getPassword() != null)
072:                        uinfos.put("password", user.getPassword());
073:                    if (user.getEmail() != null)
074:                        uinfos.put("email", user.getEmail());
075:                    if (user.getJabber() != null)
076:                        uinfos.put("jabber", user.getJabber());
077:                    return uinfos;
078:                } catch (javax.naming.NamingException ne) {
079:                    throw new UserBaseException(ne.getMessage());
080:                } catch (FinderException fe) {
081:                    throw new UserBaseException(fe.getMessage());
082:                }
083:            }
084:
085:            /* (non-Javadoc)
086:             * @see hero.util.user.UserBase#getUserInfos(java.lang.String)
087:             */
088:            public Collection getUsers() throws UserBaseException {
089:                try {
090:                    Collection allUsers = new ArrayList();
091:                    BnUserLocalHome userhome = hero.interfaces.BnUserUtil
092:                            .getLocalHome();
093:                    Collection users = userhome.findAll();
094:                    Iterator i = users.iterator();
095:                    while (i.hasNext()) {
096:                        Hashtable uinfos = new Hashtable();
097:                        BnUserLocal user = (BnUserLocal) i.next();
098:                        uinfos.put("name", user.getName());
099:                        allUsers.add(uinfos);
100:                    }
101:                    return allUsers;
102:                } catch (javax.naming.NamingException ne) {
103:                    throw new UserBaseException(ne.getMessage());
104:                } catch (FinderException fe) {
105:                    throw new UserBaseException(fe.getMessage());
106:                }
107:            }
108:
109:            /* (non-Javadoc)
110:             * @see hero.util.user.UserBase#handle(java.lang.String)
111:             */
112:            public boolean handle(String userId) throws UserBaseException {
113:                // TODO Auto-generated method stub
114:                return false;
115:            }
116:
117:            /* (non-Javadoc)
118:             * @see hero.util.user.UserBase#isMutable()
119:             */
120:            public boolean isMutable() {
121:                return true;
122:            }
123:
124:            /* (non-Javadoc)
125:             * @see hero.util.user.UserBase#create(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
126:             */
127:            public void create(String userId, String password, String userName,
128:                    String userEmail, Map userInfos) throws UserBaseException,
129:                    ImmutableException {
130:            }
131:
132:            /* (non-Javadoc)
133:             * @see hero.util.user.UserBase#edit(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map)
134:             */
135:            public void edit(String userId, String password, String userName,
136:                    String userEmail, Map userInfos) throws UserBaseException,
137:                    ImmutableException {
138:                // TODO Auto-generated method stub
139:            }
140:
141:            /* (non-Javadoc)
142:             * @see hero.util.user.UserBase#deleteUser(java.lang.String)
143:             */
144:            public void deleteUser(String userId) throws UserBaseException,
145:                    ImmutableException {
146:                // TODO Auto-generated method stub
147:            }
148:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.