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


001:        /*
002:         * Copyright 2007 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.module.chart.lookup;
017:
018:        import java.util.Map;
019:        import java.util.Properties;
020:
021:        import org.kuali.core.bo.BusinessObject;
022:        import org.kuali.core.lookup.KualiLookupableHelperServiceImpl;
023:        import org.kuali.core.util.UrlFactory;
024:        import org.kuali.kfs.KFSConstants;
025:        import org.kuali.module.chart.bo.DelegateGlobal;
026:
027:        /**
028:         * This class overrides the getBackLocation, getReturnUrl, setFieldConversions and getActionUrls for
029:         * {@link OrganizationRoutingModelName}
030:         */
031:        public class OrganizationRoutingModelNameLookupableHelperServiceImpl
032:                extends KualiLookupableHelperServiceImpl {
033:            private boolean initializingDelegate = true;
034:
035:            /**
036:             * Overrides the base implementation to always return to {@link KFSConstants.MAINTENANCE_ACTION}
037:             * 
038:             * @see org.kuali.core.lookup.AbstractLookupableHelperServiceImpl#getBackLocation()
039:             */
040:            @Override
041:            public String getBackLocation() {
042:                // it doesn't really matter what the backLocation is set to; we're
043:                // always going to return to the maintenance screen
044:                return KFSConstants.MAINTENANCE_ACTION;
045:            }
046:
047:            /**
048:             * Overrides the base implementation to add in new parameters to the return url
049:             * <ul>
050:             * <li>{@link KFSConstants.DISPATCH_REQUEST_PARAMETER}</li>
051:             * <li>{@link KFSConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE}</li>
052:             * <li>{@link KFSConstants.OVERRIDE_KEYS}</li>
053:             * </ul>
054:             * {@link KFSConstants.DISPATCH_REQUEST_PARAMETER}
055:             * 
056:             * @see org.kuali.core.lookup.AbstractLookupableHelperServiceImpl#getReturnUrl(org.kuali.core.bo.BusinessObject, java.util.Map,
057:             *      java.lang.String)
058:             */
059:            @Override
060:            public String getReturnUrl(BusinessObject businessObject,
061:                    Map fieldConversions, String lookupImpl) {
062:                Properties parameters = getParameters(businessObject,
063:                        fieldConversions, lookupImpl);
064:                parameters.put(KFSConstants.DISPATCH_REQUEST_PARAMETER,
065:                        KFSConstants.MAINTENANCE_NEWWITHEXISTING_ACTION);
066:                parameters.put(KFSConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE,
067:                        DelegateGlobal.class.getName());
068:                parameters.put(KFSConstants.OVERRIDE_KEYS, "modelName"
069:                        + KFSConstants.FIELD_CONVERSIONS_SEPERATOR
070:                        + "modelChartOfAccountsCode"
071:                        + KFSConstants.FIELD_CONVERSIONS_SEPERATOR
072:                        + "modelOrganizationCode");
073:                return UrlFactory.parameterizeUrl(
074:                        KFSConstants.MAINTENANCE_ACTION, parameters);
075:            }
076:
077:            /**
078:             * Overrides base implementation to determine whether or not we are dealing with looking up the model or editing it
079:             * 
080:             * @see org.kuali.core.lookup.AbstractLookupableHelperServiceImpl#setFieldConversions(java.util.Map)
081:             */
082:            @Override
083:            public void setFieldConversions(Map fieldConversions) {
084:                super .setFieldConversions(fieldConversions);
085:                if (fieldConversions == null || fieldConversions.size() == 0) {
086:                    // if we don't have any field conversions, then we must be
087:                    // actually dealing with the model, instead of looking up the model
088:                    // in order to initalize a new global account delegate
089:                    //
090:                    // yeah, it's a hack...but at least a semi-clever hack
091:                    initializingDelegate = false;
092:                }
093:            }
094:
095:            /**
096:             * Overrides base implementation to remove the action urls if we are initializing the delegate model
097:             * 
098:             * @see org.kuali.core.lookup.AbstractLookupableHelperServiceImpl#getActionUrls(org.kuali.core.bo.BusinessObject)
099:             */
100:            @Override
101:            public String getActionUrls(BusinessObject businessObject) {
102:                if (!initializingDelegate) {
103:                    return super .getActionUrls(businessObject);
104:                } else {
105:                    return "";
106:                }
107:            }
108:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.