Package io.fabric8.agent.mvn

Examples of io.fabric8.agent.mvn.Parser


                        ProfileVersionKey key = entry.getKey();
                        Map<String, Parser> artifactMap = entry.getValue();
                        Set<Map.Entry<String, Parser>> artifactMapEntries = artifactMap.entrySet();
                        for (Map.Entry<String, Parser> artifactMapEntry : artifactMapEntries) {
                            String location = artifactMapEntry.getKey();
                            Parser parser = artifactMapEntry.getValue();
                            if (isSnapshot(parser) || watcher.wildCardMatch(location, url)) {
                                printer.row(url, key.getProfileId(), key.getVersion(), location);
                            }
                        }
                    }
View Full Code Here


                    Properties checksums = findProfileChecksums(fabricService.get(), profile);
                    if (checksums != null) {
                        Set<Map.Entry<String, Parser>> artifactMapEntries = artifactMap.entrySet();
                        for (Map.Entry<String, Parser> artifactMapEntry : artifactMapEntries) {
                            String location = artifactMapEntry.getKey();
                            Parser parser = artifactMapEntry.getValue();
                            if (isSnapshot(parser) || wildCardMatch(location)) {
                                Object value = checksums.get(location);
                                if (value == null) {
                                    value = checksums.get(JavaContainers.removeUriPrefixBeforeMaven(location));
                                }
                                Long checksum = null;
                                if (value instanceof Number) {
                                    checksum = ((Number) value).longValue();
                                } else  if (value instanceof String) {
                                    checksum = Long.parseLong((String) value);
                                }
                                if (checksum == null) {
                                    if (missingChecksums.add(location)) {
                                        LOG.warn("Could not find checksum for location " + location);
                                    }
                                } else {
                                    File file = new File(localRepository.getPath() + File.separator + parser.getArtifactPath());
                                    if (!file.exists()) {
                                        LOG.info("Ignoring file " + file.getPath() + " as it does not exist");
                                    } else {
                                        // lets use a cache of last modified times to avoid having to continuously
                                        // recalculate the checksum on each file
View Full Code Here

  @Override
  public void update(ViewerCell cell) {
    Object element = cell.getElement();
    ContainerViewBean bean = ContainerViewBean.toContainerViewBean(element);
    if (bean != null) {
      Container container = bean.container();
      boolean managed = container.isManaged();
      String image = "yellow-dot.png";
      String status = bean.getStatus();
      Fabric8JMXPlugin.getLogger().debug(
          "Container: " + container.getId() + " alive: "
              + container.isAlive() + " managed: "
              + container.isManaged() + " pending: "
              + container.isProvisioningPending() + " complete: "
              + container.isProvisioningComplete() + " status: "
              + container.getProvisionStatus());
      if (!bean.isAlive()) {
        image = "gray-dot.png";
      }
      if (container.isProvisioningPending()) {
        // image = "pending.gif";
        image = "yellow-dot.png";
        managed = true;
      } else if (status != null) {
        String lowerStatus = status.toLowerCase();
View Full Code Here

            .getImageDescriptor("terminal_view.gif")) {
      @Override
      public void run() {
        List<Container> selectedContainers = getSelectedContainers();
        if (selectedContainers.size() > 0) {
          Container container = selectedContainers.get(0);
          if (container != null) {
            System.err.println("TODO: open terminal");
//            ContainerNode.openTerminal(getFabric(), container, null);
          }
        }
View Full Code Here

      public void run() {
        ContainersNode containersNode = fabric.getContainersNode();
        if (containersNode != null) {
          List<Container> selectedContainers = getSelectedContainers();
          if (!selectedContainers.isEmpty()) {
            Container container = selectedContainers.get(0);
            ContainerNode containerNode = containersNode.getContainerNode(container.getId());
            if (containerNode != null) {
              Selections.setSingleSelection(
                  fabric.getRefreshableUI(), containerNode);
            }
          }
View Full Code Here

    IStructuredSelection selection = getSelection();
    if (selection != null) {
      boolean changed = false;
      Iterator iterator = selection.iterator();
      while (iterator.hasNext()) {
        Container container = ContainerNode.toContainer(iterator.next());
        if (container != null) {
          containers.add(container);
        }
      }
    }
View Full Code Here

          public boolean apply(Container container) {
            return container != null && container.isRoot();
          }
        }));
    if (rootContainers.size() == 1 && fabric != null) {
      Container rootContainer = rootContainers.get(0);
      ContainersNode containersNode = fabric.getContainersNode();
      if (containersNode != null) {
        return containersNode.getContainerNode(rootContainer.getId());
      }
    }
    return null;
  }
View Full Code Here

            .getImageDescriptor("terminal_view.gif")) {
      @Override
      public void run() {
        List<Container> selectedContainers = getSelectedContainers();
        if (selectedContainers.size() > 0) {
          Container container = selectedContainers.get(0);
          if (container != null) {
            System.err.println("TODO: open terminal");
//            ContainerNode
//                .openTerminal(getFabric(), container, null);
          }
        }
      }
    };
    startAction = new ActionSupport(Messages.StartAgentAction,
        Messages.StartAgentActionToolTip, Fabric8JMXPlugin.getDefault()
            .getImageDescriptor("start_task.gif")) {
      @Override
      public void run() {
        start();
      }

      @Override
      public boolean isEnabled() {
        List<Container> selectedContainers = getSelectedContainers();
        if (selectedContainers.size() > 0) {
          Container container = selectedContainers.get(0);
          if (container != null && container.isRoot()) {
            return false;
          }
        }
        return true;
      }
    };
    stopAction = new ActionSupport(Messages.StopAgentAction,
        Messages.StopAgentActionToolTip, Fabric8JMXPlugin.getDefault()
            .getImageDescriptor("stop_task.gif")) {
      @Override
      public void run() {
        stop();
      }

      @Override
      public boolean isEnabled() {
        List<Container> selectedContainers = getSelectedContainers();
        if (selectedContainers.size() > 0) {
          Container container = selectedContainers.get(0);
          if (container != null && container.isRoot()) {
            return false;
          }
        }
        return true;
      }
    };
    destroyAction = new ActionSupport(Messages.DestroyContainerAction,
        Messages.DestroyContainerActionToolTip, Fabric8JMXPlugin
            .getDefault().getImageDescriptor("delete.gif")) {
      @Override
      public void run() {
        destroy();
      }

      @Override
      public boolean isEnabled() {
        List<Container> selectedContainers = getSelectedContainers();
        if (selectedContainers.size() > 0) {
          Container container = selectedContainers.get(0);
          if (container != null && container.isRoot()) {
            return false;
          }
        }
        return true;
      }
View Full Code Here

        }
        ContainersNode containersNode = fabric.getContainersNode();
        if (containersNode != null) {
          List<Container> selectedContainers = getSelectedContainers();
          if (!selectedContainers.isEmpty()) {
            Container container = selectedContainers.get(0);
            ContainerNode containerNode = containersNode
                .getContainerNode(container.getId());
            if (containerNode != null) {
              Selections.setSingleSelection(
                  fabric.getRefreshableUI(), containerNode);
            }
          }
View Full Code Here

    IStructuredSelection selection = getSelection();
    if (selection != null) {
      boolean changed = false;
      Iterator iterator = selection.iterator();
      while (iterator.hasNext()) {
        Container container = ContainerNode
            .toContainer(iterator.next());
        if (container != null) {
          containers.add(container);
        }
      }
View Full Code Here

TOP

Related Classes of io.fabric8.agent.mvn.Parser

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.