Package org.fusesource.ide.fabric8.ui.actions

Examples of org.fusesource.ide.fabric8.ui.actions.CreateSshContainerAction


  /* (non-Javadoc)
   * @see org.fusesource.ide.commons.ui.form.FormSupport#createTextFields(org.eclipse.swt.widgets.Composite)
   */
  @Override
  protected void createTextFields(Composite parent) {
    ProfileDTO profile = node.getProfile();
    String sectionTitle = profile.getId();

    Composite inner = createSectionComposite(sectionTitle, new GridData(GridData.FILL_BOTH));

    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
View Full Code Here


    pReqs = reqs.findProfileRequirements(this.node.getProfile().getId());
    if (pReqs != null) {
      this.formModel.setMinInstances(pReqs.getMinimumInstances());
      this.formModel.setMaxInstances(pReqs.getMaximumInstances());
      for (String pId : pReqs.getDependentProfiles()) {
        ProfileDTO p = node.getFabric().getFabricService().getProfile(this.node.getVersionNode().getVersionId(), pId);
        this.formModel.addDependency(p)
      }
    }
    parentsForm.setCheckedProfiles(formModel.getDependencies());
  }
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

  /* (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

  protected CreateJCloudsContainerAction createCloudContainerAction(Fabric fabric) {
    return new CreateJCloudsContainerAction(fabric);
  }

  protected CreateSshContainerAction createSshContainerAction(Fabric fabric) {
    return new CreateSshContainerAction(fabric);
  }
View Full Code Here

    if (getContainer().isRoot()) {
      menu.add(new CreateChildContainerAction(this));
    }

    menu.add(new CreateJCloudsContainerAction(getVersionNode(), this, null));
    menu.add(new CreateSshContainerAction(getVersionNode(), this, null));

  }
View Full Code Here

TOP

Related Classes of org.fusesource.ide.fabric8.ui.actions.CreateSshContainerAction

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.