public interface ResourceModelFactory
Modifier and Type | Interface and Description |
---|---|
static interface |
ResourceModelFactory.ContentToModelMappingCallback<T>
A callback to be invoked when the model is ready for content-to-model mapping.
|
static interface |
ResourceModelFactory.ModelDefinition<T> |
Modifier and Type | Method and Description |
---|---|
Collection<ResourceModelFactory.ModelDefinition<?>> |
getModelDefinitions() |
<T> T |
provideModel(ResourceModelFactory.ModelDefinition<T> modelDefinition,
ResourceModelFactory.ContentToModelMappingCallback<T> callback) |
@Nonnull Collection<ResourceModelFactory.ModelDefinition<?>> getModelDefinitions()
model definitions
suitable for #provideModel(ModelDefinition, ContentToModelMappingCallback)
(ModelDefinition, ContentToModelMappingCallback) model} resolution.
Never null
but rather an empty collection.<T> T provideModel(@Nonnull ResourceModelFactory.ModelDefinition<T> modelDefinition, @Nonnull ResourceModelFactory.ContentToModelMappingCallback<T> callback)
modelDefinition
- must not be null
.callback
- the callback to invoke when the model is ready for content-to-object mapping. After the invocation, the resource
originally adapted
to the model has been mapped to the model.
This allows the factory to stay in control the model life cycle, for instance to invoke PostConstruct
methods
after completion of content-to-model mapping.Copyright © 2024. All rights reserved.