1 28 29 package ist.coach.coachEmsMibComponents.IpRoutingEntryFactoryProviderComposition; 30 31 import ist.coach.coachEmfCommon.Utils; 32 import ist.coach.coachEmfCommon.CreateController; 33 import ist.coach.coachEmfCommon.CreateBindingInfo; 34 import ist.coach.coachEmfCommon.ExceptionMessages; 35 36 import intt.itu.itut_x780.UIDType; 37 import intt.itu.itut_x780.CreateError; 38 import intt.itu.itut_x780.ApplicationError; 39 40 import intt.itu.itut_m3120.conditionalPackages.*; 41 42 import ist.coach.coachEmfCommon.CreateErrorInfoTypeImpl; 43 import ist.coach.coachEmfCommon.ApplicationErrorInfoTypeImpl; 44 import ist.coach.coachEmsMibComponents.IpRoutingEntryMgmt; 45 46 import ist.coach.coachEmfServices.EmfBasicLog.*; 47 53 public class IpRoutingEntryFactoryProviderImpl 54 extends ist.coach.coachEmsMibComponents.IpRoutingEntryFactoryProviderComposition.IpRoutingEntryFactoryProvider_impl 55 { 56 intt.itu.itut_q816.ContainmentComponent c_admin = null; 63 intt.itu.itut_q816.Containment c_query = null; 64 private BasicLog logSupport; 65 66 private static final String FACTORY_CLASS = "IpRoutingEntryFactory"; 67 IpRoutingEntryMgmt facade = null; 68 74 public IpRoutingEntryFactoryProviderImpl() 75 { 76 } 77 92 public void 93 configuration_complete() 94 throws org.omg.Components.InvalidConfiguration 95 { 96 if ((facade = get_context().get_connection_facade()) == null) 100 throw new org.omg.Components.InvalidConfiguration(); 101 102 if ((c_admin = get_context().get_connection_containment_admin()) == null) 103 throw new org.omg.Components.InvalidConfiguration(); 104 105 if ((c_query = get_context().get_connection_containment_query()) == null) 106 throw new org.omg.Components.InvalidConfiguration(); 107 108 if ((logSupport = get_context().get_connection_basic_log()) == null) 109 throw new org.omg.Components.InvalidConfiguration(); 110 111 System.err.println("IpRoutingEntryFactoryProvider configuration completed..."); 112 } 113 119 122 public org.omg.CosNaming.NameComponent [] 123 create(String nameBindingID, 124 org.omg.CosNaming.NameComponent [] superior, 125 String reqID, 126 String [] packageNameList, 127 byte[] ipRouteDest, 128 byte[] mgmtIpAddress, 129 int snmpPort, 130 int supportedSnmpVersions) 131 throws intt.itu.itut_x780.ApplicationError, 132 133 intt.itu.itut_x780.CreateError 134 { 135 String nameBinding_str = "ist.coach.coachEmsMib.NameBindings." + 139 nameBindingID; 140 141 CreateBindingInfo info = CreateController.checkNameBinding(nameBinding_str); 142 143 String objectKind = info.objectKind; 144 short deletePolicy = info.deletePolicy; 145 146 if (! c_query.exists(superior)) { 148 ApplicationErrorInfoTypeImpl error_code = new ApplicationErrorInfoTypeImpl(); 149 error_code.error = new UIDType( 150 intt.itu.itut_x780.ApplicationErrorConst.moduleName.value, 151 intt.itu.itut_x780.ApplicationErrorConst.objectNotFound.value); 152 153 error_code.details = Utils.name2string(superior) + 154 ExceptionMessages.parent_object_error; 155 156 throw new ApplicationError(error_code); 157 } 158 159 String allocatedId = reqID; 161 if (reqID == null || reqID.length() == 0) { 162 163 org.omg.CosNaming.NameComponent [][] siblings = 164 c_query.getContained(superior); 165 166 allocatedId = "RoutingEntry" + CreateController.autoCreateId(siblings); 167 } 168 169 org.omg.CosNaming.NameComponent [] name = CreateController.createFullName( 171 superior, 172 allocatedId, 173 Utils.name2facade(facade.facade_name()), 174 objectKind); 175 176 177 Utils.pretty_log(logSupport, FACTORY_CLASS, "Factory", (short) LogSeverity._Info, 178 "proceed to create " + Utils.name2string(name)); 179 180 181 186 facade.create( 187 name, 188 objectKind, 189 packageNameList, 190 deletePolicy, 191 intt.itu.itut_x780.SourceIndicatorType.resourceOperation, 192 superior, 193 ipRouteDest, 194 mgmtIpAddress, 195 supportedSnmpVersions, 196 snmpPort); 197 198 c_admin.addName(name, superior); 200 201 204 Utils.pretty_log(logSupport, FACTORY_CLASS, "Factory", (short) LogSeverity._Info, 205 "successfully created " + Utils.name2string(name)); 206 return name; 207 } 208 209 212 public org.omg.CosNaming.NameComponent [] 213 create_base(String nameBinding, org.omg.CosNaming.NameComponent [] superior, String reqId) 214 throws intt.itu.itut_x780.CreateError, 215 216 intt.itu.itut_x780.ApplicationError 217 { 218 return null; 222 } 223 224 } 225 | Popular Tags |