
com.adobe.cq.social.commons.emailreply.CommentCreator 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.social.commons.emailreply;
import java.util.List;
import java.util.Map;
import javax.activation.DataSource;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceResolver;
import com.adobe.cq.social.commons.comments.endpoints.CommentOperations;
import com.adobe.cq.social.scf.OperationException;
/**
* {@code CommentCreator} interface provides opportunity to create comments to required social components. Method
* {@code create} used to provide access to {@link CommentOperations} implementation related to required social
* component.
*/
public interface CommentCreator {
/**
* Create a comment with the specified {@link Map} of properties and {@link List} of attachments.
* @param root the root resource of the comment to be created
* @param author the user name
* @param props a list of properties for the new comment
* @param attachments a list of comment attachments
* @param resolver the user resource resolver to be used to create the new comment
* @return the new comment {@link Resource}
* @throws OperationException if there is an error occurs
*/
Resource create(final Resource root, final String author, final Map props,
final List attachments, final ResourceResolver resolver) throws OperationException;
/**
* @return the resource types string array that determines which resources this comment creator can support.
*/
String[] getSupportedResourceTypes();
/**
* This determines the priority of this comment creator with respect to others that support the same resource
* types as this one.
* @return an integer that represents the priority of this comment creator.
*/
int getPriority();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy