public class ResourceModelMetaDataRegistrar extends Object
ResourceModelMetaData
for each ResourceModel
.
This meta-data may then be used by processors of a resource model,
e.g. the FieldValueMappingCallback
,
to avoid having to reflect on the resource model type.Constructor and Description |
---|
ResourceModelMetaDataRegistrar() |
Modifier and Type | Method and Description |
---|---|
protected void |
deactivate() |
Collection<ResourceModelMetaData> |
get() |
ResourceModelMetaData |
get(Class<?> modelType) |
void |
register(OsgiModelSource<?> modelSource)
Creates a new
ResourceModelMetaData for the model represented
by the provided model source. |
void |
removeMetadataForModelsIn(org.osgi.framework.Bundle bundle)
Removes the metadata of all models contained in the provided bundle from the registrar.
|
public Collection<ResourceModelMetaData> get()
ResourceModelMetaData
of all currently known resource models.public ResourceModelMetaData get(Class<?> modelType)
modelType
- must not be null
.ResourceModelMetaData
of the specified model. Never null
- throws an IllegalStateException
if the model type is not known as a resource model must always be registered.public void register(OsgiModelSource<?> modelSource)
ResourceModelMetaData
for the model represented
by the provided model source.modelSource
- must not be null
.public void removeMetadataForModelsIn(org.osgi.framework.Bundle bundle)
bundle
- must not be null
protected void deactivate()
Copyright © 2024. All rights reserved.