Source Code Cross Referenced for WeblogicTOPLinkDeploymentTool.java in  » Build » ANT » org » apache » tools » ant » taskdefs » optional » ejb » 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 » Build » ANT » org.apache.tools.ant.taskdefs.optional.ejb 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         *  Licensed to the Apache Software Foundation (ASF) under one or more
003:         *  contributor license agreements.  See the NOTICE file distributed with
004:         *  this work for additional information regarding copyright ownership.
005:         *  The ASF licenses this file to You under the Apache License, Version 2.0
006:         *  (the "License"); you may not use this file except in compliance with
007:         *  the License.  You may obtain a copy of the License at
008:         *
009:         *      http://www.apache.org/licenses/LICENSE-2.0
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:         */
018:
019:        package org.apache.tools.ant.taskdefs.optional.ejb;
020:
021:        import java.io.File;
022:        import java.util.Hashtable;
023:        import org.apache.tools.ant.BuildException;
024:        import org.apache.tools.ant.Project;
025:
026:        /**
027:         * Deployment tool for Weblogic TOPLink.
028:         */
029:        public class WeblogicTOPLinkDeploymentTool extends
030:                WeblogicDeploymentTool {
031:
032:            private static final String TL_DTD_LOC = "http://www.objectpeople.com/tlwl/dtd/toplink-cmp_2_5_1.dtd";
033:
034:            private String toplinkDescriptor;
035:            private String toplinkDTD;
036:
037:            /**
038:             * Setter used to store the name of the toplink descriptor.
039:             * @param inString the string to use as the descriptor name.
040:             */
041:            public void setToplinkdescriptor(String inString) {
042:                this .toplinkDescriptor = inString;
043:            }
044:
045:            /**
046:             * Setter used to store the location of the toplink DTD file.
047:             * This is expected to be an URL (file or otherwise). If running
048:             * this on NT using a file URL, the safest thing would be to not use a
049:             * drive spec in the URL and make sure the file resides on the drive that
050:             * ANT is running from.  This will keep the setting in the build XML
051:             * platform independent.
052:             *
053:             * @param inString the string to use as the DTD location.
054:             */
055:            public void setToplinkdtd(String inString) {
056:                this .toplinkDTD = inString;
057:            }
058:
059:            /**
060:             * Get the descriptor handler.
061:             * @param srcDir the source file.
062:             * @return the descriptor handler.
063:             */
064:            protected DescriptorHandler getDescriptorHandler(File srcDir) {
065:                DescriptorHandler handler = super .getDescriptorHandler(srcDir);
066:                if (toplinkDTD != null) {
067:                    handler.registerDTD("-//The Object People, Inc.//"
068:                            + "DTD TOPLink for WebLogic CMP 2.5.1//EN",
069:                            toplinkDTD);
070:                } else {
071:                    handler.registerDTD("-//The Object People, Inc.//"
072:                            + "DTD TOPLink for WebLogic CMP 2.5.1//EN",
073:                            TL_DTD_LOC);
074:                }
075:                return handler;
076:            }
077:
078:            /**
079:             * Add any vendor specific files which should be included in the
080:             * EJB Jar.
081:             * @param ejbFiles the hashtable to add files to.
082:             * @param ddPrefix the prefix to use.
083:             */
084:            protected void addVendorFiles(Hashtable ejbFiles, String ddPrefix) {
085:                super .addVendorFiles(ejbFiles, ddPrefix);
086:                // Then the toplink deployment descriptor
087:
088:                // Setup a naming standard here?.
089:
090:                File toplinkDD = new File(getConfig().descriptorDir, ddPrefix
091:                        + toplinkDescriptor);
092:
093:                if (toplinkDD.exists()) {
094:                    ejbFiles.put(META_DIR + toplinkDescriptor, toplinkDD);
095:                } else {
096:                    log(
097:                            "Unable to locate toplink deployment descriptor. "
098:                                    + "It was expected to be in "
099:                                    + toplinkDD.getPath(), Project.MSG_WARN);
100:                }
101:            }
102:
103:            /**
104:             * Called to validate that the tool parameters have been configured.
105:             * @throws BuildException if there is an error.
106:             */
107:            public void validateConfigured() throws BuildException {
108:                super .validateConfigured();
109:                if (toplinkDescriptor == null) {
110:                    throw new BuildException(
111:                            "The toplinkdescriptor attribute must "
112:                                    + "be specified");
113:                }
114:            }
115:        }
w__w_w.___j_a___v_a__2s___.__c___o_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.