Examples of addOption()


Examples of org.internna.iwebmvc.model.Poll.addOption()

    public void testParse() {
        assertNull(pollParser.parse(null));
        Poll p = new Poll();
        assertEquals(p, pollParser.parse(p));
        p.setOptions(new ArrayList<PollOption>(1));
        p.addOption(new PollOption());
        p = pollParser.parse(p);
        assertEquals(p, p.getOptions().iterator().next().getPoll());
    }

    @Test
View Full Code Here

Examples of org.jboss.aesh.cl.CommandLine.addOption()

            if(parseLine.startsWith("--")) {
                //make sure that we dont have any "active" options lying around
                if(active != null) {
                    if(active.getOptionType() == OptionType.LIST ||
                            active.getOptionType() == OptionType.GROUP) {
                        commandLine.addOption(active);
                        active = null;
                    }
                    else {
                        commandLine.setParserException(new OptionParserException("Option: "+active.getDisplayName()+" must be given a value"));
                        break;
View Full Code Here

Examples of org.jboss.aesh.cl.internal.CommandInt.addOption()

            {
               parameter.setArgument(option);
            }
            else
            {
               parameter.addOption(option);
            }
         }
         catch (OptionParserException e)
         {
            logger.log(Level.SEVERE, "Error while parsing command option", e);
View Full Code Here

Examples of org.jboss.aesh.cl.internal.ParameterInt.addOption()

        ParameterInt parameterInt = new ParameterInt(param.name(), param.usage(), param.argumentType());

        if(param.options() != null) {
            for(Option o : param.options()) {
                parameterInt.addOption(
                        o.name(), o.longName(), o.description(),
                        o.hasValue(), o.argument(), o.required(),
                        o.valueSeparator(), o.isProperty(),
                        o.hasMultipleValues(), o.defaultValue(), o.type());
            }
View Full Code Here

Examples of org.jboss.aesh.cl.internal.ProcessedCommand.addOption()

                if(o.hasValue())
                    optionType = OptionType.NORMAL;
                else
                    optionType = OptionType.BOOLEAN;
                if(o.name() == null || o.name().length() < 1) {
                    processedCommand.addOption(o.shortName(), field.getName(), o.description(),
                            o.argument(), o.required(), ',', o.defaultValue(),
                            field.getType(), field.getName(), optionType, o.converter(),
                            o.completer(), o.validator(), o.activator(), o.renderer(), o.overrideRequired());
                }
                else {
View Full Code Here

Examples of org.jboss.portal.identity.metadata.config.ConfigMetaData.addOption()

      else if (parent instanceof ConfigMetaData)
      {
         ConfigMetaData config = (ConfigMetaData)parent;
         if (child instanceof ConfigOptionMetaData)
         {
            config.addOption((ConfigOptionMetaData)child);
         }
      }
      else if (parent instanceof OptionsMetaData)
      {
         OptionsMetaData options = (OptionsMetaData)parent;
View Full Code Here

Examples of org.jboss.portal.identity.metadata.config.OptionsGroupMetaData.addOption()

      else if (parent instanceof OptionsGroupMetaData)
      {
         OptionsGroupMetaData group = (OptionsGroupMetaData)parent;
         if (child instanceof OptionsGroupOptionMetaData)
         {
            group.addOption((OptionsGroupOptionMetaData)child);
         }
      }
   }

   public void setValue(Object object, UnmarshallingContext unmarshallingContext, String nsUri, String localName, String value)
View Full Code Here

Examples of org.jboss.virtual.spi.Options.addOption()

   {
      Options options = getOptions(file);
      if (options == null)
         throw new IllegalArgumentException("Cannot enable " + optionName + " on null options: " + file);

      options.addOption(optionName, Boolean.TRUE);
   }

   /**
    * Disable option.
    *
 
View Full Code Here

Examples of org.jcommando.And.addOption()

    * Generate the grouping for the 'create' command.
    */
   private Grouping createCreateGrouping()
   {
      And and1 = new And();
      and1.addOption(getOptionById("inputfile"));
      and1.addOption(getOptionById("graphtype"));
      And and2 = new And();
      and2.getGroupings().add(and1);
      and2.addOption(getOptionById("graph"));
      And and3 = new And();
View Full Code Here

Examples of org.jcommando.Command.addOption()

      addOption(classpath);

      Command create = new Command();
      create.setName("create");
      create.setId("create");
      create.addOption(alg);
      create.addOption(classpath);
      create.addOption(graph);
      create.addOption(inputfile);
      create.addOption(graphtype);
      create.setGrouping( createCreateGrouping() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.