Source Code Cross Referenced for EDocLiteLookupable.java in  » ERP-CRM-Financial » Kuali-Financial-System » edu » iu » uis » eden » lookupable » 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 » edu.iu.uis.eden.lookupable 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005-2006 The Kuali Foundation.
003:         *
004:         *
005:         * Licensed under the Educational Community License, Version 1.0 (the "License");
006:         * you may not use this file except in compliance with the License.
007:         * You may obtain a copy of the License at
008:         *
009:         * http://www.opensource.org/licenses/ecl1.php
010:         *
011:         * Unless required by applicable law or agreed to in writing, software
012:         * distributed under the License is distributed on an "AS IS" BASIS,
013:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014:         * See the License for the specific language governing permissions and
015:         * limitations under the License.
016:         */
017:        package edu.iu.uis.eden.lookupable;
018:
019:        import java.util.ArrayList;
020:        import java.util.Iterator;
021:        import java.util.List;
022:        import java.util.Map;
023:
024:        import javax.servlet.http.HttpServletRequest;
025:
026:        import edu.iu.uis.eden.EdenConstants;
027:        import edu.iu.uis.eden.KEWServiceLocator;
028:        import edu.iu.uis.eden.edl.EDocLiteAssociation;
029:        import edu.iu.uis.eden.edl.EDocLiteService;
030:        import edu.iu.uis.eden.edl.components.WorkflowDocumentActions;
031:        import edu.iu.uis.eden.export.ExportDataSet;
032:        import edu.iu.uis.eden.export.ExportFormat;
033:        import edu.iu.uis.eden.export.Exportable;
034:        import edu.iu.uis.eden.plugin.attributes.WorkflowLookupable;
035:        import edu.iu.uis.eden.util.KeyLabelPair;
036:        import edu.iu.uis.eden.util.Utilities;
037:
038:        /**
039:         * A {@link WorkflowLookupable} for EDoc Lites.
040:         *
041:         * @see EDocLiteService
042:         *
043:         * @author rkirkend
044:         */
045:        public class EDocLiteLookupable implements  WorkflowLookupable,
046:                Exportable {
047:
048:            private List ROWS;
049:            private static final List COLUMNS = establishColData();
050:
051:            private static final String EDOC_LITE_NAME = "eDocLiteName_";
052:            private static final String EDOC_LITE_STYLE_NAME = "eDocLiteStyleName_";
053:            private static final String EDOC_LITE_DOC_TYPE_NAME = "eDocLiteDocName_";
054:            private static final String ACTIVE_IND_FIELD_LABEL = "Active Indicator";
055:            private static final String ACTIVE_IND_PROPERTY_NAME = "activeIndicator";
056:
057:            public EDocLiteLookupable() {
058:                this .ROWS = establishRowData();
059:            }
060:
061:            public String getHtmlMenuBar() {
062:                return "";
063:            }
064:
065:            public List getRows() {
066:                return ROWS;
067:            }
068:
069:            public String getTitle() {
070:                return "EDocLite Lookup";
071:            }
072:
073:            public String getReturnLocation() {
074:                return "Lookup.do";
075:            }
076:
077:            public List getColumns() {
078:                return COLUMNS;
079:            }
080:
081:            public List getSearchResults(Map fieldValues, Map fieldConversions)
082:                    throws Exception {
083:                EDocLiteAssociation edocLite = new EDocLiteAssociation();
084:
085:                String activeInd = (String) fieldValues
086:                        .get(ACTIVE_IND_PROPERTY_NAME);
087:                if (!Utilities.isEmpty(activeInd) && !activeInd.equals("all")) {
088:                    edocLite.setActiveInd(new Boolean(activeInd.trim()));
089:                }
090:                String definition = (String) fieldValues.get(EDOC_LITE_NAME);
091:                if (!Utilities.isEmpty(definition)) {
092:                    edocLite.setDefinition(definition.trim());
093:                }
094:                String style = (String) fieldValues.get(EDOC_LITE_STYLE_NAME);
095:                if (!Utilities.isEmpty(style)) {
096:                    edocLite.setStyle(style.trim());
097:                }
098:                String documentType = (String) fieldValues
099:                        .get(EDOC_LITE_DOC_TYPE_NAME);
100:                if (!Utilities.isEmpty(documentType)) {
101:                    edocLite.setEdlName(documentType.trim());
102:                }
103:                List results = KEWServiceLocator.getEDocLiteService().search(
104:                        edocLite);
105:                for (Iterator iter = results.iterator(); iter.hasNext();) {
106:                    EDocLiteAssociation result = (EDocLiteAssociation) iter
107:                            .next();
108:                    String actionsUrl = "<a href=\"EDocLite?userAction="
109:                            + WorkflowDocumentActions.ACTION_CREATE
110:                            + "&edlName=" + result.getEdlName()
111:                            + "\">Create Document</a>";
112:                    result.setActionsUrl(actionsUrl);
113:                }
114:                return results;
115:            }
116:
117:            public String getNoReturnParams(Map fieldConversions) {
118:                return null;
119:            }
120:
121:            public String getLookupInstructions() {
122:                return "EDocLite Lookup";
123:            }
124:
125:            public List getDefaultReturnType() {
126:                List returnTypes = new ArrayList();
127:                returnTypes.add(EDOC_LITE_NAME);
128:                return returnTypes;
129:            }
130:
131:            public boolean checkForAdditionalFields(Map fieldValues,
132:                    HttpServletRequest request) throws Exception {
133:                return false;
134:            }
135:
136:            public void changeIdToName(Map fieldValues) throws Exception {
137:            }
138:
139:            public ExportDataSet export(ExportFormat format,
140:                    Object exportCriteria) throws Exception {
141:                List searchResults = (List) exportCriteria;
142:                ExportDataSet dataSet = new ExportDataSet(format);
143:                dataSet.getEdocLites().addAll(searchResults);
144:                return dataSet;
145:            }
146:
147:            public List getSupportedExportFormats() {
148:                return EdenConstants.STANDARD_FORMATS;
149:            }
150:
151:            private static List establishColData() {
152:                List cols = new ArrayList();
153:                cols.add(new Column("Definition Name",
154:                        Column.COLUMN_IS_SORTABLE_VALUE, "definition"));
155:                cols.add(new Column("Style Name",
156:                        Column.COLUMN_IS_SORTABLE_VALUE, "style"));
157:                cols.add(new Column("DocumentType Name",
158:                        Column.COLUMN_IS_SORTABLE_VALUE, "edlName"));
159:                cols.add(new Column("Active Indicator",
160:                        Column.COLUMN_IS_SORTABLE_VALUE, "activeInd"));
161:                cols.add(new Column("Action", Column.COLUMN_NOT_SORTABLE_VALUE,
162:                        "actionsUrl"));
163:                return cols;
164:            }
165:
166:            private List establishRowData() {
167:                List rows = new ArrayList();
168:                List fields = new ArrayList();
169:                fields.add(new Field("Definition Name", "", Field.TEXT, false,
170:                        EDOC_LITE_NAME, "", null, "", null));
171:                rows.add(new Row(fields));
172:
173:                fields = new ArrayList();
174:                fields.add(new Field("Style Name", "", Field.TEXT, false,
175:                        EDOC_LITE_STYLE_NAME, "", null, "", null));
176:                rows.add(new Row(fields));
177:
178:                fields = new ArrayList();
179:                fields.add(new Field("Document Type Name", "", Field.TEXT,
180:                        false, EDOC_LITE_DOC_TYPE_NAME, "", null, "", null));
181:                rows.add(new Row(fields));
182:
183:                List options = new ArrayList();
184:                options.add(new KeyLabelPair("true", "Active"));
185:                options.add(new KeyLabelPair("false", "Inactive"));
186:                options.add(new KeyLabelPair("all", "Show All"));
187:
188:                fields = new ArrayList();
189:                fields
190:                        .add(new Field(ACTIVE_IND_FIELD_LABEL, "", Field.RADIO,
191:                                false, ACTIVE_IND_PROPERTY_NAME, "true",
192:                                options, null));
193:                rows.add(new Row(fields));
194:                return rows;
195:            }
196:
197:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.