Source Code Cross Referenced for PurchasingAccountsPayableDocumentFixture.java in  » ERP-CRM-Financial » Kuali-Financial-System » org » kuali » module » purap » fixtures » 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.fixtures 
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.purap.fixtures;
017:
018:        import org.kuali.core.service.DocumentService;
019:        import org.kuali.kfs.context.SpringContext;
020:        import org.kuali.module.purap.PurapConstants.CreditMemoStatuses;
021:        import org.kuali.module.purap.PurapConstants.PaymentRequestStatuses;
022:        import org.kuali.module.purap.PurapConstants.PurchaseOrderStatuses;
023:        import org.kuali.module.purap.PurapConstants.RequisitionStatuses;
024:        import org.kuali.module.purap.document.PurchasingAccountsPayableDocument;
025:        import org.kuali.test.DocumentTestUtils;
026:
027:        import edu.iu.uis.eden.exception.WorkflowException;
028:
029:        public enum PurchasingAccountsPayableDocumentFixture {
030:
031:            // REQUISITION FIXTURES
032:            REQ_ONLY_REQUIRED_FIELDS(null, // purapDocumentIdentifier
033:                    RequisitionStatuses.IN_PROCESS, // statusCode
034:                    null, // vendorHeaderGeneratedIdentifier
035:                    null, // vendorDetailAssignedIdentifier
036:                    null, // vendorName
037:                    null, // vendorLine1Address
038:                    null, // vendorLine2Address
039:                    null, // vendorCityName
040:                    null, // vendorStateCode
041:                    null, // vendorPostalCode
042:                    null, // vendorCountryCode
043:                    null, // vendorCustomerNumber
044:                    null), // accountsPayablePurchasingDocumentLinkIdentifier
045:            REQ_WITH_MANUALLY_ENTERED_VENDOR(null,
046:                    RequisitionStatuses.IN_PROCESS, null, null,
047:                    "Colts Gear Shop", "111 Champs St", null, "Indy Rocks",
048:                    "IN", "11111", "US", null, null),
049:            // APO FIXTURES
050:            REQ_VALID_APO(null, // purapDocumentIdentifier
051:                    RequisitionStatuses.IN_PROCESS, // statusCode
052:                    1002, // vendorHeaderGeneratedIdentifier
053:                    0, // vendorDetailAssignedIdentifier
054:                    "ABC Cleaning Services", // vendorName
055:                    "123456 BROAD ST", // vendorLine1Address
056:                    null, // vendorLine2Address
057:                    "TRUMANSBURG", // vendorCityName
058:                    "NY", // vendorStateCode
059:                    "14886", // vendorPostalCode
060:                    "US", // vendorCountryCode
061:                    null, // vendorCustomerNumber
062:                    null), // accountsPayablePurchasingDocumentLinkIdentifier
063:            REQ_ALTERNATE_APO(null, // purapDocumentIdentifier
064:                    RequisitionStatuses.IN_PROCESS, // statusCode
065:                    1016, // vendorHeaderGeneratedIdentifier
066:                    0, // vendorDetailAssignedIdentifier
067:                    "Physik Instrument L. P.", // vendorName
068:                    "16 AUBURN ST", // vendorLine1Address
069:                    null, // vendorLine2Address
070:                    "AUBURN", // vendorCityName
071:                    "MA", // vendorStateCode
072:                    "01501", // vendorPostalCode
073:                    "US", // vendorCountryCode
074:                    null, // vendorCustomerNumber
075:                    null), // accountsPayablePurchasingDocumentLinkIdentifier
076:
077:            // PURCHASE ORDER FIXTURES
078:            // TODO f2f: fix the PO one because actually, the vendor must be selected from the database
079:            PO_ONLY_REQUIRED_FIELDS(null, // purapDocumentIdentifier
080:                    PurchaseOrderStatuses.IN_PROCESS, // statusCode
081:                    1000, // vendorHeaderGeneratedIdentifier
082:                    0, // vendorDetailAssignedIdentifier
083:                    "ABC Cleaning Services", // vendorName
084:                    "123456 BROAD ST", // vendorLine1Address
085:                    null, // vendorLine2Address
086:                    "TRUMANSBURG", // vendorCityName
087:                    "NY", // vendorStateCode
088:                    "14886", // vendorPostalCode
089:                    "US", // vendorCountryCode
090:                    null, // vendorCustomerNumber
091:                    null), // accountsPayablePurchasingDocumentLinkIdentifier
092:            PO_WITH_MANUALLY_ENTERED_VENDOR(null,
093:                    PurchaseOrderStatuses.IN_PROCESS, 1000, 0,
094:                    "ABC Cleaning Services", "123456 BROAD ST", null,
095:                    "TRUMANSBURG", "NY", "14886", "US", null, null),
096:
097:            // PAYMENT REQUEST FIXTURES
098:            PREQ_ONLY_REQUIRED_FIELDS(null, // purapDocumentIdentifier 
099:                    PaymentRequestStatuses.IN_PROCESS, // statusCode
100:                    1010, // vendorHeaderGeneratedIdentifier
101:                    2, // vendorDetailAssignedIdentifier
102:                    "DIVISION 2 OF PO BASIC", // vendorName
103:                    "9988 8TH STREET", // vendorLine1Address
104:                    null, // vendorLine2Address
105:                    "A PLACE IN THE SUN", // vendorCityName
106:                    "CA", // vendorStateCode
107:                    "99888", // vendorPostalCode
108:                    "US", // vendorCountryCode
109:                    null, // vendorCustomerNumber
110:                    null // accountsPayablePurchasingDocumentLinkIdentifier
111:            ),
112:
113:            // CREDIT MEMO FIXTURES
114:            CM_ONLY_REQUIRED_FIELDS(null, // purapDocumentIdentifier
115:                    CreditMemoStatuses.IN_PROCESS, // statusCode
116:                    1000, // vendorHeaderGeneratedIdentifier
117:                    0, // vendorDetailAssignedIdentifier
118:                    "ABC Cleaning Services", // vendorName
119:                    "123456 BROAD ST", // vendorLine1Address
120:                    null, // vendorLine2Address
121:                    "TRUMANSBURG", // vendorCityName
122:                    "NY", // vendorStateCode
123:                    "14886", // vendorPostalCode
124:                    "US", // vendorCountryCode
125:                    null, // vendorCustomerNumber
126:                    null), // accountsPayablePurchasingDocumentLinkIdentifier
127:            REQ_MULTI_QUANTITY(null, // purapDocumentIdentifier
128:                    RequisitionStatuses.IN_PROCESS, // statusCode
129:                    1002, // vendorHeaderGeneratedIdentifier
130:                    0, // vendorDetailAssignedIdentifier
131:                    "MK CORPORATION ACTIVE", // vendorName
132:                    "3894 SOUTH ST", // vendorLine1Address
133:                    "P.O. BOX 3455", // vendorLine2Address
134:                    "SPRINGFIELD", // vendorCityName
135:                    "IL", // vendorStateCode
136:                    "33555", // vendorPostalCode
137:                    "US", // vendorCountryCode
138:                    null, // vendorCustomerNumber
139:                    null), // accountsPayablePurchasingDocumentLinkIdentifier
140:            REQ_MULTI_NON_QUANTITY(null, // purapDocumentIdentifier
141:                    RequisitionStatuses.IN_PROCESS, // statusCode
142:                    1016, // vendorHeaderGeneratedIdentifier
143:                    0, // vendorDetailAssignedIdentifier
144:                    "PHYSIK INSTRUMENT L.P.", // vendorName
145:                    "16 AUBURN ST", // vendorLine1Address
146:                    null, // vendorLine2Address
147:                    "AUBURN", // vendorCityName
148:                    "MA", // vendorStateCode
149:                    "01501", // vendorPostalCode
150:                    "US", // vendorCountryCode
151:                    null, // vendorCustomerNumber
152:                    null), // accountsPayablePurchasingDocumentLinkIdentifier
153:            ;
154:
155:            public final Integer purapDocumentIdentifier;
156:            public final String statusCode;
157:            public final Integer vendorHeaderGeneratedIdentifier;
158:            public final Integer vendorDetailAssignedIdentifier;
159:            public final String vendorName;
160:            public final String vendorLine1Address;
161:            public final String vendorLine2Address;
162:            public final String vendorCityName;
163:            public final String vendorStateCode;
164:            public final String vendorPostalCode;
165:            public final String vendorCountryCode;
166:            public final String vendorCustomerNumber;
167:            public final Integer accountsPayablePurchasingDocumentLinkIdentifier;
168:
169:            private PurchasingAccountsPayableDocumentFixture(
170:                    Integer purapDocumentIdentifier, String statusCode,
171:                    Integer vendorHeaderGeneratedIdentifier,
172:                    Integer vendorDetailAssignedIdentifier, String vendorName,
173:                    String vendorLine1Address, String vendorLine2Address,
174:                    String vendorCityName, String vendorStateCode,
175:                    String vendorPostalCode, String vendorCountryCode,
176:                    String vendorCustomerNumber,
177:                    Integer accountsPayablePurchasingDocumentLinkIdentifier) {
178:                this .purapDocumentIdentifier = purapDocumentIdentifier;
179:                this .statusCode = statusCode;
180:                this .vendorHeaderGeneratedIdentifier = vendorHeaderGeneratedIdentifier;
181:                this .vendorDetailAssignedIdentifier = vendorDetailAssignedIdentifier;
182:                this .vendorName = vendorName;
183:                this .vendorLine1Address = vendorLine1Address;
184:                this .vendorLine2Address = vendorLine2Address;
185:                this .vendorCityName = vendorCityName;
186:                this .vendorStateCode = vendorStateCode;
187:                this .vendorPostalCode = vendorPostalCode;
188:                this .vendorCountryCode = vendorCountryCode;
189:                this .vendorCustomerNumber = vendorCustomerNumber;
190:                this .accountsPayablePurchasingDocumentLinkIdentifier = accountsPayablePurchasingDocumentLinkIdentifier;
191:            }
192:
193:            public PurchasingAccountsPayableDocument createPurchasingAccountsPayableDocument(
194:                    Class clazz) {
195:                PurchasingAccountsPayableDocument doc = null;
196:                try {
197:                    doc = (PurchasingAccountsPayableDocument) DocumentTestUtils
198:                            .createDocument(SpringContext
199:                                    .getBean(DocumentService.class), clazz);
200:                } catch (WorkflowException e) {
201:                    throw new RuntimeException("Document creation failed.");
202:                }
203:                doc.setPurapDocumentIdentifier(this .purapDocumentIdentifier);
204:                doc.setStatusCode(this .statusCode);
205:                doc
206:                        .setVendorHeaderGeneratedIdentifier(this .vendorHeaderGeneratedIdentifier);
207:                doc
208:                        .setVendorDetailAssignedIdentifier(this .vendorDetailAssignedIdentifier);
209:                doc.setVendorName(this .vendorName);
210:                doc.setVendorLine1Address(this .vendorLine1Address);
211:                doc.setVendorLine2Address(this .vendorLine2Address);
212:                doc.setVendorCityName(this .vendorCityName);
213:                doc.setVendorStateCode(this .vendorStateCode);
214:                doc.setVendorPostalCode(this .vendorPostalCode);
215:                doc.setVendorCountryCode(this .vendorCountryCode);
216:                doc.setVendorCustomerNumber(this .vendorCustomerNumber);
217:                doc
218:                        .setAccountsPayablePurchasingDocumentLinkIdentifier(this .accountsPayablePurchasingDocumentLinkIdentifier);
219:
220:                // TODO f2f: (chris) add items and accounts
221:
222:                return doc;
223:            }
224:
225:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.