Source Code Cross Referenced for AuthenticationUserId.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » core » bo » 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 » ERP CRM Financial » Kuali Financial System » org.kuali.core.bo.user 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005-2006 The Kuali Foundation.
003:         * 
004:         * Licensed under the Educational Community License, Version 1.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         * 
008:         * http://www.opensource.org/licenses/ecl1.php
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package org.kuali.core.bo.user;
017:
018:        import java.io.Serializable;
019:
020:        /**
021:         * This class is to hold our users network ids and wrap them in a strongly typed object
022:         * 
023:         * 
024:         */
025:        public final class AuthenticationUserId implements  UserId, Serializable {
026:            private static final long serialVersionUID = 2540727071768501528L;
027:
028:            public static final AuthenticationUserId NOT_FOUND = new AuthenticationUserId(
029:                    "not found");
030:
031:            private String authenticationId;
032:
033:            /**
034:             * Constructor that takes in a string authenticationId
035:             * 
036:             * @param authenticationId
037:             */
038:            public AuthenticationUserId(String authenticationId) {
039:                setAuthenticationId(authenticationId);
040:            }
041:
042:            /**
043:             * Empty constructor, available to support standard bean activity
044:             * 
045:             */
046:            public AuthenticationUserId() {
047:            }
048:
049:            /**
050:             * getter which returns the string authenticationId
051:             * 
052:             * @return
053:             */
054:            public String getAuthenticationId() {
055:                return authenticationId;
056:            }
057:
058:            /**
059:             * setter which takes the string authenticationId
060:             * 
061:             * @param authenticationId
062:             */
063:            public void setAuthenticationId(String authenticationId) {
064:                this .authenticationId = (authenticationId == null ? null
065:                        : authenticationId.trim());
066:            }
067:
068:            /**
069:             * Returns true if this userId has an empty value. Empty userIds can't be used as keys in a Hash, among other things.
070:             * 
071:             * @return true if this instance doesn't have a value
072:             */
073:            public boolean isEmpty() {
074:                return (authenticationId == null || authenticationId.trim()
075:                        .length() == 0);
076:            }
077:
078:            /**
079:             * override equals so that we can compare authenticationIds If you make this class non-final, you must rewrite equals to work
080:             * for subclasses.
081:             */
082:            public boolean equals(Object obj) {
083:                boolean isEqual = false;
084:
085:                if (obj != null && (obj instanceof  AuthenticationUserId)) {
086:                    AuthenticationUserId a = (AuthenticationUserId) obj;
087:
088:                    if (getAuthenticationId() == null) {
089:                        return false;
090:                    }
091:
092:                    return authenticationId.equals(a.authenticationId);
093:                }
094:
095:                return false;
096:            }
097:
098:            /**
099:             * override hashCode because we overrode equals
100:             */
101:            public int hashCode() {
102:                return authenticationId == null ? 0 : authenticationId
103:                        .hashCode();
104:            }
105:
106:            /**
107:             * override toString so that it prints out the authenticationId String
108:             */
109:            public String toString() {
110:                return authenticationId;
111:            }
112:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.