Package org.glassfish.api

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


            if (param.password())
                return;
            // 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


    @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

                    bw.write(": ");
                    bw.write(str);
                    bw.newLine();
                }
                //parameter / primary
                if (param.primary()) {
                    bw.write(PRIMARY_ELEMENT);
                    bw.write(": true");
                    bw.newLine();
                }
                //parameter / multiple
View Full Code Here

                    tag.append('M');
                }
                if (param.optional()) {
                    tag.append('P');
                }
                if (param.primary()) {
                    tag.append('1');
                }
                if (param.obsolete()) {
                    tag.append('O');
                }
View Full Code Here

                while (iterator.hasNext()) {
                    paramModel = iterator.next();
                    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

                    bw.write(": ");
                    bw.write(str);
                    bw.newLine();
                }
                //parameter / primary
                if (param.primary()) {
                    bw.write(PRIMARY_ELEMENT);
                    bw.write(": true");
                    bw.newLine();
                }
                //parameter / multiple
View Full Code Here

                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

                    tag.append('M');
                }
                if (param.optional()) {
                    tag.append('P');
                }
                if (param.primary()) {
                    tag.append('1');
                }
                if (param.obsolete()) {
                    tag.append('O');
                }
View Full Code Here

            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

                }
            } 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

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.