Package org.teiid.adminapi.impl

Examples of org.teiid.adminapi.impl.VDBTranslatorMetaData


    // get the metadata store of the VDB (this is build in parse stage)
    MetadataStoreGroup store = unit.getAttachment(MetadataStoreGroup.class);
   
    // add required connector managers; if they are not already there
    for (Translator t: deployment.getOverrideTranslators()) {
      VDBTranslatorMetaData data = (VDBTranslatorMetaData)t;
     
      String type = data.getType();
      Translator parent = this.translatorRepository.getTranslatorMetaData(type);
      if ( parent == null) {
        throw new DeploymentException(RuntimePlugin.Util.getString("translator_type_not_found", unit.getName())); //$NON-NLS-1$
      }
     
      Set<String> keys = parent.getProperties().stringPropertyNames();
      for (String key:keys) {
        if (data.getPropertyValue(key) == null && parent.getPropertyValue(key) != null) {
          data.addProperty(key, parent.getPropertyValue(key));
        }
      }
      repo.addTranslatorMetadata(data.getName(), data);
    }
    createConnectorManagers(cmr, repo, deployment);
    boolean asynchLoad = false;
    // if store is null and vdb dynamic vdb then try to get the metadata
    if (store == null && deployment.isDynamic()) {
View Full Code Here


      }
    }   
    else if (property.getName().equals("overrideTranslators")) { //$NON-NLS-1$
      List<ManagedObject> translators = (List<ManagedObject>)MetaValueFactory.getInstance().unwrap(property.getValue());
      for (ManagedObject translator:translators) {
        VDBTranslatorMetaData translatorInstance = vdb.getTranslator(translator.getName());
        ManagedProperty mp = translator.getProperty("property"); //$NON-NLS-1$
        List<PropertyMetadata> properties = (List<PropertyMetadata>)MetaValueFactory.getInstance().unwrap(mp.getValue());
        for (PropertyMetadata managedProperty:properties) {
          translatorInstance.addProperty(managedProperty.getName(), managedProperty.getValue());
        }
      }
    }
    else {
      super.setValue(beanInfo, property, vdb, value);
View Full Code Here

TOP

Related Classes of org.teiid.adminapi.impl.VDBTranslatorMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.