Package gov.nasa.arc.mct.services.component

Examples of gov.nasa.arc.mct.services.component.ComponentRegistry.newInstance()


    // will be injected through the OSGi declarative services model
    ComponentRegistry registry = ComponentRegistryAccess.getComponentRegistry();
   
    if (registry != null) {
      // use the ComponentRegistry service to create a new instance of a component
      ExampleComponent ec = registry.newInstance(ExampleComponent.class, component);
   
      // additional information can be collected here to populate a model. This simply
      // sets a unique name
      ec.setDisplayName("newComponentFromMenu"+newCount.incrementAndGet());
     
View Full Code Here


  @Override
  public AbstractComponent createEvaluator(String languageType, String code,
                                           AbstractComponent parent) {
    ComponentRegistry registry = EvaluatorCreationServiceImpl.registry.get();
    EvaluatorComponent evaluator =
                              registry.newInstance(EvaluatorComponent.class, parent);
    evaluator.getData().setLanguage(languageType);
    evaluator.getData().setCode(code);
    evaluator.save();
   
    return evaluator;
View Full Code Here

  }
 
  @Override
  public AbstractComponent createMulti(String languageType, String code) {
    ComponentRegistry registry = MultiCreationServiceImpl.registry.get();
    MultiComponent evaluator = registry.newInstance(MultiComponent.class, null);
    evaluator.getData().setLanguage(languageType);
    evaluator.getData().setCode(code);
    evaluator.save();
   
    return evaluator;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.