1 28 29 package ist.coach.itut_m3120Components.ManagedElementProviderComposition; 30 31 import ist.coach.coachEmfCommon.ManagedElementValueTypeImpl; 32 import ist.coach.coachEmfCommon.ApplicationErrorInfoTypeImpl; 33 import ist.coach.coachEmfCommon.ObjectCreationImpl; 34 import ist.coach.coachEmfCommon.CreateErrorInfoTypeImpl; 35 import intt.itu.itut_x780.CreateError; 36 import intt.itu.itut_x780.AttributeValueType; 37 import intt.itu.itut_x780.UIDType; 38 39 import ist.coach.coachEmfCommon.Utils; 40 import ist.coach.coachEmfCommon.ExceptionMessages; 41 47 public class mgmtSegImpl 48 extends ist.coach.itut_m3120Components.ManagedElementProviderComposition.mgmtSeg 49 { 50 56 62 public mgmtSegImpl() 63 { 64 } 65 66 72 75 public void 76 create(org.omg.CosNaming.NameComponent [] name, String objectClass, 77 String [] packages, short deletePolicy, 78 intt.itu.itut_x780.SourceIndicatorType sourceIndicator, 79 intt.itu.itut_x780.AdministrativeStateType administrativeState, 80 String userLabel, String vendorName, String version, String locationName) 81 throws intt.itu.itut_x780.CreateError, 82 83 intt.itu.itut_x780.ApplicationError 84 { 85 if (ManagedElementProviderImpl.elements.containsKey(Utils.name2string(name))) { 89 System.err.println(Utils.name2string(name) + " already exists!"); 90 CreateErrorInfoTypeImpl error_code = new CreateErrorInfoTypeImpl(); 91 error_code.error = new UIDType( 92 intt.itu.itut_x780.CreateErrorConst.moduleName.value, 93 intt.itu.itut_x780.CreateErrorConst.duplicateName.value); 94 95 error_code.details = ExceptionMessages.already_exists_error; 96 throw new CreateError(error_code); 97 } 98 ManagedElementValueTypeImpl value_type = 99 new ManagedElementValueTypeImpl(name, objectClass, packages, 100 sourceIndicator, deletePolicy, administrativeState, 101 userLabel, vendorName, version, locationName); 102 103 synchronized(ManagedElementProviderImpl.elements) { 104 ManagedElementProviderImpl.elements.put(Utils.name2string(name), value_type); 105 } 106 107 org.omg.TimeBase.UtcT eventTime = new org.omg.TimeBase.UtcT(System.currentTimeMillis(), 108 0,(short) 0,(short) 0); 109 110 get_context().push_objectCreation_alarm(new ObjectCreationImpl(eventTime, name, 112 objectClass, 113 ManagedElementProviderImpl.getUniqueNotificationIdentifier(), 114 sourceIndicator, 115 new AttributeValueType[0])); 116 117 } 118 119 122 public String 123 facade_name() 124 { 125 return get_main_segment().facade_name(); 129 } 130 131 } 132 | Popular Tags |