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

com.adobe.cq.export.json.ContainerExporter Maven / Gradle / Ivy

There is a newer version: 6.5.21
Show newest version
/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2017 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 **************************************************************************/
package com.adobe.cq.export.json;

import java.util.Map;

import javax.annotation.Nonnull;

import org.osgi.annotation.versioning.ConsumerType;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Defines the JSON export of a container component.
 *
 * 

* This interface is aimed at being implemented by Sling Model classes corresponding to container components (page, responsive grid, parsys, etc.). *

*

* NOTE: Getter methods' names are all prefixed to avoid name conflicts with methods from the implementation class. *

*/ @ConsumerType public interface ContainerExporter extends ComponentExporter { /** *

* Returns the map of all exported child items (resource names from Sling Model classes). *

*

* NOTE: Methods whose JSON serialization would lead to the same JSON property name (":items") will * not be serialized. *

* * @return the map of all exported child items * @see #getExportedType() */ @Nonnull @JsonProperty(ExporterConstants.PN_ITEMS) Map getExportedItems(); /** *

* Returns the order of items in the map. *

*

* NOTE: This information is required because the JSON specification and most implementations don't provide a * stable order of items in JSON objects. Methods whose JSON serialization would lead to the same JSON property name (":order") * will not be serialized. *

* * @return the order of the items in the map; the array can be empty if the item order is not provided by the underlying persistence * layer */ @Nonnull @JsonProperty(ExporterConstants.PN_ITEMS_ORDER) String[] getExportedItemsOrder(); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy