Package org.apache.oodt.cas.cli.option

Examples of org.apache.oodt.cas.cli.option.ActionCmdLineOption


      option.setValidators(Lists.newArrayList(validators));
      return option;
   }

   public static ActionCmdLineOption createActionOption(String longName) {
      ActionCmdLineOption option = new ActionCmdLineOption();
      option.setLongOption(longName);
      option.setShortOption(longName);
      return option;
   }
View Full Code Here


            GroupCmdLineOption groupOption = (GroupCmdLineOption) option;
            Set<CmdLineOption> subOptions = Sets.newHashSet();
            for (GroupSubOption subOption : groupOption.getSubOptions()) {
               subOptions.add(subOption.getOption());
            }
            ActionCmdLineOption foundOption = findFirstActionOption(subOptions);
            if (foundOption != null) {
               return foundOption;
            }
         }
      }
View Full Code Here

         validOptions.add(new HelpCmdLineOption());
      }

      // Insure action options are present if required.
      if (findFirstActionOption(validOptions) == null) {
         validOptions.add(new ActionCmdLineOption());
      }

      // Insure print supported actions option is present if required.
      if (findPrintSupportedActionsOption(validOptions) == null) {
         validOptions.add(new PrintSupportedActionsCmdLineOption());
View Full Code Here

            createSimpleOption("url", false)));
   }

   public void testDetermineOptional() {
      CmdLineAction action = createAction("TestAction");
      CmdLineOption actionOption = new ActionCmdLineOption();
      CmdLineOption passOption, userOption;

      HashSet<CmdLineOption> options = Sets.newHashSet(
            createSimpleOption("url", createRequiredRequirementRule(action)),
            passOption = createSimpleOption("pass", false),
View Full Code Here

      assertFalse(CmdLineUtils.isActionOption(new HelpCmdLineOption()));
      assertTrue(CmdLineUtils.isActionOption(createActionOption("action")));
   }

   public void testFindActionOption() {
      ActionCmdLineOption actionOption = createActionOption("action");
      Set<CmdLineOption> options = Sets.newHashSet(
            (CmdLineOption) createSimpleOption("test", false),
            createSimpleOption("test", false));

      assertNull(findFirstActionOption(options));
View Full Code Here

TOP

Related Classes of org.apache.oodt.cas.cli.option.ActionCmdLineOption

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.