Ejemplo n.º 1
0
  public Object getRegisteredObject(String objectID) {
    Object o = this.registry.getRegisteredObject(objectID);
    if (o == null) return null;

    if (!(o instanceof Class)) return this.registry.getRegisteredObject(objectID);

    try {
      // Create on-demand objects
      Object newObj = this.createAndRegisterObject(objectID, o);
      if (newObj instanceof Initializable) ((Initializable) newObj).initialize(this);
      return newObj;
    } catch (Exception e) {
      return null;
    }
  }
 public void initialize(InternalTypeMappingRegistry registry) throws Exception {
   ns1_myCDefectEventDefinition_SOAPSerializer =
       (CombinedSerializer)
           registry.getSerializer(
               SOAPConstants.NS_SOAP_ENCODING,
               com.seapine.ttsoapcgi.CDefectEventDefinition.class,
               ns1_CDefectEventDefinition_TYPE_QNAME);
   ns1_myCDefectEventDefinition_SOAPSerializer =
       ns1_myCDefectEventDefinition_SOAPSerializer.getInnermostSerializer();
   QName type = new QName("urn:testtrack-interface", "CEventDefinition");
   CombinedSerializer interfaceSerializer =
       new com.seapine.ttsoapcgi.CEventDefinition_SOAPSerializer(
           type, ENCODE_TYPE, NULLABLE, SOAPConstants.NS_SOAP_ENCODING);
   interfaceSerializer =
       new ReferenceableSerializerImpl(
           DONT_SERIALIZE_AS_REF, interfaceSerializer, SOAPVersion.SOAP_11);
   ns1_myCEventDefinition_SOAPSerializer = interfaceSerializer.getInnermostSerializer();
   if (ns1_myCEventDefinition_SOAPSerializer instanceof Initializable) {
     ((Initializable) ns1_myCEventDefinition_SOAPSerializer).initialize(registry);
   }
 }
 public void initialize(InternalTypeMappingRegistry registry) throws Exception {
   ns1_myLanguagePairNotUniquelyDecidedException_Exception_SOAPSerializer =
       (CombinedSerializer)
           registry.getSerializer(
               SOAPConstants.NS_SOAP_ENCODING,
               dictionary.LanguagePairNotUniquelyDecidedException_Exception.class,
               ns1_LanguagePairNotUniquelyDecidedException_TYPE_QNAME);
   ns1_myLanguagePairNotUniquelyDecidedException_Exception_SOAPSerializer =
       ns1_myLanguagePairNotUniquelyDecidedException_Exception_SOAPSerializer
           .getInnermostSerializer();
   ns1_myUnsupportedLanguagePairException_Exception_SOAPSerializer =
       (CombinedSerializer)
           registry.getSerializer(
               SOAPConstants.NS_SOAP_ENCODING,
               dictionary.UnsupportedLanguagePairException_Exception.class,
               ns1_UnsupportedLanguagePairException_TYPE_QNAME);
   ns1_myUnsupportedLanguagePairException_Exception_SOAPSerializer =
       ns1_myUnsupportedLanguagePairException_Exception_SOAPSerializer.getInnermostSerializer();
   ns1_myUnsupportedMatchingMethodException_Exception_SOAPSerializer =
       (CombinedSerializer)
           registry.getSerializer(
               SOAPConstants.NS_SOAP_ENCODING,
               dictionary.UnsupportedMatchingMethodException_Exception.class,
               ns1_UnsupportedMatchingMethodException_TYPE_QNAME);
   ns1_myUnsupportedMatchingMethodException_Exception_SOAPSerializer =
       ns1_myUnsupportedMatchingMethodException_Exception_SOAPSerializer.getInnermostSerializer();
   QName type = new QName("http://langrid.nict.go.jp/ws_1_2/", "InvalidParameterException");
   CombinedSerializer interfaceSerializer =
       new dictionary.InvalidParameterException_Exception_SOAPSerializer(
           type, ENCODE_TYPE, NULLABLE, SOAPConstants.NS_SOAP_ENCODING);
   interfaceSerializer =
       new ReferenceableSerializerImpl(
           DONT_SERIALIZE_AS_REF, interfaceSerializer, SOAPVersion.SOAP_11);
   ns1_myInvalidParameterException_Exception_SOAPSerializer =
       interfaceSerializer.getInnermostSerializer();
   if (ns1_myInvalidParameterException_Exception_SOAPSerializer instanceof Initializable) {
     ((Initializable) ns1_myInvalidParameterException_Exception_SOAPSerializer)
         .initialize(registry);
   }
 }
Ejemplo n.º 4
0
 /*
  * @see toolbox.util.ui.SmartAction#runAction(java.awt.event.ActionEvent)
  */
 public void runAction(ActionEvent e) throws Exception {
   ((Initializable) service_).initialize(MapUtils.EMPTY_MAP);
 }
Ejemplo n.º 5
0
 /**
  * Anti-pattern, why you no copy-pasta?
  *
  * @param listenable
  */
 private void contextualize(final OneArgumentListenable<E> listenable) {
   if (fInitializable != null) { // cold-start
     listenable.listen(fInitializable.provideInitialEvent());
   }
 }