Source Code Cross Referenced for BSServiceProxyGeneratorImpl.java in  » UML » MetaBoss » com » metaboss » sdlctools » services » codegeneration » serviceproxygenerator » datavalidationproxy » 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 » UML » MetaBoss » com.metaboss.sdlctools.services.codegeneration.serviceproxygenerator.datavalidationproxy 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        // THIS SOFTWARE IS PROVIDED BY SOFTARIS PTY.LTD. AND OTHER METABOSS
002:        // CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING,
003:        // BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
004:        // FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOFTARIS PTY.LTD.
005:        // OR OTHER METABOSS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
006:        // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
007:        // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
008:        // OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
009:        // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
010:        // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
011:        // EVEN IF SOFTARIS PTY.LTD. OR OTHER METABOSS CONTRIBUTORS ARE ADVISED OF THE
012:        // POSSIBILITY OF SUCH DAMAGE.
013:        //
014:        // Copyright 2000-2005 © Softaris Pty.Ltd. All Rights Reserved.
015:        package com.metaboss.sdlctools.services.codegeneration.serviceproxygenerator.datavalidationproxy;
016:
017:        import java.util.Properties;
018:
019:        import javax.naming.Context;
020:        import javax.naming.InitialContext;
021:        import javax.naming.NamingException;
022:
023:        import org.apache.commons.logging.Log;
024:        import org.apache.commons.logging.LogFactory;
025:
026:        import com.metaboss.enterprise.bs.BSException;
027:        import com.metaboss.enterprise.bs.BSNamingAndDirectoryServiceInvocationException;
028:        import com.metaboss.sdlctools.services.codegeneration.BSGenericGenerator;
029:        import com.metaboss.sdlctools.services.codegeneration.BSServiceProxyGenerator;
030:        import com.metaboss.sdlctools.services.codegeneration.CodeGenerationStylesheetAccessor;
031:        import com.metaboss.sdlctools.services.codegenerationstylesheet.STServiceStylesheet;
032:        import com.metaboss.sdlctools.services.codegenerationstylesheet.STServicemoduleStylesheet;
033:
034:        /** Generator of adapter offering access via simple strings */
035:        public class BSServiceProxyGeneratorImpl implements 
036:                BSServiceProxyGenerator {
037:            // Commons Logging instance.
038:            private static final Log sLogger = LogFactory
039:                    .getLog(BSServiceProxyGeneratorImpl.class);
040:
041:            public BSServiceProxyGeneratorImpl(java.util.Hashtable pEnvironment) {
042:            }
043:
044:            // Generates servicemodules distribution implementation sourcecode for the particular servicemodule within particular enterprise
045:            public void generateSourceCodeForService(
046:                    String pGenerationDirectoryPath, String pServiceRef)
047:                    throws BSException {
048:                try {
049:                    sLogger.info("Generating data validation proxy source for "
050:                            + pServiceRef + " service...");
051:                    // Get the generator and run the plan
052:                    Context ctx = new InitialContext();
053:                    BSGenericGenerator lGenerator = (BSGenericGenerator) ctx
054:                            .lookup(BSGenericGenerator.COMPONENT_URL);
055:                    lGenerator
056:                            .generateDirectoryAsPerPlanForMetaBossModelElement(
057:                                    pGenerationDirectoryPath,
058:                                    "implementation.enterprise.java.services.generatedproxy.datavalidation",
059:                                    pServiceRef, new Properties());
060:                    // Done
061:                    sLogger
062:                            .info("Done generating data validation proxy source for "
063:                                    + pServiceRef + " service.");
064:                } catch (NamingException e) {
065:                    throw new BSNamingAndDirectoryServiceInvocationException(e);
066:                }
067:            }
068:
069:            // Generates service proxy implementation sourcecode for the particular whole servicemodule within particular enterprise
070:            public void generateSourceCodeForServicemodule(
071:                    String pGenerationDirectoryPath, String pServicemoduleRef)
072:                    throws BSException {
073:                try {
074:                    sLogger.info("Generating data validation proxy source for "
075:                            + pServicemoduleRef + " servicemodule...");
076:                    // Get the generator and run the plan
077:                    Context ctx = new InitialContext();
078:                    BSGenericGenerator lGenerator = (BSGenericGenerator) ctx
079:                            .lookup(BSGenericGenerator.COMPONENT_URL);
080:                    lGenerator
081:                            .generateDirectoryAsPerPlanForMetaBossModelElement(
082:                                    pGenerationDirectoryPath,
083:                                    "implementation.enterprise.java.services.generatedproxy.datavalidation",
084:                                    pServicemoduleRef, new Properties());
085:                    // Done
086:                    sLogger
087:                            .info("Done generating data validation proxy source for "
088:                                    + pServicemoduleRef + " servicemodule.");
089:                } catch (NamingException e) {
090:                    throw new BSNamingAndDirectoryServiceInvocationException(e);
091:                }
092:            }
093:
094:            /* Returns the name of the package where adapter code is generated to */
095:            public String getPackageNameForService(String pServiceRef)
096:                    throws BSException {
097:                // This is a standard proxy - so stylesheet dictates the package name
098:                STServiceStylesheet lServiceStylesheet = CodeGenerationStylesheetAccessor
099:                        .getServiceStylesheet(pServiceRef);
100:                return lServiceStylesheet.getGeneratedProxyBasePackageName()
101:                        + ".datavalidation";
102:            }
103:
104:            // Returns the name of the root package where proxy implementation code is generated to
105:            public String getPackageNameForServicemodule(
106:                    String pServicemoduleRef) throws BSException {
107:                // This is a standard proxy - so stylesheet dictates the package name
108:                STServicemoduleStylesheet lServicemoduleStylesheet = CodeGenerationStylesheetAccessor
109:                        .getServicemoduleStylesheet(pServicemoduleRef);
110:                return lServicemoduleStylesheet
111:                        .getGeneratedProxyRootPackageName()
112:                        + ".datavalidation";
113:            }
114:
115:            /* @return array of names of adapters, which are required by this adapter,
116:             * may be zero length array if this adapter is not relying on any other one. */
117:            public String[] getRequiredAdapters() throws BSException {
118:                return new String[] { "datavalidation.dresdenocltoolkit" }; // data validation adapter is required. using Dresden OCL Toolkit 
119:            }
120:        }
w_w___w_.___j___a___v_a___2__s___.c__o__m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.