Package org.nasutekds.server.util.args

Examples of org.nasutekds.server.util.args.StringArgument.addValue()


                          StringArgument arg = new StringArgument(argName, null,
                              argName, false, true,
                              INFO_NAME_PLACEHOLDER.get(),
                              INFO_DSCFG_DESCRIPTION_NAME.get(
                                  d.getUserFriendlyName()));
                          arg.addValue(name);
                          builder.addArgument(arg);
                        }
                        catch (Throwable t)
                        {
                          // Bug
View Full Code Here


                            OPTION_DSCFG_LONG_SET, false, true, true,
                            INFO_VALUE_SET_PLACEHOLDER.get(), null, null,
                            INFO_DSCFG_DESCRIPTION_PROP_VAL.get());
                        PropertyDefinition<?> propertyDefinition =
                          cvc.getPropertyDefinition();
                        arg.addValue(propertyDefinition.getName()+':'+
                            castAndGetArgumentValue(propertyDefinition,
                                cvc.getValue()));
                        builder.addArgument(arg);
                      }
                      catch (Throwable t)
View Full Code Here

    case RESET:
      arg = new StringArgument(OPTION_DSCFG_LONG_RESET,
          OPTION_DSCFG_SHORT_RESET, OPTION_DSCFG_LONG_RESET, false, true, true,
          INFO_PROPERTY_PLACEHOLDER.get(), null, null,
          INFO_DSCFG_DESCRIPTION_RESET_PROP.get());
      arg.addValue(propName);
      break;
    case REMOVE:
      arg = new StringArgument(OPTION_DSCFG_LONG_REMOVE,
          OPTION_DSCFG_SHORT_REMOVE, OPTION_DSCFG_LONG_REMOVE, false, true,
          true, INFO_VALUE_SET_PLACEHOLDER.get(), null, null,
View Full Code Here

          OPTION_DSCFG_SHORT_REMOVE, OPTION_DSCFG_LONG_REMOVE, false, true,
          true, INFO_VALUE_SET_PLACEHOLDER.get(), null, null,
          INFO_DSCFG_DESCRIPTION_REMOVE_PROP_VAL.get());
      for (T value : mod.getModificationValues())
      {
        arg.addValue(propName+':'+getArgumentValue(propertyDefinition, value));
      }
      break;
    case ADD:
      arg = new StringArgument(OPTION_DSCFG_LONG_ADD,
          OPTION_DSCFG_SHORT_ADD, OPTION_DSCFG_LONG_ADD, false, true, true,
View Full Code Here

          OPTION_DSCFG_SHORT_ADD, OPTION_DSCFG_LONG_ADD, false, true, true,
          INFO_VALUE_SET_PLACEHOLDER.get(), null, null,
          INFO_DSCFG_DESCRIPTION_ADD_PROP_VAL.get());
      for (T value : mod.getModificationValues())
      {
        arg.addValue(propName+':'+getArgumentValue(propertyDefinition, value));
      }
      break;
    case SET:
      arg = new StringArgument(OPTION_DSCFG_LONG_SET,
          OPTION_DSCFG_SHORT_SET, OPTION_DSCFG_LONG_SET, false, true, true,
View Full Code Here

          OPTION_DSCFG_SHORT_SET, OPTION_DSCFG_LONG_SET, false, true, true,
          INFO_VALUE_SET_PLACEHOLDER.get(), null, null,
          INFO_DSCFG_DESCRIPTION_PROP_VAL.get());
      for (T value : mod.getModificationValues())
      {
        arg.addValue(propName+':'+getArgumentValue(propertyDefinition, value));
      }
      break;
    default:
      // Bug
      throw new IllegalStateException("Unknown modification type: "+
View Full Code Here

      // This is a bug.
      throw new RuntimeException("Unexpected error: "+e, e);
    }
    for (Object v : values)
    {
      arg.addValue(String.valueOf(v));
    }
    return arg;
  }
}
View Full Code Here

          String argName = CLIProfile.getInstance().getNamingArgument(r);
          StringArgument arg = new StringArgument(argName, null, argName, false,
              true, INFO_NAME_PLACEHOLDER.get(),
              INFO_DSCFG_DESCRIPTION_NAME_CREATE.get(d.getUserFriendlyName()));
          if (r instanceof InstantiableRelationDefinition) {
            arg.addValue(children.get(children.firstKey()));
          } else {
            // Set relation: need the short type name.
            String friendlyName = children.firstKey();
            String shortName = children.get(friendlyName);
            try
View Full Code Here

              catch (IllegalArgumentException e)
              {
                // Last resource: try with friendly name
                cd = d.getChild(friendlyName);
              }
              arg.addValue(getShortTypeName(r.getChildDefinition(), cd));
            }
            catch (IllegalArgumentException e)
            {
              arg.addValue(shortName);
            }
View Full Code Here

              }
              arg.addValue(getShortTypeName(r.getChildDefinition(), cd));
            }
            catch (IllegalArgumentException e)
            {
              arg.addValue(shortName);
            }
          }
          getCommandBuilder().addArgument(arg);
        }
        catch (Throwable t)
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.