001    /**
002     * Copyright (c) 2000-2011 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 action 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 ResourceActionLocalServiceUtil
032     * @see com.liferay.portal.service.base.ResourceActionLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.ResourceActionLocalServiceImpl
034     * @generated
035     */
036    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
037            PortalException.class, SystemException.class})
038    public interface ResourceActionLocalService extends PersistedModelLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * Never modify or reference this interface directly. Always use {@link ResourceActionLocalServiceUtil} to access the resource action local service. Add custom service methods to {@link com.liferay.portal.service.impl.ResourceActionLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
043             */
044    
045            /**
046            * Adds the resource action to the database. Also notifies the appropriate model listeners.
047            *
048            * @param resourceAction the resource action
049            * @return the resource action that was added
050            * @throws SystemException if a system exception occurred
051            */
052            public com.liferay.portal.model.ResourceAction addResourceAction(
053                    com.liferay.portal.model.ResourceAction resourceAction)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            /**
057            * Creates a new resource action with the primary key. Does not add the resource action to the database.
058            *
059            * @param resourceActionId the primary key for the new resource action
060            * @return the new resource action
061            */
062            public com.liferay.portal.model.ResourceAction createResourceAction(
063                    long resourceActionId);
064    
065            /**
066            * Deletes the resource action with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param resourceActionId the primary key of the resource action
069            * @throws PortalException if a resource action with the primary key could not be found
070            * @throws SystemException if a system exception occurred
071            */
072            public void deleteResourceAction(long resourceActionId)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException;
075    
076            /**
077            * Deletes the resource action from the database. Also notifies the appropriate model listeners.
078            *
079            * @param resourceAction the resource action
080            * @throws SystemException if a system exception occurred
081            */
082            public void deleteResourceAction(
083                    com.liferay.portal.model.ResourceAction resourceAction)
084                    throws com.liferay.portal.kernel.exception.SystemException;
085    
086            /**
087            * Performs a dynamic query on the database and returns the matching rows.
088            *
089            * @param dynamicQuery the dynamic query
090            * @return the matching rows
091            * @throws SystemException if a system exception occurred
092            */
093            @SuppressWarnings("rawtypes")
094            public java.util.List dynamicQuery(
095                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
096                    throws com.liferay.portal.kernel.exception.SystemException;
097    
098            /**
099            * Performs a dynamic query on the database and returns a range of the matching rows.
100            *
101            * <p>
102            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
103            * </p>
104            *
105            * @param dynamicQuery the dynamic query
106            * @param start the lower bound of the range of model instances
107            * @param end the upper bound of the range of model instances (not inclusive)
108            * @return the range of matching rows
109            * @throws SystemException if a system exception occurred
110            */
111            @SuppressWarnings("rawtypes")
112            public java.util.List dynamicQuery(
113                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
114                    int end) throws com.liferay.portal.kernel.exception.SystemException;
115    
116            /**
117            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
118            *
119            * <p>
120            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
127            * @return the ordered range of matching rows
128            * @throws SystemException if a system exception occurred
129            */
130            @SuppressWarnings("rawtypes")
131            public java.util.List dynamicQuery(
132                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
133                    int end,
134                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
135                    throws com.liferay.portal.kernel.exception.SystemException;
136    
137            /**
138            * Returns the number of rows that match the dynamic query.
139            *
140            * @param dynamicQuery the dynamic query
141            * @return the number of rows that match the dynamic query
142            * @throws SystemException if a system exception occurred
143            */
144            public long dynamicQueryCount(
145                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
146                    throws com.liferay.portal.kernel.exception.SystemException;
147    
148            /**
149            * Returns the resource action with the primary key.
150            *
151            * @param resourceActionId the primary key of the resource action
152            * @return the resource action
153            * @throws PortalException if a resource action with the primary key could not be found
154            * @throws SystemException if a system exception occurred
155            */
156            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
157            public com.liferay.portal.model.ResourceAction getResourceAction(
158                    long resourceActionId)
159                    throws com.liferay.portal.kernel.exception.PortalException,
160                            com.liferay.portal.kernel.exception.SystemException;
161    
162            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
163            public com.liferay.portal.model.PersistedModel getPersistedModel(
164                    java.io.Serializable primaryKeyObj)
165                    throws com.liferay.portal.kernel.exception.PortalException,
166                            com.liferay.portal.kernel.exception.SystemException;
167    
168            /**
169            * Returns a range of all the resource actions.
170            *
171            * <p>
172            * Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setting both <code>start</code> and <code>end</code> to {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full result set.
173            * </p>
174            *
175            * @param start the lower bound of the range of resource actions
176            * @param end the upper bound of the range of resource actions (not inclusive)
177            * @return the range of resource actions
178            * @throws SystemException if a system exception occurred
179            */
180            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181            public java.util.List<com.liferay.portal.model.ResourceAction> getResourceActions(
182                    int start, int end)
183                    throws com.liferay.portal.kernel.exception.SystemException;
184    
185            /**
186            * Returns the number of resource actions.
187            *
188            * @return the number of resource actions
189            * @throws SystemException if a system exception occurred
190            */
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public int getResourceActionsCount()
193                    throws com.liferay.portal.kernel.exception.SystemException;
194    
195            /**
196            * Updates the resource action in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
197            *
198            * @param resourceAction the resource action
199            * @return the resource action that was updated
200            * @throws SystemException if a system exception occurred
201            */
202            public com.liferay.portal.model.ResourceAction updateResourceAction(
203                    com.liferay.portal.model.ResourceAction resourceAction)
204                    throws com.liferay.portal.kernel.exception.SystemException;
205    
206            /**
207            * Updates the resource action in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
208            *
209            * @param resourceAction the resource action
210            * @param merge whether to merge the resource action with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
211            * @return the resource action that was updated
212            * @throws SystemException if a system exception occurred
213            */
214            public com.liferay.portal.model.ResourceAction updateResourceAction(
215                    com.liferay.portal.model.ResourceAction resourceAction, boolean merge)
216                    throws com.liferay.portal.kernel.exception.SystemException;
217    
218            /**
219            * Returns the Spring bean ID for this bean.
220            *
221            * @return the Spring bean ID for this bean
222            */
223            public java.lang.String getBeanIdentifier();
224    
225            /**
226            * Sets the Spring bean ID for this bean.
227            *
228            * @param beanIdentifier the Spring bean ID for this bean
229            */
230            public void setBeanIdentifier(java.lang.String beanIdentifier);
231    
232            public void checkResourceActions()
233                    throws com.liferay.portal.kernel.exception.SystemException;
234    
235            public void checkResourceActions(java.lang.String name,
236                    java.util.List<java.lang.String> actionIds)
237                    throws com.liferay.portal.kernel.exception.SystemException;
238    
239            public void checkResourceActions(java.lang.String name,
240                    java.util.List<java.lang.String> actionIds, boolean addDefaultActions)
241                    throws com.liferay.portal.kernel.exception.SystemException;
242    
243            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244            public com.liferay.portal.model.ResourceAction fetchResourceAction(
245                    java.lang.String name, java.lang.String actionId);
246    
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public com.liferay.portal.model.ResourceAction getResourceAction(
249                    java.lang.String name, java.lang.String actionId)
250                    throws com.liferay.portal.kernel.exception.PortalException;
251    
252            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
253            public java.util.List<com.liferay.portal.model.ResourceAction> getResourceActions(
254                    java.lang.String name)
255                    throws com.liferay.portal.kernel.exception.SystemException;
256    }