public class ModelRegistry extends Object
model sources associated to
mappable types and the corresponding logic to
lookup these relationships.| Constructor and Description |
|---|
ModelRegistry() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(String[] types,
OsgiModelSource<?> source)
Adds the type[] -&t; model relationship to the registry.
|
protected void |
deActivate()
Clears the registry upon shutdown.
|
List<OsgiModelSource<?>> |
getModelSources() |
Collection<ResolvedModelSource<?>> |
lookupMostSpecificModels(org.apache.sling.api.resource.Resource resource,
Class<?> targetType)
Finds the most specific models for the given resource which are
assignable to the target type. |
public Collection<ResolvedModelSource<?>> lookupMostSpecificModels(org.apache.sling.api.resource.Resource resource, Class<?> targetType)
assignable to the target type.resource - must not be null.targetType - must not be null.null if no such model exists.protected void deActivate()
public List<OsgiModelSource<?>> getModelSources()
null but rather an empty list.public void add(String[] types, OsgiModelSource<?> source)
types - must not be null.source - must not be null.Copyright © 2024. All rights reserved.