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

Examples of org.apache.isis.core.metamodel.facets.FacetedMethodParameter


                final Class<?> cls = processMethodContext.getCls();
                throw new MetaModelException(cls + " uses both old and new choices syntax - must use one or other");
            }

            // add facets directly to parameters, not to actions
            final FacetedMethodParameter paramAsHolder = parameters.get(i);
            FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(choicesMethod, arrayOfParamType, paramAsHolder, getSpecificationLoader(), getAdapterManager()));
        }
    }
View Full Code Here


        if(!getSpecificationLoader().loadSpecification(paramType).containsDoOpFacet(ChoicesFacet.class)) {
            return;
        }
       
        // don't trample over any existing facets.
        final FacetedMethodParameter facetHolder = processParameterContext.getFacetHolder();
        if(facetHolder.containsDoOpFacet(ActionParameterChoicesFacet.class)) {
            return;
        }
       
        FacetUtil.addFacet(new ActionParameterChoicesFacetDerivedFromChoicesFacet(facetHolder, getSpecificationLoader(), getAdapterManager()));
    }
View Full Code Here

        super.setUp();
        BasicConfigurator.configure();
        reflector = new ProgrammableReflector();
        facetHolder = new FacetHolderImpl();
        facetedMethod = FacetedMethod.createProperty(Customer.class, "firstName");
        facetedMethodParameter = new FacetedMethodParameter(String.class);
        methodRemover = new ProgrammableMethodRemover();
    }
View Full Code Here

    }

    @Override
    public void processParams(final ProcessParameterContext processParameterContext) {
        final Class<?> type = processParameterContext.getMethod().getParameterTypes()[processParameterContext.getParamNum()];
        final FacetedMethodParameter facetHolder = processParameterContext.getFacetHolder();
        addFacetDerivedFromTypeIfPresent(facetHolder, type);
    }
View Full Code Here

                final Class<?> cls = processMethodContext.getCls();
                throw new MetaModelException(cls + " uses both old and new choices syntax - must use one or other");
            }

            // add facets directly to parameters, not to actions
            final FacetedMethodParameter paramAsHolder = parameters.get(i);
            FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(choicesMethod, arrayOfParamType, paramAsHolder, getSpecificationLookup(), getAdapterMap()));
        }
    }
View Full Code Here

            if (facetedMethod.containsDoOpFacet(ActionDefaultsFacet.class)) {
                throw new MetaModelException(cls + " uses both old and new default syntax for " + actionMethod.getName() + "(...) - must use one or other");
            }

            // add facets directly to parameters, not to actions
            final FacetedMethodParameter paramAsHolder = parameters.get(i);
            FacetUtil.addFacet(new ActionParameterDefaultsFacetViaMethod(defaultMethod, paramAsHolder));
        }
    }
View Full Code Here

        super.setUp();
        BasicConfigurator.configure();
        reflector = new ProgrammableReflector();
        facetHolder = new FacetHolderImpl();
        facetedMethod = FacetedMethod.createProperty(Customer.class, "firstName");
        facetedMethodParameter = new FacetedMethodParameter(String.class);
        methodRemover = new ProgrammableMethodRemover();
    }
View Full Code Here

                final Class<?> cls = processMethodContext.getCls();
                throw new MetaModelException(cls + " uses both old and new choices syntax - must use one or other");
            }

            // add facets directly to parameters, not to actions
            final FacetedMethodParameter paramAsHolder = parameters.get(i);
            FacetUtil.addFacet(new ActionParameterChoicesFacetViaMethod(choicesMethod, arrayOfParamType, paramAsHolder,
                getSpecificationLookup(), getAdapterMap()));
        }
    }
View Full Code Here

                throw new MetaModelException(cls + " uses both old and new default syntax for "
                    + actionMethod.getName() + "(...) - must use one or other");
            }

            // add facets directly to parameters, not to actions
            final FacetedMethodParameter paramAsHolder = parameters.get(i);
            FacetUtil.addFacet(new ActionParameterDefaultsFacetViaMethod(defaultMethod, paramAsHolder));
        }
    }
View Full Code Here

    @Override
    public void processParams(final ProcessParameterContext processParameterContext) {
        final Class<?> type =
            processParameterContext.getMethod().getParameterTypes()[processParameterContext.getParamNum()];
        final FacetedMethodParameter facetHolder = processParameterContext.getFacetHolder();
        addFacetDerivedFromTypeIfPresent(facetHolder, type);
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.FacetedMethodParameter

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.