Package org.apache.isis.core.metamodel.facetapi

Examples of org.apache.isis.core.metamodel.facetapi.FacetHolder


     * provided by {@link FallbackFacetFactory} instead.
     */
    @Override
    public void process(final ProcessClassContext processClassContext) {
        final Class<?> cls = processClassContext.getCls();
        final FacetHolder facetHolder = processClassContext.getFacetHolder();

        final List<Method> methods = MethodFinderUtils.findMethodsWithAnnotation(cls, MethodScope.OBJECT, Title.class);

        Collections.sort(methods, new Comparator<Method>() {
            Comparator<String> comparator = new SequenceComparator();
View Full Code Here


    }

    @Override
    public void process(final ProcessClassContext processClassContext) {
        final Class<?> cls = processClassContext.getCls();
        final FacetHolder facetHolder = processClassContext.getFacetHolder();

        final Method method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, ICON_NAME_PREFIX, String.class, NO_PARAMETERS_TYPES);
        if (method == null) {
            return;
        }
View Full Code Here

    }

    @Override
    public void process(final ProcessClassContext processClassContext) {
        final Class<?> cls = processClassContext.getCls();
        final FacetHolder facetHolder = processClassContext.getFacetHolder();

        final Method method = MethodFinderUtils.findMethod(cls, MethodScope.CLASS, MethodPrefixConstants.SINGULAR_NAME, String.class, NO_PARAMETERS_TYPES);
        if (method != null) {
            final String name = (String) MethodExtensions.invokeStatic(method);
            processClassContext.removeMethod(method);
View Full Code Here

            return;
        }

        processMethodContext.removeMethod(notInServiceMenuMethod);

        final FacetHolder facetedMethod = processMethodContext.getFacetHolder();
        FacetUtil.addFacet(new NotInServiceMenuFacetMethod(notInServiceMenuMethod, facetedMethod));
    }
View Full Code Here

    }

    @Override
    public void process(final ProcessClassContext processClassContext) {
        final FacetHolder facetHolder = processClassContext.getFacetHolder();
        final Class<?> cls = processClassContext.getCls();

        final List<Facet> facets = new ArrayList<Facet>();

        Method method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, IS_DIRTY_PREFIX, boolean.class, NO_PARAMETERS_TYPES);
View Full Code Here

    }

    @Override
    public void process(final ProcessClassContext processClassContext) {
        final Class<?> cls = processClassContext.getCls();
        final FacetHolder facetHolder = processClassContext.getFacetHolder();
        final Class<?>[] params = new Class<?>[1];
        params[0] = Identifier.Type.class;// String.class;

        final Method method = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, DISABLED_PREFIX, String.class, params);
        if (method == null) {
View Full Code Here

    }
   
    private static MultiLineFacet createFromMetadataPropertiesIfPossible(
            final ProcessContextWithMetadataProperties<? extends FacetHolder> pcwmp) {
       
        final FacetHolder holder = pcwmp.getFacetHolder();
       
        final Properties properties = pcwmp.metadataProperties("multiLine");
        return properties != null ? new MultiLineFacetOnPropertyFromProperties(properties, holder) : null;
    }
View Full Code Here

        final Class<?> returnType = getMethod.getReturnType();
        final Class<?>[] paramTypes = new Class[] { returnType };
        final Method setMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.SET_PREFIX + capitalizedName, void.class, paramTypes);
        processMethodContext.removeMethod(setMethod);

        final FacetHolder property = processMethodContext.getFacetHolder();
        if (setMethod != null) {
            FacetUtil.addFacet(new PropertySetterFacetViaSetterMethod(setMethod, property));
            FacetUtil.addFacet(new PropertyInitializationFacetViaSetterMethod(setMethod, property));
        } else {
            FacetUtil.addFacet(new NotPersistableFacetInferred(property));
View Full Code Here

    }

    private Method attachPropertyClearFacetIfClearMethodIsFound(final ProcessMethodContext processMethodContext) {
        final Class<?> cls = processMethodContext.getCls();
        final Method getMethod = processMethodContext.getMethod();
        final FacetHolder property = processMethodContext.getFacetHolder();

        final String capitalizedName = StringExtensions.asJavaBaseName(getMethod.getName());
        final Method clearMethod = MethodFinderUtils.findMethod(cls, MethodScope.OBJECT, MethodPrefixConstants.CLEAR_PREFIX + capitalizedName, void.class, NO_PARAMETERS_TYPES);

        if (clearMethod == null) {
View Full Code Here

            return;
        }
        if (setMethod == null) {
            return;
        }
        final FacetHolder property = processMethodContext.getFacetHolder();
        FacetUtil.addFacet(new PropertyClearFacetViaSetterMethod(setMethod, property));
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facetapi.FacetHolder

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.