Examples of Implementation


Examples of fr.imag.adele.apam.Implementation

    // We take care only of implementations
    if (!(comp instanceof Implementation)) {
      return;
    }

    Implementation impl = (Implementation) comp;
    // it was not deployed
    if (!deployed && impl.isUsed()) {
      logger.info(" : selected " + impl);
      return;
    }

    CompositeType compoType;
    if (source instanceof Instance) {
      compoType = ((Instance) source).getComposite().getCompType();
    } else if (source instanceof Implementation) {
      compoType = ((Implementation) source).getInCompositeType().iterator().next();
    } else {
      logger.error("Should not call deployedImpl on a source Specification " + source);
      // TODO in which composite to put it. Still in root ?
      return;
    }
    ((CompositeTypeImpl) compoType).deploy(impl);

    // it is deployed or was never used so far
    if (impl.isUsed()) {
      logger.info(" : logically deployed " + impl);
    } else {// it was unused so far.
      ((ComponentImpl) impl).setFirstDeployed(compoType);
      if (deployed) {
        logger.info(" : deployed " + impl);
View Full Code Here

Examples of fr.imag.adele.apam.Implementation

    return (Implementation) resolve.setResolved.iterator().next();
  }

  @Override
  public void updateComponent(String componentName) {
    Implementation impl = CST.componentBroker.getImpl(componentName);
    if (impl == null) {
      logger.error("Unknown component " + componentName);
      return;
    }
    UpdateMan.updateComponent(impl);
View Full Code Here

Examples of fr.imag.adele.apam.Implementation

    }

    @Test
    public void RelationPreferencesForSourceInstanceTargetInstance_tc114() {

  Implementation implementation = waitForImplByName(null,
    "S07-DependencyImpl");

  Implementation implementationTarget = waitForImplByName(null,
    "S07-implementation-17");

  Instance instanceInvalid01 = implementation.createInstance(null,
    new HashMap<String, String>() {
        {
      put("criteria", "do-not-take-this-instance");
        }
    });
  Instance instanceInvalid02 = implementation.createInstance(null,
    new HashMap<String, String>() {
        {
      put("criteria", "neither-this");
        }
    });
  Instance instanceValid01 = implementation.createInstance(null,
    new HashMap<String, String>() {
        {
      put("criteria", "the-chosen-one");
        }
    });
  Instance instanceValid02 = implementation.createInstance(null,
    new HashMap<String, String>() {
        {
      put("criteria", "the-chosen-one");
        }
    });
  Instance instanceInvalid03 = implementation.createInstance(null,
    new HashMap<String, String>() {
        {
      put("criteria", "ignore-this");
        }
    });

  Instance instanceTarget = implementationTarget.createInstance(null,
    null);

  S07ImplementationImporter17 implem = (S07ImplementationImporter17) instanceTarget
    .getServiceObject();
View Full Code Here

Examples of fr.imag.adele.apam.Implementation

    }

    @Test
    public void RelationSourceImplementationTargetImplementation_tc097() {

  Implementation implementation = waitForImplByName(null,
    "S07-implementation-01");

  Instance instance = implementation.createInstance(null,
    Collections.<String, String> emptyMap());

  S07ImplementationImporter01 dependency = (S07ImplementationImporter01) instance
    .getServiceObject();
View Full Code Here

Examples of fr.imag.adele.apam.Implementation

    }

    @Test
    public void RelationSourceImplementationTargetImplementationOverride_tc100() {

  Implementation implementation = waitForImplByName(null,
    "S07-implementation-04");

  Instance instance = implementation.createInstance(null,
    Collections.<String, String> emptyMap());

  S07ImplementationImporter04 dependency = (S07ImplementationImporter04) instance
    .getServiceObject();
View Full Code Here

Examples of fr.imag.adele.apam.Implementation

    }

    @Test
    public void RelationSourceImplementationTargetInstance_tc099() {

  Implementation implementation = waitForImplByName(null,
    "S07-implementation-03");

  Instance instance = implementation.createInstance(null,
    Collections.<String, String> emptyMap());

  S07ImplementationImporter03 dependency = (S07ImplementationImporter03) instance
    .getServiceObject();
View Full Code Here

Examples of fr.imag.adele.apam.Implementation

    public void RelationSourceImplementationTargetInstanceCreationEager_tc101() {

  // Now by default resolve = exists, creating dependency
  // target of the wire in implem-05 (it will exist so link can be
  // created)
  Implementation target = waitForImplByName(null, "S07-implementation-04");
  target.createInstance(null, null);

  Implementation implementation = waitForImplByName(null,
    "S07-implementation-05");

  Instance instance = implementation.createInstance(null,
    Collections.<String, String> emptyMap());

  auxListInstances();

  ComponentImpl ci = (ComponentImpl) implementation;
View Full Code Here

Examples of fr.imag.adele.apam.Implementation

    }

    @Test
    public void RelationSourceImplementationTargetInstanceCreationLazy_tc102() {

  Implementation implementation = waitForImplByName(null,
    "S07-implementation-06");

  Instance instance = implementation.createInstance(null,
    Collections.<String, String> emptyMap());

  S07ImplementationImporter06 dependency = (S07ImplementationImporter06) instance
    .getServiceObject();
View Full Code Here

Examples of fr.imag.adele.apam.Implementation

    }

    @Test
    public void RelationSourceImplementationTargetSpecification_tc098() {

  Implementation implementation = waitForImplByName(null,
    "S07-implementation-02");

  Instance instance = implementation.createInstance(null, null);

  S07ImplementationImporter02 dependency = (S07ImplementationImporter02) instance
    .getServiceObject();

  auxListProperties(dependency.getInjected());
View Full Code Here

Examples of fr.imag.adele.apam.Implementation

    }

    @Test
    public void RelationSourceInstanceTargetImplementation_tc119() {

  Implementation implementation = waitForImplByName(null,
    "S07-implementation-18");

  Instance instance = implementation.createInstance(null, new HashMap() {
      {
    put("instance-property", "ok");
      }
  });// Collections.<String, String> emptyMap()
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.