All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sdl.dxa.api.datamodel.model.util.ModelDataWrapper Maven / Gradle / Ivy

Go to download

DXA Data Model artifact provides API for de-/serializing CM JSON content into a DXA model

There is a newer version: 2.3.7
Show newest version
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