Examples of ProfileDTO


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

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

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

  }

  @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

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

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

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

    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

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


  @Override
  protected void loadPreference() {
    if (selectedProfile != null) {
      ProfileDTO profile = selectedProfile.getProfile();
      if (profile != null) {
        List<ProfileDTO> profs = new ArrayList<ProfileDTO>();
        profs.add(profile);
        setCheckedProfiles(profs);
      }
View Full Code Here

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

    Joiner joiner = Joiner.on("\n    ");
    List<String> profileIds = agent.getProfileIDs();
    for (String profileId : profileIds) {
      // TODO throws exception!
      // Profile overlay = profile.getOverlay();
      ProfileDTO overlay = getFabricService().getProfile(container.getVersionId(), profileId);
      FabricPlugin.getLogger().debug("Profile: " + overlay);
      FabricPlugin.getLogger().debug("  bundles: " + joiner.join(overlay.getBundles()));
      FabricPlugin.getLogger().debug("  features: " + joiner.join(overlay.getFeatures()));
      FabricPlugin.getLogger().debug("  repos:   " + joiner.join(overlay.getRepositories()));
    }
  }
View Full Code Here

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

    Set<Node> answer = new HashSet<Node>();
    answer.add(this);
    List<String> profileIds = getContainer().getProfileIDs();
    List<ProfileDTO> profiles = new ArrayList<ProfileDTO>();
    for (String id : profileIds) {
      ProfileDTO p = getFabricService().getProfile(getVersionNode().getVersionId(), id);
      if (p != null) profiles.add(p);
    }
    Collection<ProfileNode> profileNodes = getFabric().getProfileNodes(profiles);
    for (ProfileNode profileNode : profileNodes) {
      profileNode.addAndDescendants(answer);
View Full Code Here

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

    Set<Object> checkedProfiles = new HashSet<Object>(selectedProfileList);
    List<ProfileDTO> profileList = new ArrayList<ProfileDTO>();
    for (Object object : checkedProfiles) {
      ProfileNode node = Profiles.toProfileNode(object);
      if (node != null) {
        ProfileDTO profile = node.getProfile();
        if (profile != null) {
          profileList.add(profile);
        }
      }
    }
View Full Code Here

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

  protected void createProfile(String name) {
    String versionId = versionNode.getVersionId();
    Fabric8Facade service = versionNode.getFabric().getFabricService();
    //Profile profile = service.createProfile(versionId, name);
    ProfileDTO profile = service.createProfile(versionId, name);
    if (profileNode != null) {
      ProfileDTO parentProfile = profileNode.getProfile();
      profile.setParentIds(Arrays.asList(parentProfile.getId()));
    }
    versionNode.refresh();
  }
View Full Code Here

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

  public List<ProfileDTO> getSelectedProfileList() {
    List<ProfileDTO> answer = Lists.newArrayList();
    if (profilesViewer != null) {
      List<Object> list = Selections.getSelectionList(profilesViewer);
      for (Object object : list) {
        ProfileDTO profile = Profiles.toProfile(object);
        if (profile != null) {
          answer.add(profile);
        }
      }
    }
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.