All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.neba.api.resourcemodels.ResourceModelProvider Maven / Gradle / Ivy

Go to download

Contains all annotations, tag libraries and lifecycle callback interfaces of NEBA. All packages of this API bundle are exported. Change to the API that are not byte code compatible only occur in major revisions.

There is a newer version: 5.2.3
Show newest version
package io.neba.api.resourcemodels;

import org.apache.sling.api.resource.Resource;

/**
 * @author Olaf Otto
 */
public interface ResourceModelProvider {
    /**
     * @param resource must not be null
     * @param beanName must not be null
     * @return the most specific model bean instance compatible with the
     *         given resource's resource type, or null. The
     *         model stems from a bean who's name matches the given bean name.
     */
    Object resolveMostSpecificModelWithBeanName(Resource resource, String beanName);

    /**
     * @param resource must not be null.
     * @return the most specific model for the given resource, or null if
     *         there is no unique most specific model. Models for base types such as nt:usntructured
     *         or nt:base are not considered.
     */
    Object resolveMostSpecificModel(Resource resource);

    /**
     * @param resource must not be null.
     * @return the most specific model for the given resource, or null if
     *         there is no unique most specific model. Models for base types such as nt:unstructured
     *         or nt:base are considered.
     */
    Object resolveMostSpecificModelIncludingModelsForBaseTypes(Resource resource);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy