Source Code Cross Referenced for ProfileResourceBean.java in  » Groupware » LibreSource » org » libresource » membership » ejb » 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 » Groupware » LibreSource » org.libresource.membership.ejb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**
002:         * LibreSource
003:         * Copyright (C) 2004-2008 Artenum SARL / INRIA
004:         * http://www.libresource.org - contact@artenum.com
005:         *
006:         * This file is part of the LibreSource software, 
007:         * which can be used and distributed under license conditions.
008:         * The license conditions are provided in the LICENSE.TXT file 
009:         * at the root path of the packaging that enclose this file. 
010:         * More information can be found at 
011:         * - http://dev.libresource.org/home/license
012:         *
013:         * Initial authors :
014:         *
015:         * Guillaume Bort / INRIA
016:         * Francois Charoy / Universite Nancy 2
017:         * Julien Forest / Artenum
018:         * Claude Godart / Universite Henry Poincare
019:         * Florent Jouille / INRIA
020:         * Sebastien Jourdain / INRIA / Artenum
021:         * Yves Lerumeur / Artenum
022:         * Pascal Molli / Universite Henry Poincare
023:         * Gerald Oster / INRIA
024:         * Mariarosa Penzi / Artenum
025:         * Gerard Sookahet / Artenum
026:         * Raphael Tani / INRIA
027:         *
028:         * Contributors :
029:         *
030:         * Stephane Bagnier / Artenum
031:         * Amadou Dia / Artenum-IUP Blois
032:         * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
033:         */package org.libresource.membership.ejb;
034:
035:        import org.libresource.LibresourceResourceBase;
036:
037:        import java.util.Date;
038:        import java.util.HashMap;
039:
040:        import javax.ejb.CreateException;
041:
042:        /**
043:         * LibreSource
044:         *
045:         * @author <a href="mailto:jouille@loria.fr">Florent Jouille</a> - <a href="http://www.inria.fr">INRIA Lorraine</a>
046:         *
047:         * A User Profile of the Membership service
048:         *
049:         * @libresource.resource name="Profile" service="Membership"
050:         *
051:         */
052:        public abstract class ProfileResourceBean extends
053:                LibresourceResourceBase {
054:            /**
055:             * @ejb.create-method
056:             */
057:            public String ejbCreate(String username, String fullName,
058:                    String email, String jabberId, HashMap infos)
059:                    throws CreateException {
060:                // user infos
061:                setId(username);
062:                setFullName(fullName);
063:                setEmail(email);
064:                setJabberId(jabberId);
065:                setInfos(infos);
066:                setAccountStatus(0);
067:                setOnlineStatus(0);
068:
069:                return null;
070:            }
071:
072:            // persistents fields
073:
074:            /**
075:             * @ejb.persistent-field
076:             * @ejb.interface-method
077:             * @ejb.value-object match="libresource"
078:             * @ejb.transaction type="Supports"
079:             */
080:            public abstract String getId();
081:
082:            /**
083:             * @ejb.persistent-field
084:             * @ejb.interface-method
085:             * @ejb.transaction type="Mandatory"
086:             */
087:            public abstract void setId(String id);
088:
089:            /**
090:             * @ejb.interface-method
091:             * @ejb.value-object match="libresource"
092:             * @ejb.transaction type="Supports"
093:             */
094:            public String getShortResourceName() {
095:                String shortName = getFullName();
096:
097:                if ((shortName == null) || (shortName.trim().length() == 0)) {
098:                    shortName = getId();
099:                }
100:
101:                return shortName;
102:            }
103:
104:            /**
105:             * @ejb.persistent-field
106:             * @ejb.interface-method
107:             * @ejb.value-object match="libresource"
108:             * @ejb.transaction type="Supports"
109:             */
110:            public abstract String getFullName();
111:
112:            /**
113:             * @ejb.persistent-field
114:             * @ejb.interface-method
115:             * @ejb.transaction type="Mandatory"
116:             */
117:            public abstract void setFullName(String fullName);
118:
119:            /**
120:             * @ejb.persistent-field
121:             * @ejb.interface-method
122:             * @ejb.value-object match="libresource"
123:             * @ejb.transaction type="Supports"
124:             */
125:            public abstract String getEmail();
126:
127:            /**
128:             * @ejb.persistent-field
129:             * @ejb.interface-method
130:             * @ejb.transaction type="Mandatory"
131:             */
132:            public abstract void setEmail(String email);
133:
134:            /**
135:             * @ejb.persistent-field
136:             * @ejb.interface-method
137:             * @ejb.value-object match="libresource"
138:             * @ejb.transaction type="Supports"
139:             */
140:            public abstract String getJabberId();
141:
142:            /**
143:             * @ejb.persistent-field
144:             * @ejb.interface-method
145:             * @ejb.transaction type="Mandatory"
146:             */
147:            public abstract void setJabberId(String jabberId);
148:
149:            // tigase add-on
150:
151:            /**
152:             * @ejb.persistent-field
153:             * @ejb.interface-method
154:             * @ejb.value-object match="libresource"
155:             * @ejb.transaction type="Supports"
156:             */
157:            public abstract int getAccountStatus();
158:
159:            /**
160:             * @ejb.persistent-field
161:             * @ejb.interface-method
162:             * @ejb.transaction type="Mandatory"
163:             */
164:            public abstract void setAccountStatus(int accountStatus);
165:
166:            /**
167:             * @ejb.persistent-field
168:             * @ejb.interface-method
169:             * @ejb.value-object match="libresource"
170:             * @ejb.transaction type="Supports"
171:             */
172:            public abstract int getOnlineStatus();
173:
174:            /**
175:             * @ejb.persistent-field
176:             * @ejb.interface-method
177:             * @ejb.transaction type="Mandatory"
178:             */
179:            public abstract void setOnlineStatus(int onlineStatus);
180:
181:            /**
182:             * @ejb.persistent-field
183:             * @ejb.interface-method
184:             * @ejb.value-object match="libresource"
185:             * @ejb.transaction type="Supports"
186:             */
187:            public abstract Date getLastLoginTime();
188:
189:            /**
190:             * @ejb.persistent-field
191:             * @ejb.interface-method
192:             * @ejb.transaction type="Mandatory"
193:             */
194:            public abstract void setLastLoginTime(Date lastLoginTime);
195:
196:            /**
197:             * @ejb.persistent-field
198:             * @ejb.interface-method
199:             * @ejb.value-object match="libresource"
200:             * @ejb.transaction type="Supports"
201:             */
202:            public abstract HashMap getInfos();
203:
204:            /**
205:             * @ejb.persistent-field
206:             * @ejb.interface-method
207:             * @ejb.transaction type="Mandatory"
208:             */
209:            public abstract void setInfos(HashMap infos);
210:
211:            // business methods
212:
213:            /**
214:             * @ejb.interface-method
215:             * @ejb.transaction type="Mandatory"
216:             */
217:            public void updateLastLoginTime() {
218:                setLastLoginTime(new Date());
219:            }
220:
221:            /**
222:             * @ejb.interface-method
223:             * @ejb.transaction type="Mandatory"
224:             */
225:            public void setInfo(String key, Object value) {
226:                HashMap infos = getInfos();
227:                infos.put(key, value);
228:                setInfos(infos);
229:            }
230:
231:            /**
232:             * @ejb.interface-method
233:             * @ejb.transaction type="Mandatory"
234:             */
235:            public void removeInfo(String key) {
236:                HashMap infos = getInfos();
237:                infos.remove(key);
238:                setInfos(infos);
239:            }
240:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.