Package com.openshift.client.cartridge

Examples of com.openshift.client.cartridge.IEmbeddedCartridge


  }
   
  public void removeEmbeddedCartridge(IEmbeddableCartridge cartridge) throws OpenShiftException {
    Assert.notNull(cartridge);

    IEmbeddedCartridge embeddedCartridge = getEmbeddedCartridge(cartridge);
    if (embeddedCartridge != null) {
      embeddedCartridge.destroy();
    }
  }
View Full Code Here


  @Override
  public void removeEmbeddedCartridge(IEmbeddableCartridge cartridge) throws OpenShiftException {
    Assert.notNull(cartridge);

    IEmbeddedCartridge embeddedCartridge = getEmbeddedCartridge(cartridge);
    if (embeddedCartridge != null) {
      embeddedCartridge.destroy();
    }
  }
View Full Code Here

            // embedded catridges
            List<IEmbeddedCartridge> embeddedCartridges = application.getEmbeddedCartridges();
            if (embeddedCartridges != null && !embeddedCartridges.isEmpty()) {
                sb.append("\n      \"embeddedCatridges\": [");
                for (Iterator<IEmbeddedCartridge> it = embeddedCartridges.iterator(); it.hasNext();) {
                    IEmbeddedCartridge cartridge = it.next();
                    sb.append("\n      \"catridge\": {");
                    sb.append("\n        \"name\": \"" + cartridge.getName() + "\",");
                    sb.append("\n        \"displayName\": \"" + cartridge.getDisplayName() + "\",");
                    sb.append("\n        \"description\": \"" + cartridge.getDescription() + "\"");
                    sb.append("\n      }");
                    if (it.hasNext()) {
                        sb.append(",");
                    }
                }
View Full Code Here

    List<CartridgeResourceDTO> cartridgeDTOs = new ListEmbeddableCartridgesRequest().execute();
    for (CartridgeResourceDTO cartridgeDTO : cartridgeDTOs) {
      if (cartridgeDTO.getType() != CartridgeType.EMBEDDED) {
        continue;
      }
      IEmbeddedCartridge embeddableCartridge =
          new EmbeddedCartridgeResource(
              embeddedCartridgesInfos.get(cartridgeDTO.getName()),
              cartridgeDTO, this);
      embeddedCartridges.add(embeddableCartridge);
    }
View Full Code Here

  }
   
  public void removeEmbeddedCartridge(IEmbeddableCartridge cartridge) throws OpenShiftException {
    Assert.notNull(cartridge);

    IEmbeddedCartridge embeddedCartridge = getEmbeddedCartridge(cartridge);
    if (embeddedCartridge != null) {
      embeddedCartridge.destroy();
    }
  }
View Full Code Here

  @Override
  public void removeEmbeddedCartridge(IEmbeddableCartridge cartridge) throws OpenShiftException {
    Assert.notNull(cartridge);

    IEmbeddedCartridge embeddedCartridge = getEmbeddedCartridge(cartridge);
    if (embeddedCartridge != null) {
      embeddedCartridge.destroy();
    }
  }
View Full Code Here

  }

  @Test
  public void shouldEmbeddedCartridgeEqualsEmbeddableCartridge() {
    // pre-coniditions
    IEmbeddedCartridge embeddedCartridgeFake = createEmbeddedCartridgeFake("redhat");

    // operation
    // verification
    assertThat(new EmbeddableCartridge("redhat")).isEqualTo(embeddedCartridgeFake);
    assertThat(embeddedCartridgeFake).isEqualTo(new EmbeddableCartridge("redhat"));
View Full Code Here

  }

  @Test
  public void shouldHaveSameHashCode() {
    // pre-coniditions
    IEmbeddedCartridge embeddedCartridgeFake = createEmbeddedCartridgeFake("redhat");
    // operation
    // verification
    assertThat(embeddedCartridgeFake.hashCode()).isEqualTo(new EmbeddableCartridge("redhat").hashCode());
  }
View Full Code Here

  }

  @Test
  public void shouldRemoveEmbeddedCartridgeInASetByEmbeddableCartridge() {
    // pre-coniditions
    IEmbeddedCartridge embeddedCartridgeMock = createEmbeddedCartridgeFake("redhat");
    HashSet<IEmbeddedCartridge> cartridges = new HashSet<IEmbeddedCartridge>();
    cartridges.add(embeddedCartridgeMock);
    assertEquals(cartridges.size(), 1);
    // operation
    boolean removed = cartridges.remove(new EmbeddableCartridge("redhat"));
View Full Code Here

  @Test
  public void shouldHaveUrlProperty() throws Throwable {
    // pre-conditions
    // operation
    IEmbeddedCartridge mongo = application.getEmbeddedCartridge(CartridgeTestUtils.MONGODB_22_NAME);
    IEmbeddedCartridge mysql = application.getEmbeddedCartridge(CartridgeTestUtils.MYSQL_51_NAME);

    // verifications
    UrlPropertyQuery selector = new UrlPropertyQuery();
    CartridgeResourceProperty property = selector.getMatchingProperty(mysql);
    assertThat(property).isNotNull();
View Full Code Here

TOP

Related Classes of com.openshift.client.cartridge.IEmbeddedCartridge

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.