Package archmapper.main.model.architecture

Examples of archmapper.main.model.architecture.Connector


    assertNotNull(conf);
   
    Component productManager = conf.getComponentByName("ProductAdmin.ProductManager");
    Component productModel = conf.getComponentByName("ProductAdmin.ProductModel");
   
    Connector conn = conf.getConnectorByName("ProductAdmin.MethodCallT0");
    Connector conn2 = conf.getConnectorByName("ProductAdmin.MethodCallT1");
   
    assertNotNull(productManager);
    assertEquals("DAOT", productManager.getStyleType());
   
    assertNotNull(productModel);
View Full Code Here


    return null;
  }

  private void createConnectors(IAcmeSystem system) {
    for (IAcmeConnector acmeConn : system.getConnectors()) {
      Connector conn = new Connector();
      conf.getConnectors().add(conn);
      conn.setParent(conf);
      conn.setName(getQualifiedName(acmeConn));

      if (acmeConn.getDeclaredTypes().size() > 0) {
        IAcmeElementTypeRef<IAcmeConnectorType> type = acmeConn
            .getDeclaredTypes().iterator().next();
        conn.setStyleType(type.getReferencedName());
      }

      addProperties(conn, acmeConn.getProperties());
    }
  }
View Full Code Here

      }

      addProperties(role, acmeRole.getProperties());

      IAcmeConnector acmeConn = (IAcmeConnector) acmeRole.getParent();
      Connector conn = conf
          .getConnectorByName(getQualifiedName(acmeConn));
      role.setConnector(conn);
      conn.getRoles().add(role);
    }
  }
View Full Code Here

    if (styleMapping != null) {
      if (mapping instanceof ComponentMapping) {
        Component comp = arch.getComponentByName(mapping.getName());
        typeMapping = styleMapping.getComponentType(comp.getStyleType());
      } else {
        Connector conn = arch.getConnectorByName(mapping.getName());
        typeMapping = styleMapping.getConnectorTypeMapping(conn.getStyleType());
      }
    }
   
    checkInvalidTypesInImplementationArtifactDefinitions(mapping.getClassDefinition(),
        typeMapping);
View Full Code Here

   *
   * @param mapping
   * @return
   */
  public String getConnectorTypeOf(ConnectorMapping mapping) {
    Connector conn = arch.getConnectorByName(mapping.getConnectorName());
   
    if (conn == null) {
      return null;
    }
   
    return conn.getStyleType();
  }
View Full Code Here

    port2.setName("p2");
    port2.setStyleType("PortType2");
   
   
    // add a connector
    Connector conn = new Connector();
    architecture.getConnectors().add(conn);
   
    conn.setName("Connector1");
    conn.setStyleType("ConnType");
   
    Role role = new Role();
    role.setConnector(conn);
    conn.getRoles().add(role);
    role.setStyleType("CallerRole");
    port.getRoles().add(role);
    role.setPort(port);
   
    Role role2 = new Role();
    role2.setConnector(conn);
    conn.getRoles().add(role2);
    role2.setStyleType("CalleeRole");
    port2.getRoles().add(role2);
    role2.setPort(port2);
   
   
View Full Code Here

    Role role2 = p.getRoles().get(1);
    assertNotNull(role2);
    assertEquals("caller2", role2.getName());
    assertEquals(RoleDirection.in, role2.getDirection());
   
    Connector conn = architecture.getConnectorByName("Connector1");
    assertNotNull(conn);
    assertEquals(2, conn.getRoles().size());
    assertEquals(role.getConnector(), conn);
  }
View Full Code Here

    Component comp3 = architecture.getComponentByName("Comp3");
    ComponentMapping comp3Mapping = archMapping.getComponentMapping("Comp3");
    ClassDefinition classComp3Def = comp3Mapping.getClassDefinition().get(0);
    ClassDefinition class2Comp3Def = comp3Mapping.getClassDefinition().get(1);
   
    Connector connWithImpl = architecture.getConnectorByName("ConnWithImpl");
    ConnectorMapping connWithImplMapping = archMapping.getConnectorMapping("ConnWithImpl");
    ClassDefinition connClassDef = connWithImplMapping.getClassDefinition().get(0);
   
    // One class in the component may reference the connector class, one not
    assertTrue(mappingHelper.mayClassInComponentReferenceClassInConnector(classComp3Def,
View Full Code Here

TOP

Related Classes of archmapper.main.model.architecture.Connector

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.