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


001:        /*
002:         * Copyright 2005-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.service.impl;
017:
018:        import java.util.List;
019:
020:        import org.apache.commons.lang.StringUtils;
021:        import org.kuali.core.util.spring.Cached;
022:        import org.kuali.kfs.KFSConstants.ChartApcParms;
023:        import org.kuali.kfs.context.SpringContext;
024:        import org.kuali.kfs.service.ParameterService;
025:        import org.kuali.module.chart.bo.Org;
026:        import org.kuali.module.chart.dao.OrganizationDao;
027:        import org.kuali.module.chart.service.ChartService;
028:        import org.kuali.module.chart.service.OrganizationService;
029:        import org.springframework.transaction.annotation.Transactional;
030:
031:        /**
032:         * This class is the service implementation for the Org structure. This is the default implementation, that is delivered with Kuali.
033:         */
034:        @Transactional
035:        public class OrganizationServiceImpl implements  OrganizationService {
036:            private OrganizationDao organizationDao;
037:            private ParameterService parameterService;
038:            private ChartService chartService;
039:
040:            /**
041:             * 
042:             * @see org.kuali.module.chart.service.OrganizationService#getByPrimaryId(java.lang.String, java.lang.String)
043:             */
044:            public Org getByPrimaryId(String chartOfAccountsCode,
045:                    String organizationCode) {
046:                return organizationDao.getByPrimaryId(chartOfAccountsCode,
047:                        organizationCode);
048:            }
049:
050:            /**
051:             * Implements the getByPrimaryId method defined by OrganizationService. Method is used by KualiOrgReviewAttribute to enable
052:             * caching of orgs for routing.
053:             * 
054:             * @see org.kuali.module.chart.service.impl.OrganizationServiceImpl#getByPrimaryId(java.lang.String, java.lang.String)
055:             */
056:            @Cached
057:            public Org getByPrimaryIdWithCaching(String chartOfAccountsCode,
058:                    String organizationCode) {
059:                return organizationDao.getByPrimaryId(chartOfAccountsCode,
060:                        organizationCode);
061:            }
062:
063:            /**
064:             * Implements the save() method defined by OrganizationService, including validation of the Org BO
065:             * @see org.kuali.module.chart.service.OrganizationService#save(org.kuali.module.chart.bo.Org)
066:             */
067:            public void save(Org organization) {
068:                organizationDao.save(organization);
069:            }
070:
071:            /**
072:             * @see org.kuali.module.chart.service.OrganizationService#getActiveAccountsByOrg(java.lang.String, java.lang.String)
073:             */
074:            public List getActiveAccountsByOrg(String chartOfAccountsCode,
075:                    String organizationCode) {
076:
077:                if (StringUtils.isBlank(chartOfAccountsCode)) {
078:                    throw new IllegalArgumentException(
079:                            "String parameter chartOfAccountsCode was null or blank.");
080:                }
081:                if (StringUtils.isBlank(organizationCode)) {
082:                    throw new IllegalArgumentException(
083:                            "String parameter organizationCode was null or blank.");
084:                }
085:
086:                return organizationDao.getActiveAccountsByOrg(
087:                        chartOfAccountsCode, organizationCode);
088:            }
089:
090:            /**
091:             * @see org.kuali.module.chart.service.OrganizationService#getActiveChildOrgs(java.lang.String, java.lang.String)
092:             */
093:            public List getActiveChildOrgs(String chartOfAccountsCode,
094:                    String organizationCode) {
095:
096:                if (StringUtils.isBlank(chartOfAccountsCode)) {
097:                    throw new IllegalArgumentException(
098:                            "String parameter chartOfAccountsCode was null or blank.");
099:                }
100:                if (StringUtils.isBlank(organizationCode)) {
101:                    throw new IllegalArgumentException(
102:                            "String parameter organizationCode was null or blank.");
103:                }
104:
105:                return organizationDao.getActiveChildOrgs(chartOfAccountsCode,
106:                        organizationCode);
107:            }
108:
109:            /**
110:             * 
111:             * @see org.kuali.module.chart.service.OrganizationService#getActiveOrgsByType(java.lang.String)
112:             */
113:            public List<Org> getActiveOrgsByType(String organizationTypeCode) {
114:                if (StringUtils.isBlank(organizationTypeCode)) {
115:                    throw new IllegalArgumentException(
116:                            "String parameter organizationTypeCode was null or blank.");
117:                }
118:
119:                return organizationDao
120:                        .getActiveOrgsByType(organizationTypeCode);
121:            }
122:
123:            /**
124:             * 
125:             * @see org.kuali.module.chart.service.OrganizationService#getRootOrganizationCode()
126:             */
127:            public String[] getRootOrganizationCode() {
128:                String rootChart = getChartService().getUniversityChart()
129:                        .getChartOfAccountsCode();
130:                String selfReportsOrgType = SpringContext.getBean(
131:                        ParameterService.class).getParameterValue(Org.class,
132:                        ChartApcParms.ORG_MUST_REPORT_TO_SELF_ORG_TYPES);
133:                return (organizationDao.getRootOrganizationCode(rootChart,
134:                        selfReportsOrgType));
135:            }
136:
137:            public void setParameterService(ParameterService parameterService) {
138:                this .parameterService = parameterService;
139:            }
140:
141:            public ChartService getChartService() {
142:                return chartService;
143:            }
144:
145:            public void setChartService(ChartService chartService) {
146:                this .chartService = chartService;
147:            }
148:
149:            /**
150:             * @return Returns the organizationDao.
151:             */
152:            public OrganizationDao getOrganizationDao() {
153:                return organizationDao;
154:            }
155:
156:            /**
157:             * @param organizationDao The organizationDao to set.
158:             */
159:            public void setOrganizationDao(OrganizationDao organizationDao) {
160:                this.organizationDao = organizationDao;
161:            }
162:
163:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.