Package org.jboss.forge.shell.constraint

Examples of org.jboss.forge.shell.constraint.ConstraintEnforcer


      this.manager = manager;
   }

   public void verifyConstraints(final Shell shell)
   {
      ConstraintEnforcer enforcer = new ConstraintEnforcer();
      if (command != null)
      {
         try
         {
            // TODO this is where more complex constraints could be handled on individual commands
            if (!command.isSetup())
               enforcer.verifyAvailable(shell.getCurrentProject(), command.getParent());
         }
         catch (ConstraintException e)
         {
            throw new CommandExecutionException(command, e);
         }
View Full Code Here


   public boolean constrantsSatisfied(final Shell shell)
   {
      try
      {
         ConstraintEnforcer enforcer = new ConstraintEnforcer();
         enforcer.verifyAvailable(shell.getCurrentProject(), this);
         return this.usableWithScope(shell.getCurrentResourceScope());
      }
      catch (ConstraintException e)
      {
         return false;
View Full Code Here

      this.manager = manager;
   }

   public void verifyConstraints(final Shell shell)
   {
      ConstraintEnforcer enforcer = new ConstraintEnforcer();
      if (command != null)
      {
         try
         {
            enforcer.verifyAvailable(shell.getCurrentProject(), command.getPluginMetadata());
         }
         catch (ConstraintException e)
         {
            throw new CommandExecutionException(command, e);
         }
View Full Code Here

      for (List<PluginMetadata> lpm : registry.getPlugins().values())
      {
         for (PluginMetadata pluginMetadata : lpm)
         {
            ConstraintEnforcer enforcer = new ConstraintEnforcer();
            if (showAll || enforcer.isAvailable(shell.getCurrentProject(), pluginMetadata))
            {
               if (!listGroups.containsKey(pluginMetadata.getTopic()))
               {
                  listGroups.put(pluginMetadata.getTopic(), listData = new ArrayList<String>());
               }
View Full Code Here

      for (List<PluginMetadata> lpm : registry.getPlugins().values())
      {
         for (PluginMetadata pluginMetadata : lpm)
         {
            ConstraintEnforcer enforcer = new ConstraintEnforcer();
            if (showAll || enforcer.isAvailable(shell.getCurrentProject(), pluginMetadata))
            {
               if (!listGroups.containsKey(pluginMetadata.getTopic()))
               {
                  listGroups.put(pluginMetadata.getTopic(), listData = new ArrayList<String>());
               }
View Full Code Here

      this.manager = manager;
   }

   public void verifyConstraints(final Shell shell)
   {
      ConstraintEnforcer enforcer = new ConstraintEnforcer();
      if (command != null)
      {
         try
         {
            // TODO this is where more complex constraints could be handled on individual commands
            if (!command.isSetup())
               enforcer.verifyAvailable(shell.getCurrentProject(), command.getParent());
         }
         catch (ConstraintException e)
         {
            throw new CommandExecutionException(command, e);
         }
View Full Code Here

      for (List<PluginMetadata> lpm : registry.getPlugins().values())
      {
         for (PluginMetadata pluginMetadata : lpm)
         {
            ConstraintEnforcer enforcer = new ConstraintEnforcer();
            if (showAll || enforcer.isAvailable(shell.getCurrentProject(), pluginMetadata))
            {
               if (!listGroups.containsKey(pluginMetadata.getTopic()))
               {
                  listGroups.put(pluginMetadata.getTopic(), listData = new ArrayList<String>());
               }
View Full Code Here

      this.manager = manager;
   }

   public void verifyConstraints(final Shell shell)
   {
      ConstraintEnforcer enforcer = new ConstraintEnforcer();
      if (command != null)
      {
         try
         {
            // TODO this is where more complex constraints could be handled on individual commands
            if (!command.isSetup())
               enforcer.verifyAvailable(shell.getCurrentProject(), command.getParent());
         }
         catch (ConstraintException e)
         {
            throw new CommandExecutionException(command, e);
         }
View Full Code Here

   @Override
   public boolean constrantsSatisfied(final Shell shell)
   {
      try
      {
         ConstraintEnforcer enforcer = new ConstraintEnforcer();
         enforcer.verifyAvailable(shell.getCurrentProject(), this);
         return this.usableWithScope(shell.getCurrentResourceScope());
      }
      catch (ConstraintException e)
      {
         return false;
View Full Code Here

      this.manager = manager;
   }

   public void verifyConstraints(final Shell shell)
   {
      ConstraintEnforcer enforcer = new ConstraintEnforcer();
      if (command != null)
      {
         try
         {
            // TODO this is where more complex constraints could be handled on individual commands
            if (!command.isSetup())
               enforcer.verifyAvailable(shell.getCurrentProject(), command.getParent());
         }
         catch (ConstraintException e)
         {
            throw new CommandExecutionException(command, e);
         }
View Full Code Here

TOP

Related Classes of org.jboss.forge.shell.constraint.ConstraintEnforcer

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.