Examples of IdentifiedHolder


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

    @Override
    public Facet decorate(final Facet facet, final FacetHolder requiredHolder) {
        if (!(requiredHolder instanceof IdentifiedHolder)) {
            return null;
        }
        final IdentifiedHolder identifiedHolder = (IdentifiedHolder) requiredHolder;

        final Class<? extends Facet> facetType = facet.facetType();

        if (facetType == PropertySetterFacet.class) {
            final PropertySetterFacet propertySetterFacet = (PropertySetterFacet) facet;
            final PropertySetterFacetWrapProxy decoratingFacet =
                new PropertySetterFacetWrapProxy(propertySetterFacet, serverFacade, encoderDecoder, identifiedHolder
                    .getIdentifier().getMemberName());
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }

        if (facetType == PropertyClearFacet.class) {
            final PropertyClearFacet propertyClearFacet = (PropertyClearFacet) facet;
            final PropertyClearFacetWrapProxy decoratingFacet =
                new PropertyClearFacetWrapProxy(propertyClearFacet, serverFacade, encoderDecoder, identifiedHolder
                    .getIdentifier().getMemberName());
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }

        if (facetType == CollectionAddToFacet.class) {
            final CollectionAddToFacet collectionAddToFacet = (CollectionAddToFacet) facet;
            final CollectionAddToFacetWrapProxy decoratingFacet =
                new CollectionAddToFacetWrapProxy(collectionAddToFacet, serverFacade, encoderDecoder, identifiedHolder
                    .getIdentifier().getMemberName());
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }

        if (facetType == CollectionRemoveFromFacet.class) {
            final CollectionRemoveFromFacet collectionRemoveFromFacet = (CollectionRemoveFromFacet) facet;
            final CollectionRemoveFromFacetWrapProxy decoratingFacet =
                new CollectionRemoveFromFacetWrapProxy(collectionRemoveFromFacet, serverFacade, encoderDecoder,
                    identifiedHolder.getIdentifier().getMemberName());
            requiredHolder.addFacet(decoratingFacet);
            return decoratingFacet;
        }

        if (facetType == ActionInvocationFacet.class) {
View Full Code Here

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

    public Facet decorate(final Facet facet, final FacetHolder facetHolder) {
        if (!(facetHolder instanceof IdentifiedHolder)) {
            return null;
        }

        final IdentifiedHolder identifiedHolder = (IdentifiedHolder) facetHolder;

        final Class<?> facetType = facet.facetType();
        if (facetType == NamedFacet.class) {
            return decorateWithNamedFacet(facet, identifiedHolder);
        }
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.