com.adobe.cq.social.commons.emailreply.CommentCreatorManager 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 org.apache.sling.api.resource.Resource;
/**
* A manager that determines which {@link CommentCreator} implementation should be used for a given Resource or
* resource type. This manager considers the priorities and resource types supported by the {@code CommentCreator}
* implementation. It also respects resource type inheritance, i.e, it will always return the most specific
* {@code CommentCreator} implementation, given a resource or resource type as per the resource type hierarchy.
*/
public interface CommentCreatorManager {
/**
* @param resource the resource for which an {@code CommentCreator} is requested for.
* @return an {@code CommentCreator} that can handle the given resource.
*/
CommentCreator getCommentCreator(final Resource resource);
/**
* @param resourceType the resource type for which an {@code CommentCreator} is requested for.
* @return an {@code CommentCreator} that can handle the given resource resource type.
*/
CommentCreator getCommentCreator(final String resourceType);
}