Package org.jboss.forge.furnace.addons

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


   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


   {
      List<AddonLifecycleProviderEntry> results = new ArrayList<AddonRunnable.AddonLifecycleProviderEntry>();

      for (AddonDependency addonDependency : addon.getDependencies())
      {
         final Addon dependency = addonDependency.getDependency();
         final ClassLoader classLoader = dependency.getClassLoader();
         try
         {
            AddonLifecycleProviderEntry result = null;

            ServiceLoader<AddonLifecycleProvider> serviceLoader = ServiceLoader.load(
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

   {
      List<AddonLifecycleProviderEntry> results = new ArrayList<AddonRunnable.AddonLifecycleProviderEntry>();

      for (AddonDependency addonDependency : addon.getDependencies())
      {
         final Addon dependency = addonDependency.getDependency();
         final ClassLoader classLoader = dependency.getClassLoader();
         try
         {
            AddonLifecycleProviderEntry result = null;

            ServiceLoader<AddonLifecycleProvider> serviceLoader = ServiceLoader.load(
View Full Code Here

   {
      try
      {
         initStack();

         Addon self = BeanManagerUtils.getContextualInstance(manager, AddonProducer.class).produceCurrentAddon();
         if (self != null && !(event instanceof InboundEvent))
         {
            Set<Annotation> qualifiers = metadata.getQualifiers();
            if (!isLocal(qualifiers) && !onStack(event, qualifiers))
               try
               {
                  AddonRegistry addonRegistry = BeanManagerUtils.getContextualInstance(manager, AddonRegistry.class);
                  for (Addon addon : addonRegistry.getAddons(AddonFilters.allStarted()))
                  {
                     if (!self.getId().equals(addon.getId()))
                     {
                        EventManager remoteEventManager = addon.getEventManager();
                        if (remoteEventManager != null)
                        {
                           remoteEventManager.fireEvent(event, qualifiers.toArray(new Annotation[qualifiers.size()]));
View Full Code Here

      return moduleProviders;
   }

   private ModuleSpec findAddonModule(ModuleIdentifier id)
   {
      Addon addon = currentAddon.get();
      if (addon != null)
      {
         Set<AddonView> views = stateManager.getViewsOf(addon);
         for (AddonRepository repository : views.iterator().next().getRepositories())
         {
            AddonId found = addon.getId();
            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();

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

   {
      List<AddonLifecycleProviderEntry> results = new ArrayList<AddonRunnable.AddonLifecycleProviderEntry>();

      for (AddonDependency addonDependency : addon.getDependencies())
      {
         final Addon dependency = addonDependency.getDependency();
         final ClassLoader classLoader = dependency.getClassLoader();
         try
         {
            AddonLifecycleProviderEntry result = null;

            ServiceLoader<AddonLifecycleProvider> serviceLoader = ServiceLoader.load(
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

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.