Package org.apache.isis.core.metamodel.exceptions

Examples of org.apache.isis.core.metamodel.exceptions.MetaModelException


    }

    private static void ensureDecoratorMetContract(final FacetDecorator facetDecorator, final Facet decoratingFacet,
        final Class<? extends Facet> facetType, final FacetHolder originalFacetHolder) {
        if (decoratingFacet.facetType() != facetType) {
            throw new MetaModelException(
                MessageFormat
                    .format(
                        "Problem with facet decorator '{0}'; inconsistent decorating facetType() for {1}; was {2} but expectected facetType() of {3}",
                        facetDecorator.getClass().getName(), decoratingFacet.getClass().getName(), decoratingFacet
                            .facetType().getName(), facetType.getName()));
        }
        final Facet facetForFacetType = originalFacetHolder.getFacet(decoratingFacet.facetType());
        if (facetForFacetType != decoratingFacet) {
            throw new MetaModelException(MessageFormat.format(
                "Problem with facet decorator '{0}'; has not replaced original facet for facetType() of {1}",
                facetDecorator.getClass().getName(), facetType.getName()));
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.exceptions.MetaModelException

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.