Examples of VersionDTO


Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

   * @return
   */
  public String getDefaultVersionId() {
    Fabric8Facade service = getFabricService();
    if (service != null) {
      VersionDTO defaultVersion = service.getDefaultVersion();
      if (defaultVersion != null) {
        return defaultVersion.getId();
      }
    }
    return null;
  }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

  }

  @Override
  public void run() {
    String defaultValue = "";
    VersionDTO latestVersion = oldVersionSupplier.get();
    if (latestVersion != null) {
      VersionSequenceDTO next = latestVersion.getVersionSequence().next();
      while (next != null && getVersionNode(next.getName()) != null) {
        next = next.next();
      }
      if (next != null) {
        defaultValue = next.getName();
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

    }
    return null;
  }

  protected void createVersion(String newVersion) {
    VersionDTO oldVersion = oldVersionSupplier.get();
    FabricPlugin.getLogger().debug("Creating new version " + newVersion + " from old " + Fabrics.getVersionName(oldVersion));

    if (oldVersion != null) {
      fabric.getFabricService().createVersion(oldVersion.getId(), newVersion);
    } else {
      fabric.getFabricService().createVersion(newVersion);
    }
    fabric.getVersionsNode().refresh();
  }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

            public void doubleClick(DoubleClickEvent event) {
                FabricNavigator nav = FabricPlugin.getFabricNavigator();
                if (nav != null && current != null) {
                    Object oSel = Selections.getFirstSelection(event.getSelection());
                    if (oSel != null && oSel instanceof VersionDTO) {
                        VersionDTO s = asVersionDTO(oSel);
                        String versionId = s.getId();
                        VersionNode versionNode = searchVersion(nav, versionId);
                        if (versionNode != null)
                            nav.selectReveal(new StructuredSelection(versionNode));
                    }
                }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

    private List<VersionDTO> getVersions() {
      if (current == null) return Collections.EMPTY_LIST;
      List<VersionDTO> result = new ArrayList<VersionDTO>();
      for (Node node : current.getVersionsNode().getChildrenList()) {
        VersionDTO vNode = VersionNode.toVersion(node);
        if (vNode != null) result.add(vNode);
      }
      return result;
    }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

        int column = 0;

        Function1 function = new Function1() {
            @Override
            public Object apply(Object element) {
                VersionDTO version = asVersionDTO(element);
                if (version != null) {
                    return version.getId();
                }
                return null;
            }
        };
        column = addColumnFunction(250, column, function, "Id");

        function = new Function1() {
            @Override
            public Boolean apply(Object element) {
              VersionDTO version = asVersionDTO(element);
                if (version != null) {
                    return version.isDefaultVersion();
                }
                return null;
            }
        };
        column = addColumnFunction(bounds, column, function, "Default");
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

    }
   
    protected VersionNode getSelectedVersionNode() {
        Object first = Selections.getFirstSelection(getViewer());
        if (first instanceof VersionDTO) {
            VersionDTO version = (VersionDTO) first;
            String id = version.getId();
            for (Node n : current.getVersionsNode().getChildrenList()) {
              if (n != null && n instanceof VersionNode && ((VersionNode)n).getVersionId().equals(id)) {
                return (VersionNode)n;
              }
            }
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      VersionDTO version = fabric8.getDefaultVersion();
      assertNotNull("Default version is null", version);
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      VersionDTO version = fabric8.getDefaultVersion();
      assertNotNull("Default version is null", version);
     
      List<ProfileDTO> profiles = fabric8.getProfiles(version.getId());
      assertNotNull("getProfiles returns null", profiles);
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
View Full Code Here

Examples of org.fusesource.ide.fabric8.core.dto.VersionDTO

      assertNotNull("Connector Type is null!", con.getConnection());
     
      Fabric8Facade fabric8 = con.getConnection().getFabricFacade();
      assertNotNull("Fabric8 DTO is null!", fabric8);
     
      VersionDTO version = fabric8.getDefaultVersion();
      assertNotNull("Default version is null", version);
     
      ProfileDTO profile = fabric8.getProfile(version.getId(), "default");
      assertNotNull("getProfile returns null for default profile", profile);
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
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.