Source Code Cross Referenced for ComplexMediaLocationInfo.java in  » J2EE » JOnAS-4.8.6 » com » ibm » emb » junit » 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 » J2EE » JOnAS 4.8.6 » com.ibm.emb.junit 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package com.ibm.emb.junit;
002:
003:        import java.io.File;
004:        import java.io.IOException;
005:        import java.net.MalformedURLException;
006:        import java.net.URL;
007:
008:        /**
009:         * this class provides Helper functionality to prepare comlex media on the test
010:         * client for usage in testcases
011:         */
012:        public class ComplexMediaLocationInfo {
013:
014:            protected EMBTestConfiguration tstCfg = null;
015:
016:            public static final int MEDIAGPL1 = 1;
017:
018:            public static final int MEDIAGPL2 = 2;
019:
020:            protected String extension = "";
021:
022:            protected int mediaID = 0;
023:
024:            URL rootURL = null;
025:
026:            File rootFile = null;
027:
028:            URL[] childURLs = null;
029:
030:            File[] childFiles = null;
031:
032:            /**
033:             * contructor
034:             */
035:            public ComplexMediaLocationInfo(int arg1)
036:                    throws MalformedURLException, IOException {
037:                this .tstCfg = EMBTestConfiguration.instance();
038:                this .mediaID = arg1;
039:                switch (mediaID) {
040:                case (MEDIAGPL1):
041:                    prepareGPL1();
042:                    break;
043:                case (MEDIAGPL2):
044:                    prepareGPL2();
045:                    break;
046:                default:
047:                    EMBStaticHelper
048:                            .testError("no suitable mediaID specified in "
049:                                    + this .getClass().getName());
050:                    break;
051:                }
052:
053:            }
054:
055:            protected void prepareGPL1() throws MalformedURLException,
056:                    IOException {
057:                rootFile = new File(tstCfg.getMediaDir() + File.separator
058:                        + tstCfg.getPlaylistName1());
059:                File C1 = new File(tstCfg.getMediaDir() + File.separator
060:                        + "Gpl" + File.separator + "testPlaylist1"
061:                        + File.separator + "testPlaylist1_1.jpg");
062:                File C2 = new File(tstCfg.getMediaDir() + File.separator
063:                        + "Gpl" + File.separator + "testPlaylist1"
064:                        + File.separator + "testPlaylist1_2.bmp");
065:                File C3 = new File(tstCfg.getMediaDir() + File.separator
066:                        + "Gpl" + File.separator + "testPlaylist1"
067:                        + File.separator + "testPlaylist1_3.jpg");
068:                this .childFiles = new File[] { C1, C2, C3 };
069:                // removce /c:
070:                this .rootURL = new URL("file", tstCfg.getTestClientIPAddress(),
071:                        tstCfg.getMediaDir() + "/" + tstCfg.getPlaylistName1());
072:                URL C1Url = new URL("file", tstCfg.getTestClientIPAddress(),
073:                        tstCfg.getMediaDir()
074:                                + "/Gpl/testPlaylist1/testPlaylist1_1.jpg");
075:                URL C2Url = new URL("file", tstCfg.getTestClientIPAddress(),
076:                        tstCfg.getMediaDir()
077:                                + "/Gpl/testPlaylist1/testPlaylist1_2.jpg");
078:                URL C3Url = new URL("file", tstCfg.getTestClientIPAddress(),
079:                        tstCfg.getMediaDir()
080:                                + "/Gpl/testPlaylist1/testPlaylist1_3.jpg");
081:                this .childURLs = new URL[] { C1Url, C2Url, C3Url };
082:                this .extension = ".gpl";
083:            }
084:
085:            protected void prepareGPL2() throws MalformedURLException,
086:                    IOException {
087:                rootFile = new File(tstCfg.getMediaDir() + File.separator
088:                        + tstCfg.getPlaylistName2());
089:                File C1 = new File(tstCfg.getMediaDir() + File.separator
090:                        + "Gpl" + File.separator + "testPlaylist1"
091:                        + File.separator + "testPlaylist1_1.jpg");
092:
093:                this .childFiles = new File[] { C1 };
094:                // removce /c:
095:                this .rootURL = new URL("file", tstCfg.getTestClientIPAddress(),
096:                        tstCfg.getMediaDir() + "/" + tstCfg.getPlaylistName2());
097:                URL C1Url = new URL("file", tstCfg.getTestClientIPAddress(),
098:                        tstCfg.getMediaDir()
099:                                + "/Gpl/testPlaylist1/testPlaylist1_1.jpg");
100:
101:                this .childURLs = new URL[] { C1Url };
102:                this .extension = ".gpl";
103:            }
104:
105:            /**
106:             * Gets the rootURL
107:             * @return Returns a URL
108:             */
109:            public URL getRootURL() {
110:                return rootURL;
111:            }
112:
113:            /**
114:             * Sets the rootURL
115:             * @param rootURL The rootURL to set
116:             */
117:            public void setRootURL(URL rootURL) {
118:                this .rootURL = rootURL;
119:            }
120:
121:            /**
122:             * Gets the rootFile
123:             * @return Returns a File
124:             */
125:            public File getRootFile() {
126:                return rootFile;
127:            }
128:
129:            /**
130:             * Sets the rootFile
131:             * @param rootFile The rootFile to set
132:             */
133:            public void setRootFile(File rootFile) {
134:                this .rootFile = rootFile;
135:            }
136:
137:            /**
138:             * Gets the extension
139:             * @return Returns a String
140:             */
141:            public String getExtension() {
142:                return extension;
143:            }
144:
145:            /**
146:             * Sets the extension
147:             * @param extension The extension to set
148:             */
149:            public void setExtension(String extension) {
150:                this .extension = extension;
151:            }
152:
153:            /**
154:             * Gets the childURLs
155:             * @return Returns a URL[]
156:             */
157:            public URL[] getChildURLs() {
158:                return childURLs;
159:            }
160:
161:            /**
162:             * Sets the childURLs
163:             * @param childURLs The childURLs to set
164:             */
165:            public void setChildURLs(URL[] childURLs) {
166:                this .childURLs = childURLs;
167:            }
168:
169:            /**
170:             * Gets the childFiles
171:             * @return Returns a File[]
172:             */
173:            public File[] getChildFiles() {
174:                return childFiles;
175:            }
176:
177:            /**
178:             * Sets the childFiles
179:             * @param childFiles The childFiles to set
180:             */
181:            public void setChildFiles(File[] childFiles) {
182:                this.childFiles = childFiles;
183:            }
184:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.