Examples of primary()


Examples of org.glassfish.api.Param.primary()

        // for each parameter add
        // <option name="name" type="type" short="s" default="default"
        //   acceptable-values="list"/>
        for (CommandModel.ParamModel p : model.getParameters()) {
            Param param = p.getParam();
            if (param.primary()) {
                primary = p;
                continue;
            }
            ActionReport.MessagePart ppart = cmd.addChild();
            ppart.setChildrenType("option");
View Full Code Here

Examples of org.glassfish.api.Param.primary()

            }
            // do not want to display obsolete options
            if (param.obsolete()) {
                return;
            }
            if (param.primary()) {
                // if primary then it's an operand
                report.getTopMessagePart().addProperty(paramName + "_operand",
                        model.getLocalizedDescription());
            } else {
                report.getTopMessagePart().addProperty(paramName,
View Full Code Here

Examples of org.glassfish.api.Param.primary()

    @Override
    public <V> V getValue(Object component, AnnotatedElement target, Type genericType, Class<V> type) throws MultiException {
  // look for the name in the list of parameters passed.
  Param param = target.getAnnotation(Param.class);
  String paramName = CommandModel.getParamName(param, target);
  if (param.primary()) {
      // this is the primary parameter for the command
      // XXX - for now, only handle multiple values for primary
      List<String> value = parameters.get("DEFAULT");
      if (value != null && value.size() > 0) {
                /*
 
View Full Code Here

Examples of org.glassfish.api.Param.primary()

                Param param = paramModel.getParam();

                ParameterMetaData parameterMetaData = getParameterMetaData(paramModel);


                String parameterName = (param.primary()) ? "id" : paramModel.getName();

                // If the Param has an alias, use it instead of the name
                String alias = param.alias();
                if (alias != null && (!alias.isEmpty())) {
                    parameterName = alias;
View Full Code Here

Examples of org.glassfish.api.Param.primary()

    @Override
    public <V> V getValue(Object component, AnnotatedElement target, Type genericType, Class<V> type) throws MultiException {
  // look for the name in the list of parameters passed.
  Param param = target.getAnnotation(Param.class);
  String paramName = CommandModel.getParamName(param, target);
  if (param.primary()) {
      // this is the primary parameter for the command
            List<String> value = parameters.get("DEFAULT");
      if (value != null && value.size() > 0) {
                /*
                 * If the operands are uploaded files, replace the
View Full Code Here

Examples of org.glassfish.api.Param.primary()

            final String usage = getUsageText(command, model);
            if (paramModel != null) {
                String paramName = paramModel.getName();
                String paramDesc = paramModel.getLocalizedDescription();

                if (param.primary()) {
                    errorMsg = adminStrings.getLocalString("commandrunner.operand.required",
                            "Operand required.");
                } else if (param.password()) {
                    errorMsg = adminStrings.getLocalString("adapter.param.missing.passwordfile",
                            "{0} command requires the passwordfile "
View Full Code Here

Examples of org.glassfish.api.Param.primary()

                }
            } catch (Exception e) {
                // just leave it as null...
            }
            // this is a param.
            if (param.primary()) {
                if (optional) {
                    operand.append("[").append(paramName).append("] ");
                } else {
                    operand.append(paramName).append(" ");
                }
View Full Code Here

Examples of org.glassfish.api.Param.primary()

                Param param = paramModel.getParam();
                if (param == null || paramModel.getName().startsWith("_") ||
                        param.password() || param.obsolete()) {
                    continue;
                }
                if (param.primary()) {
                    operand = paramModel;
                    continue;
                }
                hlp.append("     --").append(paramModel.getName().toLowerCase(Locale.ENGLISH));
                hlp.append(ManifestUtils.EOL);
View Full Code Here

Examples of org.glassfish.api.Param.primary()

        // for each parameter add
        // <option name="name" type="type" short="s" default="default"
        //   acceptable-values="list"/>
        for (CommandModel.ParamModel p : model.getParameters()) {
            Param param = p.getParam();
            if (param.primary()) {
                primary = p;
                continue;
            }
            ActionReport.MessagePart ppart = cmd.addChild();
            ppart.setChildrenType("option");
View Full Code Here

Examples of org.glassfish.api.Param.primary()

            }
            // do not want to display obsolete options
            if (param.obsolete()) {
                return;
            }
            if (param.primary()) {
                // if primary then it's an operand
                report.getTopMessagePart().addProperty(paramName + "_operand",
                        model.getLocalizedDescription());
            } else {
                report.getTopMessagePart().addProperty(paramName,
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.