io.neba.api.resourcemodels.ResourceModelProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of io.neba.neba-api Show documentation
Show all versions of io.neba.neba-api Show documentation
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.
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);
}