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#getCurrentContainer()
     */
    @Override
    public ContainerDTO getCurrentContainer() {
      ContainerDTO container = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "currentContainer()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            Map<String, Object> values = response.getValue();
            container = new ContainerDTO(this.fabricFacade, values);
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to fetch current container from fabric8.", e);
        }
      return container;
    }
View Full Code Here


  /* (non-Javadoc)
   * @see org.fusesource.ide.fabric8.core.connector.Fabric8ConnectorType#getFabricStatus()
   */
  @Override
  public FabricStatusDTO getFabricStatus() {
    FabricStatusDTO status = null;
    try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "fabricStatusAsJson()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            String json = response.getValue();
            final ModelNode rootNode = JsonHelper.getModelNode(json);
View Full Code Here

      String filterJson = JsonHelper.convertToJson(filter);
      J4pExecRequest request = JolokiaHelpers.createExecRequest(INSIGHT_MBEAN_URL, "filterLogEvents(java.lang.String)", filterJson);
          J4pExecResponse response = getJolokiaClient().execute(request);
          String json = response.getValue();
          final ModelNode rootNode = JsonHelper.getModelNode(json);
      LogResultsDTO result = LogResultsDTO.fromJson(rootNode);
      return result;
    } catch (Exception e) {
      Fabric8CorePlugin.getLogger().error("Failed to query the logs", e);
    }
    return null;
View Full Code Here

      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "getProfiles(java.lang.String)", versionId);
            J4pExecResponse response = getJolokiaClient().execute(request);
            List<Map<String, Object>> values = response.getValue();
            for (Map<String, Object> value : values) {
              ProfileDTO p = new ProfileDTO(fabricFacade, value);
              if (p.isHidden()) {
                continue; // don't return hidden profiles
              }
              profiles.add(p);
            }
        } catch (Exception e) {
View Full Code Here

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

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

  }

  @Override
  public void createTextFields(Composite parent) {
    this.featuresList = null;
    ProfileDTO profile = node.getProfile();
    String sectionTitle = profile.getId();

    Composite inner = createSectionComposite(sectionTitle, new GridData(GridData.FILL_BOTH));
    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();
    parentsForm.setCheckedProfiles(parents);
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.fusesource.ide.fabric8.core.connector.Fabric8ConnectorType#getRequirements()
   */
  @Override
  public RequirementsDTO getRequirements() {
    RequirementsDTO requirements = null;
    try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "requirementsAsJson()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            String json = response.getValue();
      final ModelNode rootNode = JsonHelper.getModelNode(json);
View Full Code Here

    /* (non-Javadoc)
     * @see org.fusesource.ide.fabric8.core.connector.Fabric8ConnectorType#createVersion(java.lang.String)
     */
    @Override
    public VersionDTO createVersion(String versionId) {
      VersionDTO version = null;
      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "createVersion()");
            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 version with id '" + versionId + "'.", e);
        }
      return version;
    }
View Full Code Here

      try {
            J4pExecRequest request = JolokiaHelpers.createExecRequest(FABRIC_MBEAN_URL, "versions()");
            J4pExecResponse response = getJolokiaClient().execute(request);
            List<Map<String, Object>> values = response.getValue();
            for (Map<String, Object> value : values) {
              VersionDTO v = new VersionDTO(this.fabricFacade, value);
              if (v.getId().equalsIgnoreCase("master")) continue; // don't show "MASTER" version
              versions.add(new VersionDTO(this.fabricFacade, value));
            }
        } catch (Exception e) {
          Fabric8CorePlugin.getLogger().error("Failed to fetch containers from fabric8.", e);
        }
     
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.