001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.kernel.comment;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    
019    /**
020     * @author Adolfo P??rez
021     * @author Sergio Gonz??lez
022     */
023    public interface DiscussionPermission {
024    
025            public void checkAddPermission(
026                            long companyId, long groupId, String className, long classPK)
027                    throws PortalException;
028    
029            public void checkDeletePermission(long commentId) throws PortalException;
030    
031            public void checkSubscribePermission(
032                            long companyId, long groupId, String className, long classPK)
033                    throws PortalException;
034    
035            public void checkUpdatePermission(long commentId) throws PortalException;
036    
037            public void checkViewPermission(
038                            long companyId, long groupId, String className, long classPK)
039                    throws PortalException;
040    
041            public boolean hasAddPermission(
042                            long companyId, long groupId, String className, long classPK)
043                    throws PortalException;
044    
045            public boolean hasDeletePermission(long commentId) throws PortalException;
046    
047            public boolean hasPermission(long commentId, String actionId)
048                    throws PortalException;
049    
050            public boolean hasSubscribePermission(
051                            long companyId, long groupId, String className, long classPK)
052                    throws PortalException;
053    
054            public boolean hasUpdatePermission(long commentId) throws PortalException;
055    
056            public boolean hasViewPermission(
057                            long companyId, long groupId, String className, long classPK)
058                    throws PortalException;
059    
060    }