1 26 27 package org.objectweb.openccm.ir3; 28 29 37 38 public class ComponentRepository_impl 39 extends Repository_impl 40 implements org.objectweb.openccm.ir3.api.ComponentRepositoryOperations 41 { 42 48 54 57 public 58 ComponentRepository_impl(IFR ifr) 59 { 60 this(ifr, false); 62 } 63 64 67 public 68 ComponentRepository_impl(IFR ifr, 69 boolean enable_mappings) 70 { 71 super(ifr, enable_mappings); 73 74 setServant(new org.objectweb.openccm.ir3.api.ComponentRepositoryPOATie(this)); 76 77 isIDL2Repository_ = false; 79 } 80 81 87 90 public org.omg.CORBA.ComponentIR.Repository 91 asComponentRepository() 92 { 93 super.isIDL2Repository_ = false; 94 return org.omg.CORBA.ComponentIR.RepositoryHelper.narrow(asObject()); 95 } 96 97 103 106 public org.omg.CORBA.ComponentIR.ModuleDef 107 create_component_module(String id, 108 String name, 109 String version) 110 { 111 ComponentModuleDef_impl module = new ComponentModuleDef_impl(getIFR(), this); 112 113 try 114 { 115 addContained(module, id, name, version); 116 } 117 catch(org.omg.CORBA.SystemException exc) 118 { 119 module.destroy(); 120 throw exc; 121 } 122 123 return module.asComponentModuleDef(); 124 } 125 126 129 public org.omg.CORBA.ComponentIR.ComponentDef 130 create_component(String id, 131 String name, 132 String version, 133 org.omg.CORBA.ComponentIR.ComponentDef base_component, 134 org.omg.CORBA.InterfaceDef [] supported_interfaces) 135 { 136 ComponentDef_impl c = new ComponentDef_impl(getIFR(), this); 137 try 138 { 139 addContained(c, id, name, version); 140 c.base_component(base_component); 141 c.supported_interfaces(supported_interfaces); 142 } 143 catch(org.omg.CORBA.SystemException exc) 144 { 145 c.destroy(); 146 throw exc; 147 } 148 149 c.whenCreated(); 150 return c.asComponentDef(); 151 } 152 153 156 public org.omg.CORBA.ComponentIR.HomeDef 157 create_home(String id, 158 String name, 159 String version, 160 org.omg.CORBA.ComponentIR.HomeDef base_home, 161 org.omg.CORBA.ComponentIR.ComponentDef managed_component, 162 org.omg.CORBA.InterfaceDef [] supported_interfaces, 163 org.omg.CORBA.ValueDef primary_key) 164 { 165 HomeDef_impl h = new HomeDef_impl(getIFR(), this); 166 167 try 168 { 169 addContained(h, id, name, version); 170 h.base_home(base_home); 171 h.managed_component(managed_component); 172 h.supported_interfaces(supported_interfaces); 173 h.primary_key(primary_key); 174 } 175 catch(org.omg.CORBA.SystemException exc) 176 { 177 h.destroy(); 178 throw exc; 179 } 180 181 h.whenCreated(); 182 return h.asHomeDef(); 183 } 184 185 188 public org.omg.CORBA.ComponentIR.EventDef 189 create_event(String id, 190 String name, 191 String version, 192 boolean is_custom, 193 boolean is_abstract, 194 org.omg.CORBA.ValueDef base_value, 195 boolean is_truncatable, 196 org.omg.CORBA.ValueDef [] abstract_base_values, 197 org.omg.CORBA.InterfaceDef [] supported_interfaces, 198 org.omg.CORBA.ExtInitializer[] initializers) 199 { 200 EventDef_impl event = new EventDef_impl(getIFR(), this); 201 202 try 203 { 204 addContained(event, id, name, version); 205 event.is_custom(is_custom); 206 event.is_abstract(is_abstract); 207 event.base_value(base_value); 208 event.is_truncatable(is_truncatable); 209 event.abstract_base_values(abstract_base_values); 210 event.supported_interfaces(supported_interfaces); 211 event.ext_initializers(initializers); 212 } 213 catch(org.omg.CORBA.SystemException exc) 214 { 215 event.destroy(); 216 throw exc; 217 } 218 219 event.whenCreated(); 220 return event.asEventDef(); 221 } 222 223 229 236 public org.omg.CORBA.Repository 237 as_IDL2_repository() 238 { 239 super.isIDL2Repository_ = true; 240 return super.asRepository(); 241 } 242 243 250 public org.omg.CORBA.ComponentIR.Repository 251 as_IDL3_repository() 252 { 253 super.isIDL2Repository_ = false; 254 return asComponentRepository(); 255 } 256 257 263 public org.omg.CORBA.Contained 264 lookup_mapped_id(String search_id) 265 { 266 Contained_impl contained = getMappedRID(search_id); 267 268 if (contained == null) return null; 270 271 return contained.asContained(); 272 } 273 274 275 281 287 public void 288 shutdown() 289 { 290 org.objectweb.openccm.corba.TheORB.shutdown(false); 291 } 292 } 293 | Popular Tags |