Source Code Cross Referenced for ModuleDef.java in  » Collaboration » JacORB » org » jacorb » ir » 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 » Collaboration » JacORB » org.jacorb.ir 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.jacorb.ir;
002:
003:        /*
004:         *        JacORB - a free Java ORB
005:         *
006:         *   Copyright (C) 1997-2004 Gerald Brose.
007:         *
008:         *   This library is free software; you can redistribute it and/or
009:         *   modify it under the terms of the GNU Library General Public
010:         *   License as published by the Free Software Foundation; either
011:         *   version 2 of the License, or (at your option) any later version.
012:         *
013:         *   This library is distributed in the hope that it will be useful,
014:         *   but WITHOUT ANY WARRANTY; without even the implied warranty of
015:         *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
016:         *   Library General Public License for more details.
017:         *
018:         *   You should have received a copy of the GNU Library General Public
019:         *   License along with this library; if not, write to the Free
020:         *   Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
021:         */
022:
023:        import org.apache.avalon.framework.logger.Logger;
024:        import org.omg.CORBA.INTF_REPOS;
025:        import org.omg.PortableServer.POA;
026:
027:        /**
028:         * @author Gerald Brose
029:         * @version $Id: ModuleDef.java,v 1.10 2006/06/15 16:43:14 alphonse.bendt Exp $
030:         */
031:        public class ModuleDef extends Contained implements 
032:                org.omg.CORBA.ModuleDefOperations, ContainerType {
033:            private Container delegate;
034:            private String path = null;
035:            private Logger logger;
036:
037:            public ModuleDef(String path, String full_name,
038:                    org.omg.CORBA.Container def_in,
039:                    org.omg.CORBA.Repository ir, ClassLoader loader, POA poa,
040:                    Logger logger) throws INTF_REPOS {
041:                this .logger = logger;
042:                this .path = path;
043:                this .full_name = full_name;
044:
045:                if (this .logger.isDebugEnabled()) {
046:                    this .logger.debug("New ModuleDef " + full_name + " path: "
047:                            + path);
048:                }
049:
050:                def_kind = org.omg.CORBA.DefinitionKind.dk_Module;
051:                if (ir == null) {
052:                    throw new INTF_REPOS("No repository!");
053:                }
054:
055:                containing_repository = ir;
056:                defined_in = def_in;
057:
058:                try {
059:                    id(RepositoryID.toRepositoryID(full_name, false, loader));
060:                    if (full_name.indexOf(".") > 0) {
061:                        name(full_name
062:                                .substring(full_name.lastIndexOf(".") + 1));
063:
064:                        if (defined_in instanceof  org.omg.CORBA.Contained) {
065:                            absolute_name = ((org.omg.CORBA.Contained) defined_in)
066:                                    .absolute_name()
067:                                    + "::" + name();
068:
069:                            if (this .logger.isDebugEnabled()) {
070:                                this .logger.debug("New ModuleDef 1a) name "
071:                                        + name() + " absolute: "
072:                                        + absolute_name);
073:                            }
074:                        } else {
075:                            absolute_name = "::" + name();
076:
077:                            if (this .logger.isDebugEnabled()) {
078:                                this .logger.debug("New ModuleDef 1b) name "
079:                                        + name() + " absolute: "
080:                                        + absolute_name + " defined_in : "
081:                                        + defined_in.getClass().getName());
082:                            }
083:                        }
084:                    } else {
085:                        defined_in = containing_repository;
086:                        name(full_name);
087:                        absolute_name = "::" + name();
088:
089:                        if (this .logger.isDebugEnabled()) {
090:                            this .logger.debug("New ModuleDef 2) name " + name()
091:                                    + " absolute:" + absolute_name);
092:                        }
093:                    }
094:                    delegate = new Container(this , path, full_name, loader,
095:                            poa, this .logger);
096:
097:                } catch (Exception e) {
098:                    this .logger.error("Caught Exception", e);
099:                    throw new INTF_REPOS(ErrorMsg.IR_Not_Implemented,
100:                            org.omg.CORBA.CompletionStatus.COMPLETED_NO);
101:                }
102:            }
103:
104:            public String path() {
105:                return path;
106:            }
107:
108:            public void loadContents() {
109:                if (this .logger.isDebugEnabled()) {
110:                    this .logger.debug("Module " + name() + " loading...");
111:                }
112:
113:                delegate.loadContents();
114:
115:                if (this .logger.isDebugEnabled()) {
116:                    this .logger.debug("Module " + name() + " loaded");
117:                }
118:            }
119:
120:            void define() {
121:                delegate.define();
122:            }
123:
124:            public org.omg.CORBA.Contained lookup(/*ScopedName*/String name) {
125:                if (this .logger.isDebugEnabled()) {
126:                    this .logger
127:                            .debug("Module " + this .name + " lookup " + name);
128:                }
129:
130:                return delegate.lookup(name);
131:            }
132:
133:            public org.omg.CORBA.Contained[] contents(
134:                    org.omg.CORBA.DefinitionKind limit_type,
135:                    boolean exclude_inherited) {
136:                return delegate.contents(limit_type, exclude_inherited);
137:            }
138:
139:            public org.omg.CORBA.Contained[] lookup_name(String search_name,
140:                    int levels_to_search,
141:                    org.omg.CORBA.DefinitionKind limit_type,
142:                    boolean exclude_inherited) {
143:                return delegate.lookup_name(search_name, levels_to_search,
144:                        limit_type, exclude_inherited);
145:            }
146:
147:            public org.omg.CORBA.ContainerPackage.Description[] describe_contents(
148:                    org.omg.CORBA.DefinitionKind limit_type,
149:                    boolean exclude_inherited, int max_returned_objs) {
150:                return delegate.describe_contents(limit_type,
151:                        exclude_inherited, max_returned_objs);
152:            }
153:
154:            public org.omg.CORBA.ModuleDef create_module(String id,
155:                    String name, String version) {
156:                return delegate.create_module(id, name, version);
157:            }
158:
159:            public org.omg.CORBA.ConstantDef create_constant(String id,
160:                    String name, String version, org.omg.CORBA.IDLType type,
161:                    org.omg.CORBA.Any value) {
162:                return delegate.create_constant(id, name, version, type, value);
163:            }
164:
165:            public org.omg.CORBA.StructDef create_struct(String id,
166:                    String name, String version,
167:                    org.omg.CORBA.StructMember[] members) {
168:                return delegate.create_struct(id, name, version, members);
169:            }
170:
171:            public org.omg.CORBA.UnionDef create_union(String id, String name,
172:                    String version, org.omg.CORBA.IDLType discriminator_type,
173:                    org.omg.CORBA.UnionMember[] members) {
174:                return delegate.create_union(id, name, version,
175:                        discriminator_type, members);
176:            }
177:
178:            public org.omg.CORBA.EnumDef create_enum(String id, String name,
179:                    String version, String[] members) {
180:                return delegate.create_enum(id, name, version, members);
181:            }
182:
183:            public org.omg.CORBA.AliasDef create_alias(String id, String name,
184:                    String version, org.omg.CORBA.IDLType original_type) {
185:                return delegate.create_alias(id, name, version, original_type);
186:            }
187:
188:            public org.omg.CORBA.ExceptionDef create_exception(String id,
189:                    String name, String version,
190:                    org.omg.CORBA.StructMember[] member) {
191:                return delegate.create_exception(id, name, version, member);
192:            }
193:
194:            /**
195:             * not supported
196:             */
197:
198:            public org.omg.CORBA.InterfaceDef create_interface(String id,
199:                    String name, String version,
200:                    org.omg.CORBA.InterfaceDef[] base_interfaces,
201:                    boolean is_abstract) {
202:                return delegate.create_interface(id, name, version,
203:                        base_interfaces, is_abstract);
204:            }
205:
206:            /**
207:             * not supported
208:             */
209:
210:            public org.omg.CORBA.ValueBoxDef create_value_box(String id,
211:                    String name, String version, org.omg.CORBA.IDLType type) {
212:                return delegate.create_value_box(id, name, version, type);
213:            }
214:
215:            /**
216:             * not supported
217:             */
218:
219:            public org.omg.CORBA.ValueDef create_value(String id, String name,
220:                    String version, boolean is_custom, boolean is_abstract,
221:                    org.omg.CORBA.ValueDef base_value, boolean is_truncatable,
222:                    org.omg.CORBA.ValueDef[] abstract_base_values,
223:                    org.omg.CORBA.InterfaceDef[] supported_interfaces,
224:                    org.omg.CORBA.Initializer[] initializers) {
225:                return delegate.create_value(id, name, version, is_custom,
226:                        is_abstract, base_value, is_truncatable,
227:                        abstract_base_values, supported_interfaces,
228:                        initializers);
229:            }
230:
231:            /**
232:             * not supported
233:             */
234:
235:            public org.omg.CORBA.NativeDef create_native(java.lang.String id,
236:                    java.lang.String name, java.lang.String version) {
237:                return delegate.create_native(id, name, version);
238:            }
239:
240:            // from Contained
241:
242:            public org.omg.CORBA.ContainedPackage.Description describe() {
243:                org.omg.CORBA.Any a = orb.create_any();
244:                String defined_in_id = null;
245:
246:                if (defined_in instanceof  org.omg.CORBA.Contained)
247:                    defined_in_id = ((org.omg.CORBA.Contained) defined_in).id();
248:                else
249:                    defined_in_id = "IR";
250:
251:                org.omg.CORBA.ModuleDescription m = new org.omg.CORBA.ModuleDescription(
252:                        name, id, defined_in_id, version);
253:
254:                org.omg.CORBA.ModuleDescriptionHelper.insert(a, m);
255:                return new org.omg.CORBA.ContainedPackage.Description(
256:                        org.omg.CORBA.DefinitionKind.dk_Module, a);
257:            }
258:
259:            public void destroy() {
260:                delegate.destroy();
261:            }
262:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.