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


01:        /*
02:         * Copyright 2006-2007 The Kuali Foundation.
03:         * 
04:         * Licensed under the Educational Community License, Version 1.0 (the "License");
05:         * you may not use this file except in compliance with the License.
06:         * You may obtain a copy of the License at
07:         * 
08:         * http://www.opensource.org/licenses/ecl1.php
09:         * 
10:         * Unless required by applicable law or agreed to in writing, software
11:         * distributed under the License is distributed on an "AS IS" BASIS,
12:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13:         * See the License for the specific language governing permissions and
14:         * limitations under the License.
15:         */
16:        package org.kuali.module.cg.bo;
17:
18:        import org.kuali.core.bo.user.KualiModuleUserBase;
19:        import org.kuali.core.bo.user.UniversalUser;
20:        import org.kuali.kfs.KFSPropertyConstants;
21:        import org.kuali.module.chart.bo.ChartUser;
22:
23:        /**
24:         * This class allows behaviors to be defined for users within the CG module specifically.
25:         */
26:        public class CgUser extends KualiModuleUserBase {
27:
28:            public static final String MODULE_ID = "cg";
29:
30:            /**
31:             * Constructs a CgUser object.
32:             * 
33:             * @param user The universal user object to be assigned to this object.
34:             */
35:            public CgUser(UniversalUser user) {
36:                super (MODULE_ID, user);
37:            }
38:
39:            /**
40:             * Returns the active flag from the embedded ChartUser object.
41:             * 
42:             * @see org.kuali.core.bo.user.KualiModuleUser#isActive()
43:             */
44:            @Override
45:            public boolean isActive() {
46:                if (getUniversalUser() == null)
47:                    return false;
48:                String activeStatus = getUniversalUser().getModuleProperties(
49:                        ChartUser.MODULE_ID).get(KFSPropertyConstants.ACTIVE);
50:                return activeStatus != null && activeStatus.equals("Y");
51:            }
52:
53:            /**
54:             * Returns a flag identifying if the new user object is different from the old user object passed in. This determination is made
55:             * using the following criteria:
56:             * <ul>
57:             * <li>Calling super.isModified()</li>
58:             * <li>Checking that the old record is null and the new record is active</li>
59:             * <li>Check that the old record is not null and the active indicator on the old record does not match the active indicator on
60:             * the new record.</li>
61:             * </ul>
62:             * 
63:             * @param oldRecord Old universal user object
64:             * @param newRecord New universal user object
65:             * @see org.kuali.core.bo.user.KualiModuleUserBase#isModified(org.kuali.core.bo.user.UniversalUser,
66:             *      org.kuali.core.bo.user.UniversalUser)
67:             */
68:            @Override
69:            public boolean isModified(UniversalUser oldRecord,
70:                    UniversalUser newRecord) {
71:                boolean isThisModuleUserForNewRecordActive = "Y"
72:                        .equals(newRecord.getModuleProperties(
73:                                ChartUser.MODULE_ID).get(
74:                                KFSPropertyConstants.ACTIVE));
75:                return super .isModified(oldRecord, newRecord)
76:                        || (oldRecord == null && isThisModuleUserForNewRecordActive)
77:                        || (oldRecord != null && oldRecord.getModuleUser(
78:                                MODULE_ID).isActive() != isThisModuleUserForNewRecordActive);
79:            }
80:
81:            /**
82:             * This method throws an UnsupportedOperationException if called because setActive is not supported on this object type.
83:             * 
84:             * @param active The active indicator value to be set.
85:             * @exception UnsupportedOperationException Thrown if this method is ever called, because the defined functionality is not
86:             *            supported by this object.
87:             * @see org.kuali.core.bo.user.KualiModuleUserBase#setActive(boolean)
88:             */
89:            @Override
90:            public void setActive(boolean active) {
91:                throw new UnsupportedOperationException(
92:                        "setActive is not supported on "
93:                                + this .getClass().getSimpleName() + " objects");
94:            }
95:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.