Source Code Cross Referenced for StandaloneApplicationContext.java in  » Report » pentaho-report » org » pentaho » core » system » 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 » Report » pentaho report » org.pentaho.core.system 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2006 Pentaho Corporation.  All rights reserved. 
003:         * This software was developed by Pentaho Corporation and is provided under the terms 
004:         * of the Mozilla Public License, Version 1.1, or any later version. You may not use 
005:         * this file except in compliance with the license. If you need a copy of the license, 
006:         * please go to http://www.mozilla.org/MPL/MPL-1.1.txt. The Original Code is the Pentaho 
007:         * BI Platform.  The Initial Developer is Pentaho Corporation.
008:         *
009:         * Software distributed under the Mozilla Public License is distributed on an "AS IS" 
010:         * basis, WITHOUT WARRANTY OF ANY KIND, either express or  implied. Please refer to 
011:         * the license for the specific language governing your rights and limitations.
012:         *
013:         * @created Jun 22, 2005 
014:         * @author James Dixon
015:         * 
016:         */
017:
018:        package org.pentaho.core.system;
019:
020:        import java.io.File;
021:        import java.util.*;
022:
023:        public class StandaloneApplicationContext implements 
024:                IApplicationContext {
025:
026:            private String solutionRootPath;
027:
028:            private String baseUrl;
029:
030:            private String applicationPath;
031:
032:            private Object context;
033:
034:            private Properties properties = new Properties();
035:
036:            private List entryPointsList = new ArrayList();
037:            private List exitPointsList = new ArrayList();
038:
039:            public StandaloneApplicationContext(String solutionRootPath,
040:                    String applicationPath, Object context) {
041:                this (solutionRootPath, applicationPath);
042:                this .context = context;
043:            }
044:
045:            public StandaloneApplicationContext(String solutionRootPath,
046:                    String applicationPath) {
047:                //TODO sbarkdull, do we need to consider path separators for windows?
048:                //assert !solutionRootPath.endsWith("\\") : "solutionRootPathin StandaloneApplicationContext appears to be using Windows path separators.";
049:                //assert !applicationPath.endsWith("\\") : "applicationPath in StandaloneApplicationContext appears to be using Windows path separators.";
050:
051:                this .solutionRootPath = solutionRootPath;
052:                this .applicationPath = applicationPath;
053:                baseUrl = null;
054:            }
055:
056:            public void setBaseUrl(String baseUrl) {
057:                this .baseUrl = baseUrl;
058:            }
059:
060:            public String getFileOutputPath(String path) {
061:                return solutionRootPath + File.separator + path;
062:            }
063:
064:            public String getSolutionPath(String path) {
065:                return solutionRootPath + File.separator + path;
066:            }
067:
068:            public void setSolutionRootPath(String solutionRootPath) {
069:                this .solutionRootPath = solutionRootPath;
070:            }
071:
072:            /*
073:             * (non-Javadoc)
074:             * 
075:             * @see org.pentaho.newcode.IApplicationContext#getServerName()
076:             */
077:            public String getPentahoServerName() {
078:                return ""; //$NON-NLS-1$
079:            }
080:
081:            /*
082:             * (non-Javadoc)
083:             * 
084:             * @see org.pentaho.newcode.IApplicationContext#getServerPort()
085:             */
086:            public int getServerPort() {
087:                // TODO Auto-generated method stub
088:                return 0;
089:            }
090:
091:            public String getBaseUrl() {
092:                return baseUrl;
093:            }
094:
095:            public String getApplicationPath(String path) {
096:                return applicationPath + File.separator + path;
097:            }
098:
099:            public String getProperty(String key) {
100:                return properties.getProperty(key);
101:            }
102:
103:            public String getProperty(String key, String defaultValue) {
104:                return properties.getProperty(key, defaultValue);
105:            }
106:
107:            protected void setProperties(Properties props) {
108:                properties = props;
109:            }
110:
111:            public void addEntryPointHandler(IPentahoSystemEntryPoint entryPoint) {
112:                entryPointsList.add(entryPoint);
113:            }
114:
115:            public void removeEntryPointHandler(
116:                    IPentahoSystemEntryPoint entryPoint) {
117:                entryPointsList.remove(entryPoint);
118:            }
119:
120:            public void addExitPointHandler(IPentahoSystemExitPoint exitPoint) {
121:                exitPointsList.add(exitPoint);
122:            }
123:
124:            public void removeExitPointHandler(IPentahoSystemExitPoint exitPoint) {
125:                exitPointsList.remove(exitPoint);
126:            }
127:
128:            public void invokeEntryPoints() {
129:                for (int i = 0; i < entryPointsList.size(); i++) {
130:                    ((IPentahoSystemEntryPoint) entryPointsList.get(i))
131:                            .systemEntryPoint();
132:                }
133:            }
134:
135:            public void invokeExitPoints() {
136:                for (int i = 0; i < exitPointsList.size(); i++) {
137:                    ((IPentahoSystemExitPoint) entryPointsList.get(i))
138:                            .systemExitPoint();
139:                }
140:            }
141:
142:            public Object getContext() {
143:                return context;
144:            }
145:
146:            public void setContext(Object context) {
147:                this .context = context;
148:            }
149:
150:            public String getSolutionRootPath() {
151:                return solutionRootPath;
152:            }
153:
154:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.