001    /**
002     * Copyright (c) 2000-2012 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.service;
016    
017    import com.liferay.portal.kernel.exception.PortalException;
018    import com.liferay.portal.kernel.exception.SystemException;
019    import com.liferay.portal.kernel.transaction.Isolation;
020    import com.liferay.portal.kernel.transaction.Propagation;
021    import com.liferay.portal.kernel.transaction.Transactional;
022    
023    /**
024     * The interface for the resource local service.
025     *
026     * <p>
027     * This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
028     * </p>
029     *
030     * @author Brian Wing Shun Chan
031     * @see ResourceLocalServiceUtil
032     * @see com.liferay.portal.service.base.ResourceLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.ResourceLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface ResourceLocalService extends BaseLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * Never modify or reference this interface directly. Always use {@link ResourceLocalServiceUtil} to access the resource local service. Add custom service methods to {@link com.liferay.portal.service.impl.ResourceLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
043             */
044    
045            /**
046            * Returns the Spring bean ID for this bean.
047            *
048            * @return the Spring bean ID for this bean
049            */
050            public java.lang.String getBeanIdentifier();
051    
052            /**
053            * Sets the Spring bean ID for this bean.
054            *
055            * @param beanIdentifier the Spring bean ID for this bean
056            */
057            public void setBeanIdentifier(java.lang.String beanIdentifier);
058    
059            public void addModelResources(
060                    com.liferay.portal.model.AuditedModel auditedModel,
061                    com.liferay.portal.service.ServiceContext serviceContext)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException;
064    
065            public void addModelResources(long companyId, long groupId, long userId,
066                    java.lang.String name, long primKey,
067                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
068                    throws com.liferay.portal.kernel.exception.PortalException,
069                            com.liferay.portal.kernel.exception.SystemException;
070    
071            public void addModelResources(long companyId, long groupId, long userId,
072                    java.lang.String name, java.lang.String primKey,
073                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
074                    throws com.liferay.portal.kernel.exception.PortalException,
075                            com.liferay.portal.kernel.exception.SystemException;
076    
077            public void addResources(long companyId, long groupId, long userId,
078                    java.lang.String name, long primKey, boolean portletActions,
079                    boolean addGroupPermissions, boolean addGuestPermissions)
080                    throws com.liferay.portal.kernel.exception.PortalException,
081                            com.liferay.portal.kernel.exception.SystemException;
082    
083            public void addResources(long companyId, long groupId, long userId,
084                    java.lang.String name, java.lang.String primKey,
085                    boolean portletActions, boolean addGroupPermissions,
086                    boolean addGuestPermissions)
087                    throws com.liferay.portal.kernel.exception.PortalException,
088                            com.liferay.portal.kernel.exception.SystemException;
089    
090            public void addResources(long companyId, long groupId,
091                    java.lang.String name, boolean portletActions)
092                    throws com.liferay.portal.kernel.exception.PortalException,
093                            com.liferay.portal.kernel.exception.SystemException;
094    
095            public void deleteResource(
096                    com.liferay.portal.model.AuditedModel auditedModel, int scope)
097                    throws com.liferay.portal.kernel.exception.PortalException,
098                            com.liferay.portal.kernel.exception.SystemException;
099    
100            public void deleteResource(long companyId, java.lang.String name,
101                    int scope, long primKey)
102                    throws com.liferay.portal.kernel.exception.PortalException,
103                            com.liferay.portal.kernel.exception.SystemException;
104    
105            public void deleteResource(long companyId, java.lang.String name,
106                    int scope, java.lang.String primKey)
107                    throws com.liferay.portal.kernel.exception.PortalException,
108                            com.liferay.portal.kernel.exception.SystemException;
109    
110            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
111            public com.liferay.portal.model.Resource getResource(long companyId,
112                    java.lang.String name, int scope, java.lang.String primKey);
113    
114            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
115            public boolean hasUserPermissions(long userId, long resourceId,
116                    java.util.List<com.liferay.portal.model.Resource> resources,
117                    java.lang.String actionId, long[] roleIds)
118                    throws com.liferay.portal.kernel.exception.PortalException,
119                            com.liferay.portal.kernel.exception.SystemException;
120    
121            public void updateModelResources(
122                    com.liferay.portal.model.AuditedModel auditedModel,
123                    com.liferay.portal.service.ServiceContext serviceContext)
124                    throws com.liferay.portal.kernel.exception.PortalException,
125                            com.liferay.portal.kernel.exception.SystemException;
126    
127            public void updateResources(long companyId, long groupId,
128                    java.lang.String name, long primKey,
129                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
130                    throws com.liferay.portal.kernel.exception.PortalException,
131                            com.liferay.portal.kernel.exception.SystemException;
132    
133            public void updateResources(long companyId, long groupId,
134                    java.lang.String name, java.lang.String primKey,
135                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
136                    throws com.liferay.portal.kernel.exception.PortalException,
137                            com.liferay.portal.kernel.exception.SystemException;
138    
139            public void updateResources(long companyId, java.lang.String name,
140                    int scope, java.lang.String primKey, java.lang.String newPrimKey)
141                    throws com.liferay.portal.kernel.exception.SystemException;
142    }