Examples of Parameter


Examples of org.apache.jetspeed.om.registry.Parameter

                Iterator it = rss.getParameterNames();
                HashMap mapParams = new HashMap();
                while (it.hasNext())
                {
                    String name = (String) it.next();
                    Parameter p = rss.getParameter(name);
                    assertNotNull(p);
                    //System.out.println("PARAM:" + p.getName() + " = " + p.getValue());
                    mapParams.put(p.getName(), p);
                }
                assertTrue(mapParams.containsKey("showtitle"));
                assertTrue(mapParams.containsKey("stylesheet"));
                assertTrue(mapParams.containsKey("itemdisplayed"));

                // test ref
                PortletEntry hack = (PortletEntry) portlets.elementAt(2);
                assertNotNull(hack);
                assertTrue(hack.getName().equals("XMLHack"));
                assertTrue(hack.isHidden());
                assertTrue(hack.getType().equals("ref"));
                assertTrue(hack.getParent().equals("RSS"));
                assertTrue(!hack.isApplication());
                assertTrue(hack.getTitle().equals("XMLHack Title"));
                assertTrue(hack.getDescription().equals("XMLHack Description"));
                assertTrue(hack.getMetaInfo().getTitle().equals("XMLHack Title"));
                assertTrue(hack.getMetaInfo().getDescription().equals("XMLHack Description"));
                assertTrue(hack.getClassname().equals("org.apache.jetspeed.portal.portlets.NewRSSPortlet"));

                mapParams.clear();
                it = hack.getParameterNames();
                while (it.hasNext())
                {
                    String name = (String) it.next();
                    Parameter p = hack.getParameter(name);
                    assertNotNull(p);
                    //System.out.println("HACK PARAM:" + p.getName() + " = " + p.getValue());
                    mapParams.put(p.getName(), p);
                }
                assertTrue(mapParams.containsKey("showtitle"));
                assertTrue(mapParams.containsKey("stylesheet"));
                assertTrue(mapParams.containsKey("itemdisplayed"));
                assertTrue(mapParams.containsKey("HACK"));
                Parameter p = (Parameter) mapParams.get("HACK");
                assertTrue(p.getValue().equals("hacker"));
                Parameter p2 = (Parameter) mapParams.get("showtitle");
                MetaInfo p2m = p2.getMetaInfo();
                assertTrue(p2m.getTitle().equals("Show title description ?"));
                assertTrue(p2.getTitle().equals("Show title description ?"));
                Map pMap = hack.getParameterMap();
                String v15 = (String) pMap.get("itemdisplayed");
                assertTrue(v15.equals("15"));

                // test falling back on meta info
View Full Code Here

Examples of org.apache.maven.plugin.descriptor.Parameter

            .append( "\'\n" );

        int idx = 0;
        for ( Iterator it = params.iterator(); it.hasNext(); idx++ )
        {
            Parameter param = (Parameter) it.next();

            messageBuffer.append( "\n[" ).append( idx ).append( "] " );

            decomposeParameterIntoUserInstructions( mojo, param, messageBuffer );
View Full Code Here

Examples of org.apache.myfaces.trinidadinternal.ui.collection.Parameter

      if (params != null)
      {
        map = new String[params.length * 2];
        for (int i = 0, j = 0; i < params.length; i++)
        {
          Parameter p = params[i];
          map[j++] = p.getKey();
          map[j++] = p.getValue(context);
        }
        return map;
      }
      else
      {
View Full Code Here

Examples of org.apache.olingo.odata2.api.annotation.edm.Parameter

      for (Annotation[] annotationArr : annotations) {
        Class<?> parameterType = parameterTypes[j++];

        for (Annotation element : annotationArr) {
          if (element instanceof Parameter) {
            Parameter annotation = (Parameter) element;
            FunctionImportParameter functionImportParameter = new FunctionImportParameter();
            if (annotation.name().equals("")) {
              throw ODataJPAModelException.throwException(ODataJPAModelException.FUNC_PARAM_NAME_EXP.addContent(method
                  .getDeclaringClass().getName(), method.getName()), null);
            } else {
              functionImportParameter.setName(annotation.name());
            }

            functionImportParameter.setType(JPATypeConvertor.convertToEdmSimpleType(parameterType, null));
            functionImportParameter.setMode(annotation.mode().toString());

            Facets facets = new Facets();
            if (annotation.facets().maxLength() > 0) {
              facets.setMaxLength(annotation.facets().maxLength());
            }
            if (annotation.facets().nullable() == false) {
              facets.setNullable(false);
            } else {
              facets.setNullable(true);
            }

            if (annotation.facets().precision() > 0) {
              facets.setPrecision(annotation.facets().precision());
            }
            if (annotation.facets().scale() >= 0) {
              facets.setScale(annotation.facets().scale());
            }

            functionImportParameter.setFacets(facets);
            mapping = new JPAEdmMappingImpl();
            mapping.setJPAType(parameterType);
View Full Code Here

Examples of org.apache.openjpa.kernel.exps.Parameter

        super.setImplicitTypes(val1, val2, expected);

        // as well as setting the types for conversions, we also need to
        // ensure that any parameters are declared with the correct type,
        // since the JPA spec expects that these will be validated
        Parameter param = val1 instanceof Parameter ? (Parameter) val1
            : val2 instanceof Parameter ? (Parameter) val2 : null;
        Path path = val1 instanceof Path ? (Path) val1
            : val2 instanceof Path ? (Path) val2 : null;

        // we only check for parameter-to-path comparisons
        if (param == null || path == null || parameterTypes == null)
            return;

        FieldMetaData fmd = path.last();
        if (fmd == null)
            return;

        Class type = path.isXPath() ? path.getType() : fmd.getType();
        if (type == null)
            return;

        String paramName = param.getParameterName();
        if (paramName == null)
            return;

        // make sure we have already declared the parameter
        if (parameterTypes.containsKey(paramName))
View Full Code Here

Examples of org.apache.pluto.om.common.Parameter

                ParameterSet parameters = servlet.getInitParameterSet();

                ParameterSetCtrl parameterSetCtrl =
                    (ParameterSetCtrl) controllerFactory.get(parameters);

                Parameter parameter1 = parameters.get("portlet-class");
                if (parameter1 == null) {
                    parameterSetCtrl.add(
                        "portlet-class",
                        portlet.getClassName());
                } else {
                    ParameterCtrl parameterCtrl =
                        (ParameterCtrl) controllerFactory.get(parameter1);
                    parameterCtrl.setValue(portlet.getClassName());

                }
                Parameter parameter2 = parameters.get("portlet-guid");
                if (parameter2 == null) {
                    parameterSetCtrl.add(
                        "portlet-guid",
                        portlet.getId().toString());
                } else {
View Full Code Here

Examples of org.apache.soap.rpc.Parameter

        */
        else if (detailEntry instanceof Parameter)
        {
          try
          {
            Parameter detailEntryParameter = (Parameter)detailEntry;
            Serializer s = xjmr.querySerializer(Parameter.class, inScopeEncStyle);

            if (s != null)
            {
              s.marshall(null,
View Full Code Here

Examples of org.apache.tapestry.annotations.Parameter

    {
        FieldFilter filter = new FieldFilter()
        {
            public boolean accept(String fieldName, String fieldType)
            {
                Parameter annotation = transformation
                        .getFieldAnnotation(fieldName, Parameter.class);

                return annotation != null && annotation.principal();
            }
        };

        List<String> principleFieldNames = transformation.findFields(filter);
View Full Code Here

Examples of org.apache.tapestry5.annotations.Parameter

    {
        FieldFilter filter = new FieldFilter()
        {
            public boolean accept(String fieldName, String fieldType)
            {
                Parameter annotation = transformation
                        .getFieldAnnotation(fieldName, Parameter.class);

                return annotation != null && annotation.principal();
            }
        };

        List<String> principleFieldNames = transformation.findFields(filter);
View Full Code Here

Examples of org.apache.tools.ant.types.Parameter

        } catch (BuildException be1) {
            assertEquals("The name attribute is required", be1.getMessage());
        }

        s = (FilenameSelector)getInstance();
        Parameter param = new Parameter();
        param.setName("garbage in");
        param.setValue("garbage out");
        Parameter[] params = {param};
        s.setParameters(params);
        try {
            s.isSelected(basedir,filenames[0],files[0]);
            fail("FilenameSelector did not check for valid parameter element");
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.