Package org.jboss.forge.shell.plugins

Examples of org.jboss.forge.shell.plugins.Plugin


                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               Status status = Status.FAILURE;
               ClassLoader current = Thread.currentThread().getContextClassLoader();
               boolean vetoed = false;
               try
               {
                  Thread.currentThread().setContextClassLoader(plugin.getClass().getClassLoader());
                  PreCommandExecution event = new PreCommandExecution(command, originalStatement, parameterArray);
                  manager.fireEvent(event, new Annotation[0]);
                  vetoed = event.isVetoed();
                  if (!vetoed)
                  {
View Full Code Here


                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
View Full Code Here

                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               Status status = Status.FAILURE;
               ClassLoader current = Thread.currentThread().getContextClassLoader();
               try
               {
                  Thread.currentThread().setContextClassLoader(plugin.getClass().getClassLoader());
                  command.getMethod().invoke(plugin, paramStaging);
               }
               catch (Exception e)
               {
                  throw new CommandExecutionException(command, e);
View Full Code Here

                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
View Full Code Here

                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               Status status = Status.FAILURE;
               ClassLoader current = Thread.currentThread().getContextClassLoader();
               try
               {
                  Thread.currentThread().setContextClassLoader(plugin.getClass().getClassLoader());
                  command.getMethod().invoke(plugin, paramStaging);
                  status = Status.SUCCESS;
               }
               catch (Exception e)
               {
View Full Code Here

                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
View Full Code Here

                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               Status status = Status.FAILURE;
               ClassLoader current = Thread.currentThread().getContextClassLoader();
               boolean vetoed = false;
               try
               {
                  Thread.currentThread().setContextClassLoader(plugin.getClass().getClassLoader());
                  PreCommandExecution event = new PreCommandExecution(command, originalStatement, parameterArray);
                  manager.fireEvent(event, new Annotation[0]);
                  vetoed = event.isVetoed();
                  if (!vetoed)
                  {
View Full Code Here

                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               Status status = Status.FAILURE;
               ClassLoader current = Thread.currentThread().getContextClassLoader();
               try
               {
                  Thread.currentThread().setContextClassLoader(plugin.getClass().getClassLoader());
                  command.getMethod().invoke(plugin, paramStaging);
               }
               catch (Exception e)
               {
                  throw new CommandExecutionException(command, e);
View Full Code Here

                        + name
                        + "' must be of type '" + parmTypes[i].getSimpleName() + "'", e);
            }
         }

         Plugin plugin;
         if (bean != null)
         {
            CreationalContext<? extends Plugin> context = (CreationalContext<? extends Plugin>) manager
                     .createCreationalContext(bean);
            if (context != null)
            {
               plugin = (Plugin) manager.getReference(bean, pluginType, context);

               Status status = Status.FAILURE;
               ClassLoader current = Thread.currentThread().getContextClassLoader();
               Map<Object, Object> executionContext = new HashMap<Object, Object>();
               boolean vetoed = false;
               try
               {
                  Thread.currentThread().setContextClassLoader(plugin.getClass().getClassLoader());
                  PreCommandExecution event = new PreCommandExecution(command, originalStatement, parameterArray,
                           executionContext);
                  manager.fireEvent(event, new Annotation[0]);
                  vetoed = event.isVetoed();
                  if (!vetoed)
View Full Code Here

TOP

Related Classes of org.jboss.forge.shell.plugins.Plugin

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.