com.adobe.cq.social.srp.internal.SocialDatabase Maven / Gradle / Ivy
/*************************************************************************
*
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2012 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.social.srp.internal;
import java.io.IOException;
import java.io.InputStream;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import org.apache.sling.api.resource.PersistenceException;
import aQute.bnd.annotation.ProviderType;
import com.adobe.cq.social.srp.APIResult;
/**
* An interface to provide various api to communicate with underlying UGC database/store
*/
@ProviderType
public interface SocialDatabase {
/**
* @param key Key
* @param unpackMap Map
* @return an ugc data from underlying database matching the unique key
* @throws IOException IOException
*/
public Map readDocument(final String key, final boolean unpackMap) throws IOException;
/**
* @param keyName String
* @param keyValue String
* @param baseType String
* @param maxResults int
* @param page int
* @param orderBy List
* @param visibleOnly boolean
* @return a list of ugc data from underlying database matching the input criteria
* @throws IOException IOException
*/
public List