Examples of Parameter


Examples of org.jboss.portal.common.net.media.Parameter

      else
      {
         // Default to "text/html"
         mediaType = MediaType.TEXT_HTML;
      }
      parameters.add(new Parameter("charset", s));
     
      setContentType(new ContentType(mediaType, parameters).getValue());
   }
View Full Code Here

Examples of org.jibx.ws.codec.MediaType.Parameter

   
    @Test
    public final void toString_shouldReturnDifferentStringAfterParametersAdded() throws Exception {
        MediaType mediaType = new MediaType(" text/hTMl;   charset=UTF-8 ");
        assertThat(mediaType.toString(), is("text/html; charset=UTF-8"));
        mediaType.addParameter(new Parameter("action", "man"));
        assertThat(mediaType.toString(), is("text/html; charset=UTF-8; action=man"))
    }
View Full Code Here

Examples of org.junit.runners.Parameterized.Parameter

                            + ".");
        }
        Object testClassInstance = getTestClass().getJavaClass().newInstance();
        for (FrameworkField each : annotatedFieldsByParameter) {
            Field field = each.getField();
            Parameter annotation = field.getAnnotation(Parameter.class);
            int index = annotation.value();
            try {
                field.set(testClassInstance, parameters[index]);
            } catch (IllegalArgumentException iare) {
                throw new Exception(getTestClass().getName()
                        + ": Trying to set " + field.getName()
View Full Code Here

Examples of org.junitext.runners.parameters.factory.Parameter

    public List<ParameterList> createParameters(Class<?> klass, File xmlFile)
        throws Exception {
      ArrayList<ParameterList> params = new ArrayList<ParameterList>();

      ArrayList<Parameter> paramList = new ArrayList<Parameter>();
      paramList.add(new Parameter(new Robot("Daneel Olivaw", 134, "X24R",
          "Han Fastolfe")));
      paramList.add(new Parameter(new Robot("Daneel Olivaw", 134, "X24R",
          "Han Fastolfe")));
      params.add(new ParameterList("Equal Robots", paramList));

      paramList = new ArrayList<Parameter>();
      paramList.add(new Parameter(new Robot("Johnny 5", 5, "SAINT",
          "Nova Laboratories")));
      paramList.add(new Parameter(new Robot("Johnny 5", 5, "SAINT",
          "Nova Laboratories")));
      params.add(new ParameterList("Equal Robots", paramList));

      paramList = new ArrayList<Parameter>();
      paramList.add(new Parameter(new Robot("Johnny 5", 5, "SAINT",
          "Nova Laboratories")));
      paramList.add(new Parameter(new Robot("Daneel Olivaw", 134, "X24R",
          "Han Fastolfe")));
      params.add(new ParameterList("Unequal Robots", paramList));

      paramList = new ArrayList<Parameter>();
      paramList.add(new Parameter(new Robot("Daneel Olivaw", 134, "X24R",
          "Han Fastolfe")));
      paramList.add(new Parameter(new Robot("Johnny 5", 5, "SAINT",
          "Nova Laboratories")));
      params.add(new ParameterList("Unequal Robots", paramList));

      return params;
    }
View Full Code Here

Examples of org.jwall.web.policy.Parameter

          return this;
        }

       
        if( arg1.getType() == TreeNode.PARAMETER_NODE ){
          Parameter p = (Parameter) arg1;
         
          StringBuffer s = new StringBuffer("<html>Parameter: <b>"+p.getName()+"</b>");
         
          s.append(", Regexp: <b>" + p.getRegexp() + "</b>");
          if( p.isRequired() )
            s.append(", Required: <b>"+p.isRequired()+"</b>");

          if( p.getScope() != null  )
            s.append(", Scope: <b>"+p.getScope()+"</b>");
         
          s.append("</html>");
            setText( s.toString() );
            setIcon( WebPolicyEditor.getIcon(p) );
View Full Code Here

Examples of org.jwildfire.script.Parameter

    }
  }

  public void propertyCmbChanged() {
    String propName = (String) propertyCmb.getSelectedItem();
    Parameter parameter = currAction.getParameterByName(propName);
    Envelope envelope = (parameter != null) ? parameter.getEnvelope() : null;
    setCurrEnvelope(envelope);
    enableControls();
    refreshEnvelope();
  }
View Full Code Here

Examples of org.lealone.expression.Parameter

            for (int i = 0; i < len; i++) {
                int idx = paramIndex.get(i);
                int mask = masks[idx];
                int nextParamIndex = q.getParameters().size() + view.getParameterOffset();
                if ((mask & IndexCondition.EQUALITY) != 0) {
                    Parameter param = new Parameter(nextParamIndex);
                    q.addGlobalCondition(param, idx, Comparison.EQUAL_NULL_SAFE);
                } else {
                    if ((mask & IndexCondition.START) != 0) {
                        Parameter param = new Parameter(nextParamIndex);
                        q.addGlobalCondition(param, idx, Comparison.BIGGER_EQUAL);
                    }
                    if ((mask & IndexCondition.END) != 0) {
                        Parameter param = new Parameter(nextParamIndex);
                        q.addGlobalCondition(param, idx, Comparison.SMALLER_EQUAL);
                    }
                }
            }
            String sql = q.getPlanSQL();
View Full Code Here

Examples of org.mapstruct.ap.model.common.Parameter

            boolean isValid = true;
            boolean foundEntryMatch;

            String[] sourcePropertyNames = new String[0];
            String[] segments = sourceName.split( "\\." );
            Parameter parameter = null;

            List<PropertyEntry> entries = new ArrayList<PropertyEntry>();

            if ( method.getSourceParameters().size() > 1 ) {

                // parameterName is mandatory for multiple source parameters
                if ( segments.length > 0 ) {
                    String sourceParameterName = segments[0];
                    parameter = method.getSourceParameter( sourceParameterName );
                    if ( parameter == null ) {
                        reportMappingError( "Method has no parameter named \"%s\".", sourceParameterName );
                        isValid = false;
                    }
                }
                if ( segments.length > 1 && parameter != null ) {
                    sourcePropertyNames = Arrays.copyOfRange( segments, 1, segments.length );
                    entries = getSourceEntries( parameter.getType(), sourcePropertyNames );
                    foundEntryMatch = ( entries.size() == sourcePropertyNames.length );
                }
                else {
                    // its only a parameter, no property
                    foundEntryMatch = true;
                }

            }
            else {

                // parameter name is not mandatory for single source parameter
                sourcePropertyNames = segments;
                parameter = method.getSourceParameters().get( 0 );
                entries = getSourceEntries( parameter.getType(), sourcePropertyNames );
                foundEntryMatch = ( entries.size() == sourcePropertyNames.length );

                if ( !foundEntryMatch ) {
                    //Lets see if the expression contains the parameterName, so parameterName.propName1.propName2
                    if ( parameter.getName().equals( segments[0] ) ) {
                        sourcePropertyNames = Arrays.copyOfRange( segments, 1, segments.length );
                        entries = getSourceEntries( parameter.getType(), sourcePropertyNames );
                        foundEntryMatch = ( entries.size() == sourcePropertyNames.length );
                    }
                    else {
                        // segment[0] cannot be attributed to the parameter name.
                        parameter = null;
                    }
                }
            }

            if ( !foundEntryMatch ) {

                if ( parameter != null ) {
                    reportMappingError(
                        "The type of parameter \"%s\" has no property named \"%s\".",
                        parameter.getName(),
                        Strings.join( Arrays.asList( sourcePropertyNames ), "." )
                    );
                }
                else {
                    reportMappingError(
View Full Code Here

Examples of org.milyn.cdr.Parameter

        List<SmooksResourceConfiguration> configList = configurator.toConfig();
        SmooksResourceConfiguration config = configList.get(0);

        if(keyMap != null) {
            Parameter keyMapParam = new Parameter(YamlReader.CONFIG_PARAM_KEY_MAP, keyMap);
            config.setParameter(keyMapParam);
        }

        return configList;
    }
View Full Code Here

Examples of org.mockserver.model.Parameter

        bookPage.containsBook(bookServer.getBooksDB().get("1"));
        proxy.verify(
                request()
                        .withPath("/get_book")
                        .withQueryStringParameter(
                                new Parameter("id", "1")
                        ),
                Times.exactly(1)
        );
    }
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.