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

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


    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

    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

  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

  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

    setImageDescriptor(FabricPlugin.getPlugin().getImageDescriptor("delete.gif"));
  }

  @Override
  public void run() {
    ProfileDTO profile = node.getProfile();
    String message = Messages.bind(Messages.deleteProfileMessage, profile.getId());
    boolean confirm = MessageDialog.openConfirm(Shells.getShell(), Messages.deleteProfileDialogTitle,
        message);
    if (confirm) {
      node.getFabric().getFabricService().deleteProfile(node.getVersionNode().getVersionId(), profile.getId());
      Node parent = node.getParent();
      if (parent != null){
        parent.removeChild(node);
      }
    }
View Full Code Here

    // we must use the local IP address of the ZooKeeper URL when creating a cloud container so that it can connect
    // properly to the ZK node if its on the cloud
    ProfileNode defaultProfile = getVersionNode().getProfileNode("default");
    if (defaultProfile != null && fabric != null) {
      ProfileDTO profile = defaultProfile.getProfile();
      if (profile != null) {
        Map<String, String> config = profile.getConfigurations().get("io.fabric8.zookeeper");
        if (config != null) {
          String zkUrl = config.get("zookeeper.url");
          if (zkUrl != null) {
            try {
              // TODO: HOW TO GET THE CURATORFRAMEWORK OBJECT?
View Full Code Here

   * @see org.fusesource.ide.fabric8.ui.actions.CreateContainerFormSupport#loadPreference()
   */
  @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

      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("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

TOP

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

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.