Package org.jboss.forge.furnace.addons

Examples of org.jboss.forge.furnace.addons.Addon


      StringBuilder builder = new StringBuilder();

      Iterator<Addon> addonsIterator = addons.iterator();
      while (addonsIterator.hasNext())
      {
         Addon addon = addonsIterator.next();
         builder.append("- ").append(addon.toString());
         if (addonsIterator.hasNext())
            builder.append("\n");
      }

      return builder.toString();
View Full Code Here


      return moduleProviders;
   }

   private ModuleSpec findAddonModule(ModuleIdentifier id)
   {
      Addon addon = currentAddon.get();
      if (addon != null)
      {
         Set<AddonView> views = stateManager.getViewsOf(addon);
         AddonId found = addon.getId();
         for (AddonRepository repository : views.iterator().next().getRepositories())
         {
            if (repository.isEnabled(found) && repository.isDeployed(found))
            {
               Addon mappedAddon = moduleCache.getAddon(id);

               if (mappedAddon != null && mappedAddon.getId().equals(found))
               {
                  Builder builder = ModuleSpec.build(id);

                  builder.addDependency(DependencySpec.createModuleDependencySpec(SystemClasspathSpec.ID));
                  builder.addDependency(DependencySpec.createModuleDependencySpec(XPathJDKClasspathSpec.ID));
View Full Code Here

   {
      AddonId addonId = stateManager.resolveAddonId(views, dependency.getName());
      ModuleIdentifier moduleId = null;
      if (addonId != null)
      {
         Addon addon = lifecycleManager.getAddon(views, addonId);
         moduleId = findCompatibleInstalledModule(addonId);
         if (moduleId != null)
         {
            builder.addDependency(DependencySpec.createModuleDependencySpec(
                     PathFilters.not(PathFilters.getMetaInfFilter()),
View Full Code Here

   private ModuleIdentifier findCompatibleInstalledModule(AddonId addonId)
   {
      ModuleIdentifier result = null;

      Addon addon = currentAddon.get();
      Version runtimeAPIVersion = AddonRepositoryImpl.getRuntimeAPIVersion();

      for (AddonRepository repository : stateManager.getViewsOf(addon).iterator().next().getRepositories())
      {
         List<AddonId> enabled = repository.listEnabledCompatibleWithVersion(runtimeAPIVersion);
View Full Code Here

      builder.append("ADDONS:").append("\n");

      Iterator<Addon> addonIterator = getAddons().iterator();
      while (addonIterator.hasNext())
      {
         Addon addon = addonIterator.next();
         builder.append(addon.toString());
         if (addonIterator.hasNext())
            builder.append("\n");
      }

      return builder.toString();
View Full Code Here

      StringBuilder builder = new StringBuilder();

      Iterator<Addon> addonsIterator = addons.iterator();
      while (addonsIterator.hasNext())
      {
         Addon addon = addonsIterator.next();
         builder.append("- ").append(addon.toString());
         if (addonsIterator.hasNext())
            builder.append("\n");
      }

      return builder.toString();
View Full Code Here

      return moduleProviders;
   }

   private ModuleSpec findAddonModule(ModuleIdentifier id)
   {
      Addon addon = currentAddon.get();
      if (addon != null)
      {
         Set<AddonView> views = stateManager.getViewsOf(addon);
         AddonId found = addon.getId();
         for (AddonRepository repository : views.iterator().next().getRepositories())
         {
            if (repository.isEnabled(found) && repository.isDeployed(found))
            {
               Addon mappedAddon = moduleCache.getAddon(id);

               if (mappedAddon != null && mappedAddon.getId().equals(found))
               {
                  Builder builder = ModuleSpec.build(id);

                  builder.addDependency(DependencySpec.createModuleDependencySpec(SystemClasspathSpec.ID));
                  builder.addDependency(DependencySpec.createModuleDependencySpec(XPathJDKClasspathSpec.ID));
View Full Code Here

   {
      AddonId addonId = stateManager.resolveAddonId(views, dependency.getName());
      ModuleIdentifier moduleId = null;
      if (addonId != null)
      {
         Addon addon = lifecycleManager.getAddon(views, addonId);
         moduleId = findCompatibleInstalledModule(addonId);
         if (moduleId != null)
         {
            builder.addDependency(DependencySpec.createModuleDependencySpec(
                     PathFilters.not(PathFilters.getMetaInfFilter()),
View Full Code Here

   private ModuleIdentifier findCompatibleInstalledModule(AddonId addonId)
   {
      ModuleIdentifier result = null;

      Addon addon = currentAddon.get();
      Version runtimeAPIVersion = AddonRepositoryImpl.getRuntimeAPIVersion();

      for (AddonRepository repository : stateManager.getViewsOf(addon).iterator().next().getRepositories())
      {
         List<AddonId> enabled = repository.listEnabledCompatibleWithVersion(runtimeAPIVersion);
View Full Code Here

            if (vertex.getAddon() == null)
            {
               AddonView view = vertex.getViews().iterator().next();
               AddonId addonId = vertex.getAddonId();

               Addon addon = null;
               if (lastMasterGraph != null)
               {
                  for (AddonVertex last : lastMasterGraph.getGraph().vertexSet())
                  {
                     if (last.getAddon().getId().equals(addonId) && last.getViews().contains(view))
                     {
                        addon = last.getAddon();
                        break;
                     }
                  }
               }

               vertex.setAddon(addon);
            }
         };
      });

      while (iterator.hasNext())
         iterator.next();

      iterator = new DepthFirstIterator<AddonVertex, AddonDependencyEdge>(graph.getGraph());
      iterator.addTraversalListener(new TraversalListenerAdapter<AddonVertex, AddonDependencyEdge>()
      {
         @Override
         public void vertexFinished(VertexTraversalEvent<AddonVertex> event)
         {
            AddonVertex vertex = event.getVertex();
            if (vertex.getAddon() == null)
            {
               AddonView view = vertex.getViews().iterator().next();
               AddonId addonId = vertex.getAddonId();

               Addon addon = null;
               Set<Addon> orphans = lifecycleManager.getOrphanAddons(addonId);
               if (!orphans.isEmpty())
                  addon = orphans.iterator().next();

               if (addon == null)
View Full Code Here

TOP

Related Classes of org.jboss.forge.furnace.addons.Addon

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.