Examples of Parameter


Examples of com.betfair.cougar.core.api.transcription.Parameter

            }
        }
        try {
            for (int i = 0; i < args.length; ++i) {
                RescriptParamBindingDescriptor descriptor = paramBindings[i];
                Parameter param = operationDefinition.getParameters()[i];
                switch (descriptor.getSource()) {
                    case HEADER :
                        String key = descriptor.getName();
                        args[i] = resolveArgument(headersWithNullValues.contains(key.toLowerCase()) ? "" : request.getHeader(key), param, descriptor, format);
                        break;
                    case QUERY :
                        args[i] = resolveArgument(request.getParameter(descriptor.getName()), param, descriptor, format);
                        break;
                    case BODY :
                        if (body != null) {
                            args[i] = body.getValue(descriptor.getName());
                            // non-null enums get stored as their raw string value so need converting to the true enum value
                            if (param.getParameterType().getType() == ParameterType.Type.ENUM) {
                                if (args[i] != null) {
                                    args[i] = EnumUtils.readEnum(param.getParameterType().getImplementationClass(), (String) args[i]);
                                }
                            }
                        }
                        break;
                    default :
View Full Code Here

Examples of com.bj58.spat.gaea.server.core.communication.http.Action.Parameter

            sbMsg.append(piAry[i].getMapping());
           
            if(piAry[i].getHttpPathParameter() != null
               && piAry[i].getHttpPathParameter().paramType() == HttpParameterType.ContentParameter) {
             
              paramList.add(new Parameter(paraTypeName,
                            piAry[i].getMapping(),
                            null,
                            0,
                            getContentParaIndex(piAry, piAry[i]),
                            piAry[i].getIndex(),
                            HttpParameterType.ContentParameter)
                         );
             
              sbMsg.append("\ncontentParamIndex:");
              sbMsg.append(getContentParaIndex(piAry, piAry[i]));
              sbMsg.append("\nparamType:");
              sbMsg.append(HttpParameterType.ContentParameter);
             
            } else {
              paramList.add(new Parameter(paraTypeName,
                            piAry[i].getMapping(),
                            null,
                            getUrlParaIndex(uri, piAry[i].getMapping()),
                            0,
                            piAry[i].getIndex(),
View Full Code Here

Examples of com.buschmais.xo.api.annotation.ResultOf.Parameter

        }
        // Determine parameter bindings
        Annotation[][] parameterAnnotations = method.getParameterAnnotations();
        List<Parameter> parameters = new ArrayList<>();
        for (Annotation[] parameterAnnotation : parameterAnnotations) {
            Parameter parameter = null;
            for (Annotation annotation : parameterAnnotation) {
                if (Parameter.class.equals(annotation.annotationType())) {
                    parameter = (Parameter) annotation;
                }
            }
View Full Code Here

Examples of com.cloud.api.Parameter

        ArrayList<Argument> arguments = new ArrayList<Argument>();
        ArrayList<Argument> requiredArguments = new ArrayList<Argument>();
        ArrayList<Argument> optionalArguments = new ArrayList<Argument>();
        Argument id = null;
        for (Field f : fields) {
            Parameter parameterAnnotation = f.getAnnotation(Parameter.class);
            if (parameterAnnotation != null && parameterAnnotation.expose() && parameterAnnotation.includeInApiDoc()) {
                Argument reqArg = new Argument(parameterAnnotation.name());
                reqArg.setRequired(parameterAnnotation.required());
                if (!parameterAnnotation.description().isEmpty()) {
                    reqArg.setDescription(parameterAnnotation.description());
                }
               
                if (parameterAnnotation.type() == BaseCmd.CommandType.LIST || parameterAnnotation.type() == BaseCmd.CommandType.MAP) {
                    reqArg.setType(parameterAnnotation.type().toString().toLowerCase());
                }
               
                if(!parameterAnnotation.since().isEmpty()){
                  reqArg.setSinceVersion(parameterAnnotation.since());
                }
               
                if (reqArg.isRequired() == true) {
                    if (parameterAnnotation.name().equals("id")) {
                        id = reqArg;
                    } else {
                        requiredArguments.add(reqArg);
                    }
                } else {
View Full Code Here

Examples of com.collective2.signalEntry.Parameter

        int i = split.length;
        while(--i>1) {
            String[] arg = split[i].split("=");
            String endsWith = arg[0]+'=';

            Parameter found = lookupParameter(endsWith);
            Object value = found.parse(arg[1]);
            request.put(found,value);
        }

        return request;
    }
View Full Code Here

Examples of com.dubture.symfony.index.model.Parameter

    ResultSet result = statement.executeQuery(sql);
    while (result.next()) {
      int columnIndex = 0;
      String key = result.getString(++columnIndex);
      String value = result.getString(++columnIndex);
      params.add(new Parameter(key, value));
    }

    return params;
  }
View Full Code Here

Examples of com.dyuproject.util.http.HttpConnector.Parameter

            throws IOException
    {
        HttpConnector connector = context.getHttpConnector();
        UrlEncodedParameterMap params = new UrlEncodedParameterMap(serviceUrl);
        context.getNonceAndTimestamp().put(params, token.getCk());
        Parameter authorization = new Parameter("Authorization",
                HttpAuthTransport.getAuthHeaderValue(params, ep, token,
                context.getNonceAndTimestamp(),  ep.getSignature()));
        return connector.doGET(params.getUrl(), authorization);
       
    }
View Full Code Here

Examples of com.elega9t.commons.args.Parameter

                Command command = commandClass.newInstance();
                Map<NamedParameter, Field> namedParameterFieldMap = ReflectionUtilities.getDeclaredFieldsWithAnnotation(NamedParameter.class, commandClass);
                for (final NamedParameter namedParameter : namedParameterFieldMap.keySet()) {
                    Field field = namedParameterFieldMap.get(namedParameter);
                    field.setAccessible(true);
                    Parameter parameter = commandLineParameters.get(namedParameter.name());
                    if (parameter != null) {
                        field.set(command, parameter.getValue());
                    } else if (namedParameter.required()) {
                        throw new IllegalStateException("Parameter " + namedParameter.name() + " is required.");
                    }
                }
                Map<com.elega9t.commons.shell.intrprtr.Parameter, Field> parameterFieldMap = ReflectionUtilities.getDeclaredFieldsWithAnnotation(com.elega9t.commons.shell.intrprtr.Parameter.class, commandClass);
                for (final com.elega9t.commons.shell.intrprtr.Parameter param : parameterFieldMap.keySet()) {
                    Field field = parameterFieldMap.get(param);
                    field.setAccessible(true);
                    Parameter parameter = commandLineParameters.get(param.index() + "");
                    if (parameter != null) {
                        field.set(command, parameter.getValue());
                    } else if (param.required()) {
                        throw new IllegalStateException("Parameter '" + field.getName() + "' is required.");
                    }
                }
                int exitVal = command.execute(shell);
View Full Code Here

Examples of com.fogas.kommandline.wrapper.Parameter

    setDefaults();
    readConfig();
    if (args.length > 0) {
      Set<Parameter> rules = new HashSet<Parameter>();
      // -[[l|lang] en|hu]
      rules.add(new Parameter(ARGUMENTS, LANGUAGE, ZERO_OR_ONE, "-(l|lang)", "[a-zA-Z]{2}", "Koll3ctions.usage.lang"));
      // -[r|readable]
      rules.add(new Parameter(FLAG, READABLE_OUTPUT, ZERO_OR_ONE, "-(r|readable)", "Koll3ctions.usage.readable"));
      // -[b|backup]
      rules.add(new Parameter(FLAG, CREATE_BACKUP, ZERO_OR_ONE, "-(b|backup)", "Koll3ctions.usage.backup"));
      // -[s|scan] [a|p|ap]
      rules.add(new Parameter(ARGUMENTS, CL_SCAN, ZERO_OR_ONE, "-(s|scan)", "(a|p|ap|pa)", "Koll3ctions.usage.scan"));
      // -[k|kindle] [drive letter]
      rules.add(new Parameter(ARGUMENTS, KINDLE_PATH, ZERO_OR_ONE, "-(k|kindle)", "^(.+)[\\\\|/]?([^/]+)$", "Koll3ctions.usage.kindle"));
      // -[?|h|help]
      rules.add(new Parameter(FLAG, CL_HELP, ZERO_OR_ONE, "-(\\?|h|help)", "Koll3ctions.usage.help"));
      // -[la|latinAlphabet]
      rules.add(new Parameter(FLAG, LATIN_ALPHABET, ZERO_OR_ONE, "-(la|latinAlphabet)", "Koll3ctions.usage.latinAlphabet"));
      // -[d|debug]
      rules.add(new Parameter(FLAG, DEBUG_MODE, ZERO_OR_ONE, "-(d|debug)", ""));
      KommandLine cl = new KommandLine(rules, "Koll3ctions.usage.general", "Koll3ctions.usage.example", BUNDLE_NAME);
      cl.parse(args);
      String s;
      boolean needHelp = false;
      for (Parameter param : rules) {
View Full Code Here

Examples of com.foundationdb.ais.model.Parameter

   
    public void setInputs() {
        int nargs = invocation.size();
        ServerJavaValues values = invocation.asValues(context, bindings);
        for (int i = 0; i < nargs; i++) {
            Parameter parameter = invocation.getRoutineParameter(i);
            switch (parameter.getDirection()) {
            case IN:
            case INOUT:
                setInParameter(parameter, values, i);
                break;
            }
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.