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

Examples of org.apache.isis.core.metamodel.facets.object.defaults.DefaultedFacetAbstract


    private DefaultedFacetAbstract create(final Class<?> cls, final FacetHolder holder) {
        final Defaulted annotation = Annotations.getAnnotation(cls, Defaulted.class);

        // create from annotation, if present
        if (annotation != null) {
            final DefaultedFacetAbstract facet = new DefaultedFacetAnnotation(cls, getIsisConfiguration(), holder, getServicesInjector());
            if (facet.isValid()) {
                return facet;
            }
        }

        // otherwise, try to create from configuration, if present
        final String providerName = DefaultsProviderUtil.defaultsProviderNameFromConfiguration(cls, getIsisConfiguration());
        if (!Strings.isNullOrEmpty(providerName)) {
            final DefaultedFacetFromConfiguration facet = new DefaultedFacetFromConfiguration(providerName, holder, getServicesInjector());
            if (facet.isValid()) {
                return facet;
            }
        }

        return null;
View Full Code Here

TOP

Related Classes of org.apache.isis.core.metamodel.facets.object.defaults.DefaultedFacetAbstract

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.