Source Code Cross Referenced for GenerateGeneralLedgerPendingEntriesEvent.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » kfs » rule » event » 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.kfs.rule.event 
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.kfs.rule.event;
017:
018:        import org.kuali.core.document.TransactionalDocument;
019:        import org.kuali.core.rule.BusinessRule;
020:        import org.kuali.core.rule.event.KualiDocumentEventBase;
021:        import org.kuali.core.util.GeneralLedgerPendingEntrySequenceHelper;
022:        import org.kuali.core.util.ObjectUtils;
023:        import org.kuali.kfs.bo.AccountingLine;
024:        import org.kuali.kfs.document.GeneralLedgerPostingDocument;
025:        import org.kuali.kfs.rule.GenerateGeneralLedgerPendingEntriesRule;
026:
027:        /**
028:         * Event used to re/generate general ledger pending entries for a transactional document.
029:         */
030:        public final class GenerateGeneralLedgerPendingEntriesEvent extends
031:                KualiDocumentEventBase {
032:            private final AccountingLine accountingLine;
033:            private GeneralLedgerPendingEntrySequenceHelper sequenceHelper;
034:
035:            /**
036:             * Constructs a GenerateGeneralLedgerPendingEntriesEvent with the given errorPathPrefix, document, accountingLine, and counter
037:             * 
038:             * @param errorPathPrefix
039:             * @param generalLedgerPostingDocument
040:             * @param accountingLine
041:             * @param sequenceHelper
042:             */
043:            public GenerateGeneralLedgerPendingEntriesEvent(
044:                    String errorPathPrefix,
045:                    GeneralLedgerPostingDocument generalLedgerPostingDocument,
046:                    AccountingLine accountingLine,
047:                    GeneralLedgerPendingEntrySequenceHelper sequenceHelper) {
048:                super ("creating generatePendingEntries event for document "
049:                        + getDocumentId(generalLedgerPostingDocument),
050:                        errorPathPrefix, generalLedgerPostingDocument);
051:                // note that we want to override the parent b/c we do want this by reference here
052:                // the parent does a deepCopy and we don't want that b/c we need to set the GLPEs into the document
053:                super .document = generalLedgerPostingDocument;
054:                this .accountingLine = (AccountingLine) ObjectUtils
055:                        .deepCopy(accountingLine);
056:                this .sequenceHelper = sequenceHelper;
057:            }
058:
059:            /**
060:             * Constructs a GenerateGeneralLedgerPendingEntriesEvent with the given document and accountingLine
061:             * 
062:             * @param generalLedgerPostingDocument
063:             * @param accountingLine
064:             * @param sequenceHelper
065:             */
066:            public GenerateGeneralLedgerPendingEntriesEvent(
067:                    GeneralLedgerPostingDocument generalLedgerPostingDocument,
068:                    AccountingLine accountingLine,
069:                    GeneralLedgerPendingEntrySequenceHelper sequenceHelper) {
070:                this ("", generalLedgerPostingDocument, accountingLine,
071:                        sequenceHelper);
072:            }
073:
074:            /**
075:             * @return TransactionalDocument associated with this event
076:             */
077:            public TransactionalDocument getTransactionalDocument() {
078:                return (TransactionalDocument) getDocument();
079:            }
080:
081:            /**
082:             * @return accountingLine associated with this event
083:             */
084:            public AccountingLine getAccountingLine() {
085:                return accountingLine;
086:            }
087:
088:            /**
089:             * @return sequenceHelper associated with this event
090:             */
091:            public GeneralLedgerPendingEntrySequenceHelper getSequenceHelper() {
092:                return sequenceHelper;
093:            }
094:
095:            /**
096:             * This method sets the value of the sequenceHelper.
097:             * 
098:             * @param sequenceHelper
099:             */
100:            public void setSequenceHelper(
101:                    GeneralLedgerPendingEntrySequenceHelper sequenceHelper) {
102:                this .sequenceHelper = sequenceHelper;
103:            }
104:
105:            public void validate() {
106:                super .validate();
107:                if (getAccountingLine() == null) {
108:                    throw new IllegalArgumentException(
109:                            "invalid (null) accounting line");
110:                }
111:            }
112:
113:            /**
114:             * @see org.kuali.core.rule.event.KualiDocumentEvent#getRuleInterfaceClass()
115:             */
116:            public Class getRuleInterfaceClass() {
117:                return GenerateGeneralLedgerPendingEntriesRule.class;
118:            }
119:
120:            /**
121:             * @see org.kuali.core.rule.event.KualiDocumentEvent#invokeRuleMethod(org.kuali.core.rule.BusinessRule)
122:             */
123:            public boolean invokeRuleMethod(BusinessRule rule) {
124:                return ((GenerateGeneralLedgerPendingEntriesRule) rule)
125:                        .processGenerateGeneralLedgerPendingEntries(
126:                                (GeneralLedgerPostingDocument) getDocument(),
127:                                getAccountingLine(), getSequenceHelper());
128:            }
129:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.