Package org.fusesource.ide.fabric8.core.dto

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


    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

        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

    }
   
    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

      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

      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

      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

      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.createProfile(version.getId(), "unitTestProfileIDE");
      assertNotNull("createProfile returns null when created profile", profile);
     
      ProfileDTO profile2 = fabric8.getProfile(version.getId(), "unitTestProfileIDE");
      assertNotNull("getProfile returns null for created profile", profile2);
     
      fabric8.deleteProfile(version.getId(), profile2.getId());
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
    }
View Full Code Here

      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.createProfile(version.getId(), "unitTestProfileIDE");
      assertNotNull("createProfile returns null when created profile", profile);
     
      ProfileDTO profile2 = fabric8.getProfile(version.getId(), "unitTestProfileIDE");
      assertNotNull("getProfile returns null for created profile", profile2);
     
      fabric8.deleteProfile(version.getId(), profile2.getId());
     
      profile2 = fabric8.getProfile(version.getId(), "unitTestProfileIDE");
      assertNull("The profile hasn't been deleted from backstore", profile2);     
    } catch (IOException ex) {
      fail(ex.getMessage());
    } finally {
      con.disconnect();
View Full Code Here

    }

    @Override
    protected CreateSshContainerAction createSshContainerAction(Object current) {
        final ProfileNode node = (ProfileNode) current;
        return new CreateSshContainerAction(node.getVersionNode(), null, node);
    }
View Full Code Here

TOP

Related Classes of org.fusesource.ide.fabric8.core.dto.VersionDTO

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.