Source Code Cross Referenced for DecoratedReport.java in  » ERP-CRM-Financial » sakai » org » theospi » portfolio » reports » tool » 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 » sakai » org.theospi.portfolio.reports.tool 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /**********************************************************************************
002:         * $URL:https://source.sakaiproject.org/svn/osp/trunk/reports/tool/src/java/org/theospi/portfolio/reports/tool/DecoratedReport.java $
003:         * $Id:DecoratedReport.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
004:         ***********************************************************************************
005:         *
006:         * Copyright (c) 2005, 2006 The Sakai Foundation.
007:         *
008:         * Licensed under the Educational Community License, Version 1.0 (the "License");
009:         * you may not use this file except in compliance with the License.
010:         * You may obtain a copy of the License at
011:         *
012:         *      http://www.opensource.org/licenses/ecl1.php
013:         *
014:         * Unless required by applicable law or agreed to in writing, software
015:         * distributed under the License is distributed on an "AS IS" BASIS,
016:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
017:         * See the License for the specific language governing permissions and
018:         * limitations under the License.
019:         *
020:         **********************************************************************************/package org.theospi.portfolio.reports.tool;
021:
022:        import org.theospi.portfolio.reports.model.Report;
023:        import org.theospi.portfolio.reports.model.ReportParam;
024:
025:        import java.util.ArrayList;
026:        import java.util.Date;
027:        import java.util.Iterator;
028:        import java.util.List;
029:
030:        /**
031:         * This class allows the Report to interact with the view
032:         *
033:         */
034:        public class DecoratedReport implements  DecoratedAbstractResult {
035:
036:            /** The link to the main tool */
037:            private ReportsTool reportsTool = null;
038:
039:            /** The report to decorate */
040:            private Report report = null;
041:
042:            /** The decorated report parameters */
043:            private List reportParams = null;
044:
045:            /** for telling the interface when a parameter is not correct */
046:            private String paramErrorMsgs = "";
047:
048:            /** informs the interface if the title is not proper */
049:            private boolean invalidTitle = false;
050:
051:            private boolean isOwner = true;
052:
053:            public DecoratedReport(Report report, ReportsTool reportsTool) {
054:                this .report = report;
055:                this .reportsTool = reportsTool;
056:            }
057:
058:            public Report getReport() {
059:                return report;
060:            }
061:
062:            public List getReportParams() {
063:                if (reportParams == null) {
064:                    reportParams = new ArrayList();
065:                    if (report.getReportParams() != null) {
066:                        Iterator iter = report.getReportParams().iterator();
067:                        while (iter.hasNext()) {
068:                            ReportParam rp = (ReportParam) iter.next();
069:
070:                            DecoratedReportParam drp = new DecoratedReportParam(
071:                                    rp, reportsTool);
072:                            drp.setIndex(reportParams.size());
073:                            reportParams.add(drp);
074:                        }
075:                    }
076:                }
077:                return reportParams;
078:            }
079:
080:            public boolean getInvalidTitle() {
081:                return invalidTitle;
082:            }
083:
084:            public boolean getIsSaved() {
085:                return report.getIsSaved();
086:            }
087:
088:            public boolean testInvalidateTitle() {
089:                //	reset all the vars
090:                invalidTitle = false;
091:
092:                //	if no title, then error
093:                if (report.getTitle() == null
094:                        || report.getTitle().trim().equals(""))
095:                    invalidTitle = true;
096:
097:                return invalidTitle;
098:            }
099:
100:            /**
101:             * this function loads the full report result and the report
102:             * sets these in the tool
103:             * @return String which page to go to next
104:             */
105:            public String processSelectReportResult() {
106:                return reportsTool.processSelectLiveReport(this );
107:            }
108:
109:            public String processScheduleReport() {
110:                return reportsTool.processScheduleReport(this );
111:            }
112:
113:            /**
114:             * this function deletes the full report result and the report
115:             * sets these in the tool
116:             * @return String which page to go to next
117:             */
118:            public String processDelete() {
119:                return reportsTool.processDeleteLiveReport(this );
120:            }
121:
122:            /**
123:             * this function loads the full report result and the report
124:             * sets these in the tool, it then puts the user on an edit page
125:             * @return String which page to go to next
126:             */
127:            public String processEditReport() {
128:                return reportsTool.processEditLiveReport(this );
129:            }
130:
131:            public String getResultType() {
132:                return DecoratedAbstractResult.REPORT;
133:            }
134:
135:            public String getTitle() {
136:                return report.getTitle();
137:            }
138:
139:            public Date getCreationDate() {
140:                return report.getCreationDate();
141:            }
142:
143:            public boolean getIsLive() {
144:                return report.getIsLive();
145:            }
146:
147:            public boolean getParamsAreValid() {
148:                boolean isGood = true;
149:
150:                paramErrorMsgs = "";
151:
152:                for (Iterator iter = reportParams.iterator(); iter.hasNext();) {
153:                    DecoratedReportParam drp = (DecoratedReportParam) iter
154:                            .next();
155:
156:                    isGood &= drp.getIsValid();
157:                }
158:                return isGood;
159:            }
160:
161:            public void setParamErrorMessages(String paramErrorMsgs) {
162:                this .paramErrorMsgs = paramErrorMsgs;
163:            }
164:
165:            public String getParamErrorMessages() {
166:                return paramErrorMsgs;
167:            }
168:
169:            public boolean getIsOwner() {
170:                return isOwner;
171:            }
172:
173:            public void setOwner(boolean owner) {
174:                isOwner = owner;
175:            }
176:
177:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.