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


001:        /*
002:         * Copyright 2006-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.purap.web.struts.form;
017:
018:        import java.util.ArrayList;
019:        import java.util.List;
020:
021:        import org.kuali.module.purap.bo.PurApAccountingLine;
022:        import org.kuali.module.purap.bo.PurApAccountingLineBase;
023:        import org.kuali.module.purap.bo.PurApItem;
024:
025:        /**
026:         * Struts Action Form for Purchasing documents.
027:         */
028:        public class PurchasingFormBase extends
029:                PurchasingAccountsPayableFormBase {
030:
031:            private Boolean notOtherDeliveryBuilding = true;
032:            private Boolean hideDistributeAccounts = true;
033:            private PurApItem newPurchasingItemLine;
034:
035:            // *** Note that the following variables do not use camel caps ON PURPOSE, because of how the accounting lines tag uses the
036:            // accountPrefix
037:            private Integer accountDistributionnextSourceLineNumber;
038:            private List<PurApAccountingLine> accountDistributionsourceAccountingLines;
039:            private PurApAccountingLine accountDistributionnewSourceLine;
040:
041:            /**
042:             * Constructs a PurchasingFormBase instance and sets up the appropriately casted document.
043:             */
044:            public PurchasingFormBase() {
045:                super ();
046:                this .setNewPurchasingItemLine(setupNewPurchasingItemLine());
047:                newPurchasingItemLine.setItemTypeCode("ITEM");
048:
049:                this .accountDistributionnextSourceLineNumber = new Integer(1);
050:                setAccountDistributionsourceAccountingLines(new ArrayList());
051:                this 
052:                        .setAccountDistributionnewSourceLine(setupNewAccountDistributionAccountingLine());
053:            }
054:
055:            public Boolean getNotOtherDeliveryBuilding() {
056:                return notOtherDeliveryBuilding;
057:            }
058:
059:            public void setNotOtherDeliveryBuilding(
060:                    Boolean notOtherDeliveryBuilding) {
061:                this .notOtherDeliveryBuilding = notOtherDeliveryBuilding;
062:            }
063:
064:            public Boolean getHideDistributeAccounts() {
065:                return hideDistributeAccounts;
066:            }
067:
068:            public void setHideDistributeAccounts(Boolean hideDistributeAccounts) {
069:                this .hideDistributeAccounts = hideDistributeAccounts;
070:            }
071:
072:            public Integer getAccountDistributionnextSourceLineNumber() {
073:                return accountDistributionnextSourceLineNumber;
074:            }
075:
076:            public void setAccountDistributionnextSourceLineNumber(
077:                    Integer accountDistributionnextSourceLineNumber) {
078:                this .accountDistributionnextSourceLineNumber = accountDistributionnextSourceLineNumber;
079:            }
080:
081:            public List<PurApAccountingLine> getAccountDistributionsourceAccountingLines() {
082:                return accountDistributionsourceAccountingLines;
083:            }
084:
085:            public void setAccountDistributionsourceAccountingLines(
086:                    List<PurApAccountingLine> accountDistributionAccountingLines) {
087:                this .accountDistributionsourceAccountingLines = accountDistributionAccountingLines;
088:            }
089:
090:            public PurApAccountingLine getAccountDistributionnewSourceLine() {
091:                return accountDistributionnewSourceLine;
092:            }
093:
094:            public void setAccountDistributionnewSourceLine(
095:                    PurApAccountingLine accountDistributionnewSourceLine) {
096:                this .accountDistributionnewSourceLine = accountDistributionnewSourceLine;
097:            }
098:
099:            public PurApItem getNewPurchasingItemLine() {
100:                return newPurchasingItemLine;
101:            }
102:
103:            public void setNewPurchasingItemLine(PurApItem newPurchasingItemLine) {
104:                this .newPurchasingItemLine = newPurchasingItemLine;
105:            }
106:
107:            /**
108:             * Returns the Account Distribution Source Accounting Line at the specified index.
109:             * 
110:             * @param index the index of the Account Distribution Source Accounting Line.
111:             * @return the specified Account Distribution Source Accounting Line.
112:             */
113:            public PurApAccountingLine getAccountDistributionsourceAccountingLine(
114:                    int index) {
115:                while (accountDistributionsourceAccountingLines.size() <= index) {
116:                    accountDistributionsourceAccountingLines
117:                            .add(setupNewAccountDistributionAccountingLine());
118:                }
119:                return accountDistributionsourceAccountingLines.get(index);
120:            }
121:
122:            /**
123:             * Returns the new Purchasing Item Line and resets it to null.
124:             * 
125:             * @return the new Purchasing Item Line.
126:             */
127:            public PurApItem getAndResetNewPurchasingItemLine() {
128:                PurApItem aPurchasingItemLine = getNewPurchasingItemLine();
129:                setNewPurchasingItemLine(setupNewPurchasingItemLine());
130:                return aPurchasingItemLine;
131:            }
132:
133:            /**
134:             * This method should be overriden (or see accountingLines for an alternate way of doing this with newInstance)
135:             */
136:            public PurApItem setupNewPurchasingItemLine() {
137:                return null;
138:            }
139:
140:            /**
141:             * This method should be overriden (or see accountingLines for an alternate way of doing this with newInstance)
142:             */
143:            public PurApAccountingLineBase setupNewPurchasingAccountingLine() {
144:                return null;
145:            }
146:
147:            /**
148:             * This method should be overriden.
149:             */
150:            public PurApAccountingLineBase setupNewAccountDistributionAccountingLine() {
151:                return null;
152:            }
153:
154:            /**
155:             * Sets the sequence number appropriately for the passed in source accounting line using the value that has been stored in the
156:             * nextSourceLineNumber variable, adds the accounting line to the list that is aggregated by this object, and then handles
157:             * incrementing the nextSourceLineNumber variable.
158:             * 
159:             * @param line the accounting line to add to the list.
160:             * @see org.kuali.kfs.document.AccountingDocument#addSourceAccountingLine(SourceAccountingLine)
161:             */
162:            public void addAccountDistributionsourceAccountingLine(
163:                    PurApAccountingLine line) {
164:                line.setSequenceNumber(this 
165:                        .getAccountDistributionnextSourceLineNumber());
166:                this .accountDistributionsourceAccountingLines.add(line);
167:                this .accountDistributionnextSourceLineNumber = new Integer(this 
168:                        .getAccountDistributionnextSourceLineNumber()
169:                        .intValue() + 1);
170:                this
171:                        .setAccountDistributionnewSourceLine(setupNewAccountDistributionAccountingLine());
172:            }
173:
174:        }
w__w___w___._j___av_a_2__s_.__co_m_ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.