001    /**
002     * Copyright (c) 2000-2010 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.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * <p>
025     * This interface defines the service. The default implementation is
026     * {@link
027     * com.liferay.portal.service.impl.ResourceLocalServiceImpl}.
028     * Modify methods in that class and rerun ServiceBuilder to populate this class
029     * and all other generated classes.
030     * </p>
031     *
032     * <p>
033     * 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.
034     * </p>
035     *
036     * @author    Brian Wing Shun Chan
037     * @see       ResourceLocalServiceUtil
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface ResourceLocalService {
043            public com.liferay.portal.model.Resource addResource(
044                    com.liferay.portal.model.Resource resource)
045                    throws com.liferay.portal.kernel.exception.SystemException;
046    
047            public com.liferay.portal.model.Resource createResource(long resourceId);
048    
049            public void deleteResource(long resourceId)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException;
052    
053            public void deleteResource(com.liferay.portal.model.Resource resource)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            @SuppressWarnings("unchecked")
057            public java.util.List dynamicQuery(
058                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
059                    throws com.liferay.portal.kernel.exception.SystemException;
060    
061            @SuppressWarnings("unchecked")
062            public java.util.List dynamicQuery(
063                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
064                    int end) throws com.liferay.portal.kernel.exception.SystemException;
065    
066            @SuppressWarnings("unchecked")
067            public java.util.List dynamicQuery(
068                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
069                    int end,
070                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
071                    throws com.liferay.portal.kernel.exception.SystemException;
072    
073            public long dynamicQueryCount(
074                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
075                    throws com.liferay.portal.kernel.exception.SystemException;
076    
077            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
078            public com.liferay.portal.model.Resource getResource(long resourceId)
079                    throws com.liferay.portal.kernel.exception.PortalException,
080                            com.liferay.portal.kernel.exception.SystemException;
081    
082            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
083            public java.util.List<com.liferay.portal.model.Resource> getResources(
084                    int start, int end)
085                    throws com.liferay.portal.kernel.exception.SystemException;
086    
087            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
088            public int getResourcesCount()
089                    throws com.liferay.portal.kernel.exception.SystemException;
090    
091            public com.liferay.portal.model.Resource updateResource(
092                    com.liferay.portal.model.Resource resource)
093                    throws com.liferay.portal.kernel.exception.SystemException;
094    
095            public com.liferay.portal.model.Resource updateResource(
096                    com.liferay.portal.model.Resource resource, boolean merge)
097                    throws com.liferay.portal.kernel.exception.SystemException;
098    
099            public void addModelResources(long companyId, long groupId, long userId,
100                    java.lang.String name, long primKey,
101                    java.lang.String[] communityPermissions,
102                    java.lang.String[] guestPermissions)
103                    throws com.liferay.portal.kernel.exception.PortalException,
104                            com.liferay.portal.kernel.exception.SystemException;
105    
106            public void addModelResources(long companyId, long groupId, long userId,
107                    java.lang.String name, java.lang.String primKey,
108                    java.lang.String[] communityPermissions,
109                    java.lang.String[] guestPermissions)
110                    throws com.liferay.portal.kernel.exception.PortalException,
111                            com.liferay.portal.kernel.exception.SystemException;
112    
113            public com.liferay.portal.model.Resource addResource(long companyId,
114                    java.lang.String name, int scope, java.lang.String primKey)
115                    throws com.liferay.portal.kernel.exception.SystemException;
116    
117            public void addResources(long companyId, long groupId,
118                    java.lang.String name, boolean portletActions)
119                    throws com.liferay.portal.kernel.exception.PortalException,
120                            com.liferay.portal.kernel.exception.SystemException;
121    
122            public void addResources(long companyId, long groupId, long userId,
123                    java.lang.String name, long primKey, boolean portletActions,
124                    boolean addCommunityPermissions, boolean addGuestPermissions)
125                    throws com.liferay.portal.kernel.exception.PortalException,
126                            com.liferay.portal.kernel.exception.SystemException;
127    
128            public void addResources(long companyId, long groupId, long userId,
129                    java.lang.String name, java.lang.String primKey,
130                    boolean portletActions, boolean addCommunityPermissions,
131                    boolean addGuestPermissions)
132                    throws com.liferay.portal.kernel.exception.PortalException,
133                            com.liferay.portal.kernel.exception.SystemException;
134    
135            public void deleteResource(long companyId, java.lang.String name,
136                    int scope, long primKey)
137                    throws com.liferay.portal.kernel.exception.PortalException,
138                            com.liferay.portal.kernel.exception.SystemException;
139    
140            public void deleteResource(long companyId, java.lang.String name,
141                    int scope, java.lang.String primKey)
142                    throws com.liferay.portal.kernel.exception.PortalException,
143                            com.liferay.portal.kernel.exception.SystemException;
144    
145            public void deleteResources(java.lang.String name)
146                    throws com.liferay.portal.kernel.exception.SystemException;
147    
148            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149            public long getLatestResourceId()
150                    throws com.liferay.portal.kernel.exception.SystemException;
151    
152            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153            public com.liferay.portal.model.Resource getResource(long companyId,
154                    java.lang.String name, int scope, java.lang.String primKey)
155                    throws com.liferay.portal.kernel.exception.PortalException,
156                            com.liferay.portal.kernel.exception.SystemException;
157    
158            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
159            public java.util.List<com.liferay.portal.model.Resource> getResources()
160                    throws com.liferay.portal.kernel.exception.SystemException;
161    
162            public void updateResources(long companyId, java.lang.String name,
163                    int scope, java.lang.String primKey, java.lang.String newPrimKey)
164                    throws com.liferay.portal.kernel.exception.PortalException,
165                            com.liferay.portal.kernel.exception.SystemException;
166    
167            public void updateResources(long companyId, long groupId,
168                    java.lang.String name, long primKey,
169                    java.lang.String[] communityPermissions,
170                    java.lang.String[] guestPermissions)
171                    throws com.liferay.portal.kernel.exception.PortalException,
172                            com.liferay.portal.kernel.exception.SystemException;
173    
174            public void updateResources(long companyId, long groupId,
175                    java.lang.String name, java.lang.String primKey,
176                    java.lang.String[] communityPermissions,
177                    java.lang.String[] guestPermissions)
178                    throws com.liferay.portal.kernel.exception.PortalException,
179                            com.liferay.portal.kernel.exception.SystemException;
180    }