Package org.glassfish.api

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


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


                tag.append(pm.getName());
                if (pm.getClass() != null) {
                    tag.append(pm.getClass().getCanonicalName());
                }
                Param param = pm.getParam();
                if (param.multiple()) {
                    tag.append('M');
                }
                if (param.optional()) {
                    tag.append('P');
                }
View Full Code Here

    // package-private, for testing
    static Object convertListToObject(AnnotatedElement target,
                                    Class type, List<String> paramValList) {
        Param param = target.getAnnotation(Param.class);
        // does this parameter type allow multiple values?
        if (!param.multiple()) {
            if (paramValList.size() == 1)
                return convertStringToObject(target, type, paramValList.get(0));
            throw new UnacceptableValueException(
                localStrings.getLocalString("TooManyValues",
                    "Invalid parameter: {0}.  This parameter may not have " +
View Full Code Here

            wr.writeAttribute("name", p.getName());
            wr.writeAttribute("type", simplifiedTypeOf(p));
            if (par.primary()) {
                wr.writeAttribute("primary", "true");
            }
            if (par.multiple()) {
                wr.writeAttribute("multiple", "true");
            }
            if (par.optional()) {
                wr.writeAttribute("optional", "true");
            }
View Full Code Here

                tag.append(pm.getName());
                if (pm.getClass() != null) {
                    tag.append(pm.getClass().getCanonicalName());
                }
                Param param = pm.getParam();
                if (param.multiple()) {
                    tag.append('M');
                }
                if (param.optional()) {
                    tag.append('P');
                }
View Full Code Here

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

            wr.writeAttribute("name", p.getName());
            wr.writeAttribute("type", simplifiedTypeOf(p));
            if (par.primary()) {
                wr.writeAttribute("primary", "true");
            }
            if (par.multiple()) {
                wr.writeAttribute("multiple", "true");
            }
            if (par.optional()) {
                wr.writeAttribute("optional", "true");
            }
View Full Code Here

    // package-private, for testing
    static Object convertListToObject(AnnotatedElement target,
                                    Class type, List<String> paramValList) {
        Param param = target.getAnnotation(Param.class);
        // does this parameter type allow multiple values?
        if (!param.multiple()) {
            if (paramValList.size() == 1)
                return convertStringToObject(target, type, paramValList.get(0));
            throw new UnacceptableValueException(
                localStrings.getLocalString("TooManyValues",
                    "Invalid parameter: {0}.  This parameter may not have " +
View Full Code Here

    parameters.set(paramName, value);
                V paramValue = (V) convertListToObject(target, type, value);
                return paramValue;
      }
  }
        if (param.multiple()) {
            List<String> value = parameters.get(paramName);
            if (value != null && value.size() > 0) {
                final List<String> filePaths = getUploadedFileParamValues(
                        paramName,
                        type, optionNameToUploadedFileMap);
View Full Code Here

    // package-private, for testing
    public static Object convertListToObject(AnnotatedElement target,
                                    Class type, List<String> paramValList) {
        Param param = target.getAnnotation(Param.class);
        // does this parameter type allow multiple values?
        if (!param.multiple()) {
            if (paramValList.size() == 1)
                return convertStringToObject(target, type, paramValList.get(0));
            throw new UnacceptableValueException(
                localStrings.getLocalString("TooManyValues",
                    "Invalid parameter: {0}.  This parameter may not have " +
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.