
com.sdl.dxa.api.datamodel.model.util.ModelDataWrapper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dxa-data-model Show documentation
Show all versions of dxa-data-model Show documentation
DXA Data Model artifact provides API for de-/serializing CM JSON content into a DXA model
package com.sdl.dxa.api.datamodel.model.util;
import com.sdl.dxa.api.datamodel.model.ContentModelData;
/**
* Wrapper that build an abstraction on top of what can be considered as {@code content} or {@code metadata} for the current model.
* While it is basically straight-forward logic, different types of model data may have different data objects to be used as {@code content} or {@code metadata}.
*/
public interface ModelDataWrapper {
/**
* Returns what can be considered as {@code content} for the current model.
*/
default ContentModelData getContent() {
return new ContentModelData(0);
}
/**
* Returns what can be considered as {@code metadata} for the current model.
*/
ContentModelData getMetadata();
/**
* Returns the wrapped model itself.
*/
Object getWrappedModel();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy