Package org.fusesource.ide.fabric8.ui.navigator

Examples of org.fusesource.ide.fabric8.ui.navigator.VersionNode


  /* (non-Javadoc)
   * @see org.fusesource.ide.fabric8.core.connector.Fabric8ConnectorType#createVersion(java.lang.String, java.lang.String)
   */
  @Override
  public VersionDTO createVersion(String parentVersionId, String versionId) {
    VersionDTO version = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "createVersion(java.lang.String, java.lang.String)", parentVersionId, versionId);
            J4pExecResponse response = getJolokiaClient().execute(request);
            Map<String, Object> values = response.getValue();
            version = new VersionDTO(this.fabricFacade, values);
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to create subversion with id '" + versionId + "' under version '" + parentVersionId + "'.", e);
        }
      return version;
  }
View Full Code Here


  /* (non-Javadoc)
   * @see org.fusesource.ide.fabric8.core.connector.Fabric8ConnectorType#getDefaultVersion()
   */
  @Override
  public VersionDTO getDefaultVersion() {
    VersionDTO version = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "defaultVersion()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            Map<String, Object> values = response.getValue();
            version = new VersionDTO(this.fabricFacade, values);
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to fetch current container from fabric8.", e);
        }
      return version;
  }
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

    }

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

        return node == null ? Collections.emptyList() : ((ProfileNode) node).getPropertySourceList();
    }

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

        return new CreateJCloudsContainerAction(node.getVersionNode(), null, node);
    }

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

        return new CreateSshContainerAction(node.getVersionNode(), null, node);
    }

    @Override
    protected CreateChildContainerAction createChildContainerAction(Object current) {
        final ProfileNode node = (ProfileNode) current;
        return new CreateChildContainerAction(node);
    }
View Full Code Here

    createProfileForm(profile, inner);

    createLabel(inner, Messages.profileParentsLabel);
    parentsForm.createColumnsViewer(inner);
    parentsForm.setProfilesViewerInput(node.getVersionNode());
    parentsForm.getProfilesViewer().setContentProvider(new ProfileParentsContentProvider(node));

    GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
    gridData.horizontalSpan = 2;
    parentsForm.getProfilesViewer().getTree().setLayoutData(gridData);
    List<ProfileDTO> parents = profile.getParents();
View Full Code Here

  protected ProfileNode getSelectedProfileNode() {
    Object first = Selections.getFirstSelection(getViewer());
    if (first instanceof ProfileStatusDTO) {
      ProfileStatusDTO status = (ProfileStatusDTO) first;
      String id = status.getProfile();
      VersionNode version = getFabric().getDefaultVersionNode();
      if (version != null) {
        return version.getProfileNode(id);
      }
    }
    return null;
  }
View Full Code Here

        VersionsNode versionsNode = fabric.getVersionsNode();
        if (versionsNode != null) {
          List<VersionDTO> selectedVersions = getSelectedVersions();
          if (!selectedVersions.isEmpty()) {
            VersionDTO version = selectedVersions.get(0);
            VersionNode versionNode = versionsNode.getVersionNode(version.getId());
            if (versionNode != null) {
              Selections.setSingleSelection(fabric.getRefreshableUI(), versionNode);
            }
          }
        }
View Full Code Here

TOP

Related Classes of org.fusesource.ide.fabric8.ui.navigator.VersionNode

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.