001
014
015 package com.liferay.portal.kernel.comment;
016
017 import com.liferay.portal.kernel.exception.PortalException;
018 import com.liferay.portal.kernel.util.Function;
019 import com.liferay.portal.security.permission.PermissionChecker;
020 import com.liferay.portal.service.ServiceContext;
021
022
025 public interface CommentManager {
026
027 public void addComment(
028 long userId, long groupId, String className, long classPK,
029 String body,
030 Function<String, ServiceContext> serviceContextFunction)
031 throws PortalException;
032
033 public long addComment(
034 long userId, long groupId, String className, long classPK,
035 String userName, String subject, String body,
036 Function<String, ServiceContext> serviceContextFunction)
037 throws PortalException;
038
039 public long addComment(
040 long userId, String className, long classPK, String userName,
041 long parentCommentId, String subject, String body,
042 Function<String, ServiceContext> serviceContextFunction)
043 throws PortalException;
044
045 public void addDiscussion(
046 long userId, long groupId, String className, long classPK,
047 String userName)
048 throws PortalException;
049
050 public void deleteComment(long commentId) throws PortalException;
051
052 public void deleteDiscussion(String className, long classPK)
053 throws PortalException;
054
055 public int getCommentsCount(String className, long classPK);
056
057 public Discussion getDiscussion(
058 long userId, long groupId, String className, long classPK,
059 Function<String, ServiceContext> serviceContextFunction)
060 throws PortalException;
061
062 public DiscussionPermission getDiscussionPermission(
063 PermissionChecker permissionChecker);
064
065 public boolean hasDiscussion(String className, long classPK)
066 throws PortalException;
067
068 public void subscribeDiscussion(
069 long userId, long groupId, String className, long classPK)
070 throws PortalException;
071
072 public void unsubscribeDiscussion(
073 long userId, String className, long classPK)
074 throws PortalException;
075
076 public long updateComment(
077 long userId, String className, long classPK, long commentId,
078 String subject, String body,
079 Function<String, ServiceContext> serviceContextFunction)
080 throws PortalException;
081
082 }