1 26 27 package org.objectweb.openccm.ir3; 28 29 37 38 public class FinderDef_impl 39 extends HomeOperationBase 40 implements org.omg.CORBA.ComponentIR.FinderDefOperations 41 { 42 48 54 57 public 58 FinderDef_impl(IFR ifr, 59 HomeDef_impl home) 60 { 61 super(ifr, home); 63 64 setServant(new org.omg.CORBA.ComponentIR.FinderDefPOATie(this)); 66 } 67 68 74 77 public org.omg.CORBA.ComponentIR.FinderDef 78 asFinderDef() 79 { 80 return org.omg.CORBA.ComponentIR.FinderDefHelper.narrow(asObject()); 81 } 82 83 89 92 public org.omg.CORBA.DefinitionKind 93 def_kind() 94 { 95 return org.omg.CORBA.DefinitionKind.dk_Finder; 96 } 97 98 104 110 116 119 protected void 120 whenCreated() 121 { 122 if (!getIFR().getRepository().enable_mappings_) 124 return ; 125 126 128 InterfaceDef_impl explicit = ((HomeDef_impl)container_).base_interfaces_[0].getImpl(); 136 String explicit_base_id = explicit.getBaseID(); 137 String id = explicit_base_id + name() + ":" + version(); 138 org.omg.CORBA.ExceptionDef [] excs1 = exceptions(); 139 org.omg.CORBA.ExceptionDef [] excs2 = new org.omg.CORBA.ExceptionDef [excs1.length+1]; 140 excs2[0] = org.omg.CORBA.ExceptionDefHelper.narrow( 141 getIFR().getRepository().lookup("::Components::FinderFailure")); 142 for (int i=0;i<excs1.length;i++) 143 excs2[i+1] = excs1[i]; 144 145 explicit.create_operation(id, name(), version(), result_def(), mode(), params(), 146 excs2, contexts()); 147 148 String cont_base_id = container_.getBaseContainerID(); 155 156 String explicit_exe_id = cont_base_id + "CCM_" + container_.name() + "Explicit:" + container_.version(); 157 org.omg.CORBA.ExtLocalInterfaceDef explicit_exe = org.omg.CORBA.ExtLocalInterfaceDefHelper.narrow( 158 getIFR().getRepository().lookup_mapped_id(explicit_exe_id)); 159 org.omg.CORBA.InterfaceDef enterprise_comp = org.omg.CORBA.InterfaceDefHelper.narrow( 160 getIFR().getRepository().lookup("::Components::EnterpriseComponent")); 161 162 id = cont_base_id + "CCM_" + container_.name() + "Explicit/" + name() + ":" + version(); 163 164 explicit_exe.create_operation(id, name(), version(), 165 enterprise_comp, 166 mode(), 167 params(), 168 exceptions(), 169 contexts()); 170 } 171 } 172 | Popular Tags |