Package org.jboss.forge.shell

Examples of org.jboss.forge.shell.PluginEntry


            @Option(completer = InstalledPluginCompleter.class, description = "plugin-name", required = true,
                     help = "The fully qualified plugin name e.g: 'org.jboss.forge.plugin:version'") final String pluginName,
            final PipeOut out) throws Exception
   {

      PluginEntry plugin = PluginEntry.fromCoordinates(pluginName);
      if (!InstalledPluginRegistry.has(plugin))
      {
         throw new RuntimeException("No such installed plugin [" + pluginName + "]");
      }
      PluginEntry installedPlugin = InstalledPluginRegistry.get(plugin);
      InstalledPluginRegistry.remove(installedPlugin);
      pluginRemovedEvent.fire(new PluginRemoved(installedPlugin));
      if (!InstalledPluginRegistry.has(plugin))
      {
         ShellMessages.success(out, "Successfully removed [" + pluginName + "]");
View Full Code Here


   public void registerPlugin(final String pluginName, final String pluginSlot, final String apiVersion)
   {
      String runtimeVersion = InstalledPluginRegistry.getRuntimeAPIVersion();
      if (InstalledPluginRegistry.isApiCompatible(runtimeVersion, apiVersion))
      {
         PluginEntry entry = InstalledPluginRegistry.install(pluginName, apiVersion, pluginSlot);
         pluginInstalledEvent.fire(new PluginInstalled(entry));
      }
      else
      {
         throw new RuntimeException(
View Full Code Here

            @Option(completer = InstalledPluginCompleter.class, description = "plugin-name", required = true,
                     help = "The fully qualified plugin name e.g: 'org.jboss.forge.plugin:version'") final String pluginName,
            final PipeOut out) throws Exception
   {

      PluginEntry plugin = PluginEntry.fromCoordinates(pluginName);
      if (!InstalledPluginRegistry.has(plugin))
      {
         throw new RuntimeException("No such installed plugin [" + pluginName + "]");
      }
      PluginEntry installedPlugin = InstalledPluginRegistry.get(plugin);
      InstalledPluginRegistry.remove(installedPlugin);
      pluginRemovedEvent.fire(new PluginRemoved(installedPlugin));
      if (!InstalledPluginRegistry.has(plugin))
      {
         ShellMessages.success(out, "Successfully removed [" + pluginName + "]");
View Full Code Here

   public void registerPlugin(final String pluginName, final String pluginSlot, final String apiVersion)
   {
      String runtimeVersion = InstalledPluginRegistry.getRuntimeAPIVersion();
      if (InstalledPluginRegistry.isApiCompatible(runtimeVersion, apiVersion))
      {
         PluginEntry entry = InstalledPluginRegistry.install(pluginName, apiVersion, pluginSlot);
         pluginInstalledEvent.fire(new PluginInstalled(entry));
      }
      else
      {
         throw new RuntimeException(
View Full Code Here

    * @param pluginName
    * @return
    */
   public boolean removePlugin(final String pluginName)
   {
      PluginEntry plugin = PluginEntry.fromCoordinates(pluginName);
      if (!InstalledPluginRegistry.has(plugin))
      {
         throw new RuntimeException("No such installed plugin [" + pluginName + "]");
      }
      PluginEntry installedPlugin = InstalledPluginRegistry.get(plugin);
      InstalledPluginRegistry.remove(installedPlugin);
      pluginRemovedEvent.fire(new PluginRemoved(installedPlugin));
      return (!InstalledPluginRegistry.has(plugin));
   }
View Full Code Here

   private void registerPlugin(final String pluginName, final String pluginSlot, final String apiVersion)
   {
      String runtimeVersion = InstalledPluginRegistry.getRuntimeAPIVersion();
      if (InstalledPluginRegistry.isApiCompatible(runtimeVersion, apiVersion))
      {
         PluginEntry entry = InstalledPluginRegistry.install(pluginName, apiVersion, pluginSlot);
         pluginInstalledEvent.fire(new PluginInstalled(entry));
      }
      else
      {
         throw new RuntimeException(
View Full Code Here

    * @param pluginName
    * @return
    */
   public boolean removePlugin(final String pluginName)
   {
      PluginEntry plugin = PluginEntry.fromCoordinates(pluginName);
      if (!InstalledPluginRegistry.has(plugin))
      {
         throw new RuntimeException("No such installed plugin [" + pluginName + "]");
      }
      PluginEntry installedPlugin = InstalledPluginRegistry.get(plugin);
      InstalledPluginRegistry.remove(installedPlugin);
      pluginRemovedEvent.fire(new PluginRemoved(installedPlugin));
      return (!InstalledPluginRegistry.has(plugin));
   }
View Full Code Here

   private void registerPlugin(final String pluginName, final String pluginSlot, final String apiVersion)
   {
      String runtimeVersion = InstalledPluginRegistry.getRuntimeAPIVersion();
      if (InstalledPluginRegistry.isApiCompatible(runtimeVersion, apiVersion))
      {
         PluginEntry entry = InstalledPluginRegistry.install(pluginName, apiVersion, pluginSlot);
         pluginInstalledEvent.fire(new PluginInstalled(entry));
      }
      else
      {
         throw new RuntimeException(
View Full Code Here

            @Option(completer = InstalledPluginCompleter.class, description = "plugin-name", required = true,
                     help = "The fully qualified plugin name e.g: 'org.jboss.forge.plugin:version'") final String pluginName,
            final PipeOut out) throws Exception
   {

      PluginEntry plugin = PluginEntry.fromCoordinates(pluginName);
      if (!InstalledPluginRegistry.has(plugin))
      {
         throw new RuntimeException("No such installed plugin [" + pluginName + "]");
      }
      PluginEntry installedPlugin = InstalledPluginRegistry.get(plugin);
      InstalledPluginRegistry.remove(installedPlugin);
      pluginRemovedEvent.fire(new PluginRemoved(installedPlugin));
      if (!InstalledPluginRegistry.has(plugin))
      {
         ShellMessages.success(out, "Successfully removed [" + pluginName + "]");
View Full Code Here

   public void registerPlugin(final String pluginName, final String pluginSlot, final String apiVersion)
   {
      String runtimeVersion = InstalledPluginRegistry.getRuntimeAPIVersion();
      if (InstalledPluginRegistry.isApiCompatible(runtimeVersion, apiVersion))
      {
         PluginEntry entry = InstalledPluginRegistry.install(pluginName, apiVersion, pluginSlot);
         pluginInstalledEvent.fire(new PluginInstalled(entry));
      }
      else
      {
         throw new RuntimeException(
View Full Code Here

TOP

Related Classes of org.jboss.forge.shell.PluginEntry

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.