Examples of processParams()


Examples of org.apache.isis.core.metamodel.facets.param.bigdecimal.javaxvaldigits.BigDecimalFacetOnParameterFromJavaxValidationAnnotationFactory.processParams()

                    final BigDecimal cost) {
            }
        }
        final Method method = findMethod(Order.class, "updateCost", new Class[] { BigDecimal.class });

        facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));

        final Facet facet = facetedMethodParameter.getFacet(BigDecimalValueFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof BigDecimalFacetOnParameterFromJavaxValidationDigitsAnnotation);
        final BigDecimalFacetOnParameterFromJavaxValidationDigitsAnnotation annotation = (BigDecimalFacetOnParameterFromJavaxValidationDigitsAnnotation) facet;
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.describedas.annotderived.DescribedAsFacetOnParameterAnnotationElseDerivedFromTypeFactory.processParams()

            public void someAction(@DescribedAs("some description") final int x) {
            }
        }
        final Method actionMethod = findMethod(Customer.class, "someAction", new Class[] { int.class });

        facetFactory.processParams(new ProcessParameterContext(actionMethod, 0, facetedMethodParameter));

        final Facet facet = facetedMethodParameter.getFacet(DescribedAsFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof DescribedAsFacetAbstract);
        final DescribedAsFacetAbstract describedAsFacetAbstract = (DescribedAsFacetAbstract) facet;
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.labelat.annotation.LabelAtFacetOnParameterAnnotationFactory.processParams()

            public void someAction(@LabelAt(LabelAt.Position.LEFT) final String foo) {
            }
        }
        final Method method = findMethod(Customer.class, "someAction", new Class[] { String.class });

        facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));

        final Facet facet = facetedMethodParameter.getFacet(LabelAtFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof LabelAtFacetOnParameterAnnotation);
        final LabelAtFacetOnParameterAnnotation labelAtFacetAnnotation = (LabelAtFacetOnParameterAnnotation) facet;
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.mandatory.annotation.MandatoryFacetOnParameterInvertedByOptionalAnnotationFactory.processParams()

            public void someAction(@Optional final String foo) {
            }
        }
        final Method method = findMethod(Customer.class, "someAction", new Class[] { String.class });

        facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));

        final Facet facet = facetedMethodParameter.getFacet(MandatoryFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MandatoryFacetOnParameterInvertedByOptionalAnnotation);
    }
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.mandatory.annotation.MandatoryFacetOnParameterInvertedByOptionalAnnotationFactory.processParams()

            public void someAction(@Optional final int foo) {
            }
        }
        final Method method = findMethod(Customer.class, "someAction", new Class[] { int.class });

        facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));

        assertNull(facetedMethod.getFacet(MandatoryFacet.class));
    }

}
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.multiline.annotation.MultiLineFacetOnParameterAnnotationFactory.processParams()

            public void someAction(@MultiLine(numberOfLines = 8, preventWrapping = false) final String foo) {
            }
        }
        final Method method = findMethod(Customer.class, "someAction", new Class[] { String.class });

        facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));

        final Facet facet = facetedMethodParameter.getFacet(MultiLineFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MultiLineFacetOnParameterAnnotation);
        final MultiLineFacetOnParameterAnnotation multiLineFacetAnnotation = (MultiLineFacetOnParameterAnnotation) facet;
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.multiline.annotation.MultiLineFacetOnParameterAnnotationFactory.processParams()

            public void someAction(@MultiLine(numberOfLines = 8, preventWrapping = false) final int foo) {
            }
        }
        final Method method = findMethod(Customer.class, "someAction", new Class[] { int.class });

        facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));

        assertNull(facetedMethod.getFacet(MultiLineFacet.class));
    }

}
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.named.annotation.NamedFacetOnParameterAnnotationFactory.processParams()

        }
        final Method actionMethod = findMethod(Customer.class, "someAction", new Class[] { int.class });

        expectNoMethodsRemoved();

        facetFactory.processParams(new ProcessParameterContext(actionMethod, 0, facetedMethodParameter));

        final Facet facet = facetedMethodParameter.getFacet(NamedFacet.class);
        assertThat(facet, is(not(nullValue())));
        assertThat(facet instanceof NamedFacetAbstract, is(true));
        final NamedFacetAbstract namedFacetAbstract = (NamedFacetAbstract) facet;
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.renderedasdaybefore.annotation.RenderedAsDayBeforeFacetOnParameterAnnotationFactory.processParams()

            public void someAction(@RenderedAsDayBefore @Named("End Date") final LocalDate endDate) {
            }
        }
        final Method method = findMethod(Customer.class, "someAction", new Class[] { LocalDate.class });

        facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));

        final Facet facet = facetedMethodParameter.getFacet(RenderedAdjustedFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof RenderedAsDayBeforeFacetOnParameterAnnotation);
        final RenderedAsDayBeforeFacetOnParameterAnnotation facetAnnotation = (RenderedAsDayBeforeFacetOnParameterAnnotation) facet;
View Full Code Here

Examples of org.apache.isis.core.metamodel.facets.param.typicallen.annotation.TypicalLengthFacetOnParameterAnnotationFactory.processParams()

            public void someAction(@TypicalLength(20) final int foo) {
            }
        }
        final Method method = findMethod(Customer.class, "someAction", new Class[] { int.class });

        facetFactory.processParams(new ProcessParameterContext(method, 0, facetedMethodParameter));

        final Facet facet = facetedMethodParameter.getFacet(TypicalLengthFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof TypicalLengthFacetOnParameterAnnotation);
        final TypicalLengthFacetOnParameterAnnotation typicalLengthFacetAnnotation = (TypicalLengthFacetOnParameterAnnotation) facet;
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.