com.adobe.cq.socialmedia.SocialApplication Maven / Gradle / Ivy
/*******************************************************************************
* ADOBE CONFIDENTIAL
* __________________
*
* Copyright 2016 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.socialmedia;
import aQute.bnd.annotation.ProviderType;
import javax.annotation.Nonnull;
/**
* Defines a Social Media application.
*/
@ProviderType
public interface SocialApplication {
/**
* Sets up the SM application.
*
* @param appId Application ID
* @param appToken Application Secret
* @param hostname Web application hostname (ex.: https://localhost:4502)
* @param socialAction Action executed after OAuth
* @return OAuth URL
* @throws SocialException Thrown if the login URL cannot be built.
*/
String setUpApp(String appId, String appToken, String hostname, SocialAction socialAction) throws SocialException;
/**
* Returns the application name
* @return Social application name (ex.: facebook)
*/
String getName();
/**
* Returns the link to the SM network for an individual post.
*
* @param params containing:
* spaceId - Page/Board where the post exists
* postId - the ID of the post
* @return Link to the SM network
* @throws SocialException Thrown if the social media URL cannot be built.
*/
String getPostLink(SocialPostLinkParams params) throws SocialException;
/**
* Returns a publisher with no token associated. It can be used if a token is already owned,
* by setting the token and calling publisher methods after.
* @return A social publisher which can be used if the API user already owns a token.
*/
@Nonnull SocialPublisher getPublisher();
}