Package org.apache.isis.core.metamodel.facets.FacetFactory

Examples of org.apache.isis.core.metamodel.facets.FacetFactory.ProcessParameterContext


                    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


            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

            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

            public void someAction(@Mask("###") 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(MaskFacet.class);
        assertNotNull(facet);
        assertTrue(facet instanceof MaskFacetOnParameterAnnotation);
        final MaskFacetOnParameterAnnotation maskFacet = (MaskFacetOnParameterAnnotation) facet;
View Full Code Here

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

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

        assertNotNull(facetedMethodParameter.getFacet(MaskFacet.class));
    }
View Full Code Here

            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

            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

            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

        mockery.checking(new Expectations() {
            {
                one(mockFacetedMethodParameter).addFacet(with(anInstanceOf(MustSatisfySpecificationOnParameterFacet.class)));
            }
        });
        facetFactory.processParams(new ProcessParameterContext(changeLastNameMethodWith, 0, mockFacetedMethodParameter));
    }
View Full Code Here

        mockery.checking(new Expectations() {
            {
                never(mockFacetedMethodParameter).addFacet(with(anInstanceOf(MustSatisfySpecificationOnParameterFacet.class)));
            }
        });
        facetFactory.processParams(new ProcessParameterContext(changeLastNameMethodWithout, 0, mockFacetedMethodParameter));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.FacetFactory.ProcessParameterContext

Copyright © 2018 www.massapicom. 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.