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

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


        }
    }

    private boolean addFacetIfMethodFound(final ProcessClassContext processClassContext, final Class<?> returnType) {
        final Class<?> cls = processClassContext.getCls();
        final FacetHolder facetHolder = processClassContext.getFacetHolder();

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


        }

    }

    private void processCollectionType(final ProcessClassContext processClassContext) {
        final FacetHolder facetHolder = processClassContext.getFacetHolder();
        final TypeOfFacet typeOfFacet = facetHolder.getFacet(TypeOfFacet.class);
        if (typeOfFacet == null) {
            final Class<?> collectionElementType = collectionElementType(processClassContext.getCls());
            facetHolder.addFacet(collectionElementType != Object.class ? new TypeOfFacetInferredFromGenerics(collectionElementType, facetHolder, getSpecificationLoader()) : new TypeOfFacetDefaultToObject(facetHolder, getSpecificationLoader()));
        } else {
            // nothing
        }
        facetHolder.addFacet(new JavaCollectionFacet(facetHolder, getAdapterManager()));
        return;
    }
View Full Code Here

        facetHolder.addFacet(new JavaCollectionFacet(facetHolder, getAdapterManager()));
        return;
    }

    private void processAsArrayType(final ProcessClassContext processClassContaxt) {
        final FacetHolder facetHolder = processClassContaxt.getFacetHolder();
        facetHolder.addFacet(new JavaArrayFacet(facetHolder, getAdapterManager()));
        facetHolder.addFacet(new TypeOfFacetInferredFromArray(processClassContaxt.getCls().getComponentType(), facetHolder, getSpecificationLoader()));
    }
View Full Code Here

        if (modifyMethod == null) {
            return;
        }
        processMethodContext.removeMethod(modifyMethod);

        final FacetHolder property = processMethodContext.getFacetHolder();
        FacetUtil.addFacet(new PropertySetterFacetViaModifyMethod(modifyMethod, property));
    }
View Full Code Here

    public void process(final ProcessClassContext processClassContext) {
        FacetUtil.addFacet(create(processClassContext));
    }

    private MemberGroupLayoutFacet create(final ProcessClassContext processClassContext) {
        final FacetHolder holder = processClassContext.getFacetHolder();
       
        final Class<?> cls = processClassContext.getCls();

        final Properties properties = processClassContext.metadataProperties("memberGroupLayout");
        if(properties != null) {
View Full Code Here

        return false;
    }

    @Override
    public void process(final ProcessClassContext processClassContaxt) {
        final FacetHolder facetHolder = processClassContaxt.getFacetHolder();

        final DescribedAsFacetNone describedAsFacet = new DescribedAsFacetNone(facetHolder);
        final NotPersistableFacetNull notPersistableFacet = new NotPersistableFacetNull(facetHolder);
        final TitleFacetNone titleFacet = new TitleFacetNone(facetHolder);
        final PagedFacetDefault pagedFacet = new PagedFacetDefault(facetHolder, getConfiguration().getInteger("isis.viewers.paged.standalone", PAGE_SIZE_STANDALONE_DEFAULT));
View Full Code Here

    }

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

    }

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

    }

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

    }

    private static MemberOrderFacet createFromMetadataPropertiesIfPossible(
            final ProcessContextWithMetadataProperties<? extends FacetHolder> pcwmp) {
       
        final FacetHolder holder = pcwmp.getFacetHolder();
       
        final MemberOrderFacet memberOrderFacet;
        final Properties properties = pcwmp.metadataProperties("memberOrder");
        if(properties != null) {
            memberOrderFacet = new MemberOrderFacetProperties(properties, holder);
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.