001    /**
002     * Copyright (c) 2000-2013 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     * Provides the local service interface for PortletPreferences. Methods of this
025     * service will not have security checks based on the propagated JAAS
026     * credentials because this service can only be accessed from within the same
027     * VM.
028     *
029     * @author Brian Wing Shun Chan
030     * @see PortletPreferencesLocalServiceUtil
031     * @see com.liferay.portal.service.base.PortletPreferencesLocalServiceBaseImpl
032     * @see com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl
033     * @generated
034     */
035    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
036            PortalException.class, SystemException.class})
037    public interface PortletPreferencesLocalService extends BaseLocalService,
038            PersistedModelLocalService {
039            /*
040             * NOTE FOR DEVELOPERS:
041             *
042             * Never modify or reference this interface directly. Always use {@link PortletPreferencesLocalServiceUtil} to access the portlet preferences local service. Add custom service methods to {@link com.liferay.portal.service.impl.PortletPreferencesLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
043             */
044    
045            /**
046            * Adds the portlet preferences to the database. Also notifies the appropriate model listeners.
047            *
048            * @param portletPreferences the portlet preferences
049            * @return the portlet preferences that was added
050            * @throws SystemException if a system exception occurred
051            */
052            public com.liferay.portal.model.PortletPreferences addPortletPreferences(
053                    com.liferay.portal.model.PortletPreferences portletPreferences)
054                    throws com.liferay.portal.kernel.exception.SystemException;
055    
056            /**
057            * Creates a new portlet preferences with the primary key. Does not add the portlet preferences to the database.
058            *
059            * @param portletPreferencesId the primary key for the new portlet preferences
060            * @return the new portlet preferences
061            */
062            public com.liferay.portal.model.PortletPreferences createPortletPreferences(
063                    long portletPreferencesId);
064    
065            /**
066            * Deletes the portlet preferences with the primary key from the database. Also notifies the appropriate model listeners.
067            *
068            * @param portletPreferencesId the primary key of the portlet preferences
069            * @return the portlet preferences that was removed
070            * @throws PortalException if a portlet preferences with the primary key could not be found
071            * @throws SystemException if a system exception occurred
072            */
073            public com.liferay.portal.model.PortletPreferences deletePortletPreferences(
074                    long portletPreferencesId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException;
077    
078            /**
079            * Deletes the portlet preferences from the database. Also notifies the appropriate model listeners.
080            *
081            * @param portletPreferences the portlet preferences
082            * @return the portlet preferences that was removed
083            * @throws SystemException if a system exception occurred
084            */
085            public com.liferay.portal.model.PortletPreferences deletePortletPreferences(
086                    com.liferay.portal.model.PortletPreferences portletPreferences)
087                    throws com.liferay.portal.kernel.exception.SystemException;
088    
089            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
090    
091            /**
092            * Performs a dynamic query on the database and returns the matching rows.
093            *
094            * @param dynamicQuery the dynamic query
095            * @return the matching rows
096            * @throws SystemException if a system exception occurred
097            */
098            @SuppressWarnings("rawtypes")
099            public java.util.List dynamicQuery(
100                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
101                    throws com.liferay.portal.kernel.exception.SystemException;
102    
103            /**
104            * Performs a dynamic query on the database and returns a range of the matching rows.
105            *
106            * <p>
107            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
108            * </p>
109            *
110            * @param dynamicQuery the dynamic query
111            * @param start the lower bound of the range of model instances
112            * @param end the upper bound of the range of model instances (not inclusive)
113            * @return the range of matching rows
114            * @throws SystemException if a system exception occurred
115            */
116            @SuppressWarnings("rawtypes")
117            public java.util.List dynamicQuery(
118                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
119                    int end) throws com.liferay.portal.kernel.exception.SystemException;
120    
121            /**
122            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
123            *
124            * <p>
125            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
126            * </p>
127            *
128            * @param dynamicQuery the dynamic query
129            * @param start the lower bound of the range of model instances
130            * @param end the upper bound of the range of model instances (not inclusive)
131            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
132            * @return the ordered range of matching rows
133            * @throws SystemException if a system exception occurred
134            */
135            @SuppressWarnings("rawtypes")
136            public java.util.List dynamicQuery(
137                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
138                    int end,
139                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
140                    throws com.liferay.portal.kernel.exception.SystemException;
141    
142            /**
143            * Returns the number of rows that match the dynamic query.
144            *
145            * @param dynamicQuery the dynamic query
146            * @return the number of rows that match the dynamic query
147            * @throws SystemException if a system exception occurred
148            */
149            public long dynamicQueryCount(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
151                    throws com.liferay.portal.kernel.exception.SystemException;
152    
153            /**
154            * Returns the number of rows that match the dynamic query.
155            *
156            * @param dynamicQuery the dynamic query
157            * @param projection the projection to apply to the query
158            * @return the number of rows that match the dynamic query
159            * @throws SystemException if a system exception occurred
160            */
161            public long dynamicQueryCount(
162                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
163                    com.liferay.portal.kernel.dao.orm.Projection projection)
164                    throws com.liferay.portal.kernel.exception.SystemException;
165    
166            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
167            public com.liferay.portal.model.PortletPreferences fetchPortletPreferences(
168                    long portletPreferencesId)
169                    throws com.liferay.portal.kernel.exception.SystemException;
170    
171            /**
172            * Returns the portlet preferences with the primary key.
173            *
174            * @param portletPreferencesId the primary key of the portlet preferences
175            * @return the portlet preferences
176            * @throws PortalException if a portlet preferences with the primary key could not be found
177            * @throws SystemException if a system exception occurred
178            */
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public com.liferay.portal.model.PortletPreferences getPortletPreferences(
181                    long portletPreferencesId)
182                    throws com.liferay.portal.kernel.exception.PortalException,
183                            com.liferay.portal.kernel.exception.SystemException;
184    
185            @Override
186            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
187            public com.liferay.portal.model.PersistedModel getPersistedModel(
188                    java.io.Serializable primaryKeyObj)
189                    throws com.liferay.portal.kernel.exception.PortalException,
190                            com.liferay.portal.kernel.exception.SystemException;
191    
192            /**
193            * Returns a range of all the portlet preferenceses.
194            *
195            * <p>
196            * 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. If <code>orderByComparator</code> is specified, then the query will include the given ORDER BY logic. If <code>orderByComparator</code> is absent and pagination is required (<code>start</code> and <code>end</code> are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.portal.model.impl.PortletPreferencesModelImpl}. If both <code>orderByComparator</code> and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
197            * </p>
198            *
199            * @param start the lower bound of the range of portlet preferenceses
200            * @param end the upper bound of the range of portlet preferenceses (not inclusive)
201            * @return the range of portlet preferenceses
202            * @throws SystemException if a system exception occurred
203            */
204            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
205            public java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferenceses(
206                    int start, int end)
207                    throws com.liferay.portal.kernel.exception.SystemException;
208    
209            /**
210            * Returns the number of portlet preferenceses.
211            *
212            * @return the number of portlet preferenceses
213            * @throws SystemException if a system exception occurred
214            */
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public int getPortletPreferencesesCount()
217                    throws com.liferay.portal.kernel.exception.SystemException;
218    
219            /**
220            * Updates the portlet preferences in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
221            *
222            * @param portletPreferences the portlet preferences
223            * @return the portlet preferences that was updated
224            * @throws SystemException if a system exception occurred
225            */
226            public com.liferay.portal.model.PortletPreferences updatePortletPreferences(
227                    com.liferay.portal.model.PortletPreferences portletPreferences)
228                    throws com.liferay.portal.kernel.exception.SystemException;
229    
230            /**
231            * Returns the Spring bean ID for this bean.
232            *
233            * @return the Spring bean ID for this bean
234            */
235            public java.lang.String getBeanIdentifier();
236    
237            /**
238            * Sets the Spring bean ID for this bean.
239            *
240            * @param beanIdentifier the Spring bean ID for this bean
241            */
242            public void setBeanIdentifier(java.lang.String beanIdentifier);
243    
244            public com.liferay.portal.model.PortletPreferences addPortletPreferences(
245                    long companyId, long ownerId, int ownerType, long plid,
246                    java.lang.String portletId, com.liferay.portal.model.Portlet portlet,
247                    java.lang.String defaultPreferences)
248                    throws com.liferay.portal.kernel.exception.SystemException;
249    
250            public void deletePortletPreferences(long ownerId, int ownerType, long plid)
251                    throws com.liferay.portal.kernel.exception.SystemException;
252    
253            public void deletePortletPreferences(long ownerId, int ownerType,
254                    long plid, java.lang.String portletId)
255                    throws com.liferay.portal.kernel.exception.PortalException,
256                            com.liferay.portal.kernel.exception.SystemException;
257    
258            public void deletePortletPreferencesByPlid(long plid)
259                    throws com.liferay.portal.kernel.exception.SystemException;
260    
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public javax.portlet.PortletPreferences getDefaultPreferences(
263                    long companyId, java.lang.String portletId)
264                    throws com.liferay.portal.kernel.exception.SystemException;
265    
266            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
267            public java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences()
268                    throws com.liferay.portal.kernel.exception.SystemException;
269    
270            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
271            public java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
272                    int ownerType, long plid, java.lang.String portletId)
273                    throws com.liferay.portal.kernel.exception.SystemException;
274    
275            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
276            public java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
277                    long ownerId, int ownerType, long plid)
278                    throws com.liferay.portal.kernel.exception.SystemException;
279    
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public com.liferay.portal.model.PortletPreferences getPortletPreferences(
282                    long ownerId, int ownerType, long plid, java.lang.String portletId)
283                    throws com.liferay.portal.kernel.exception.PortalException,
284                            com.liferay.portal.kernel.exception.SystemException;
285    
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
288                    long companyId, long groupId, long ownerId, int ownerType,
289                    java.lang.String portletId, boolean privateLayout)
290                    throws com.liferay.portal.kernel.exception.SystemException;
291    
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferences(
294                    long plid, java.lang.String portletId)
295                    throws com.liferay.portal.kernel.exception.SystemException;
296    
297            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298            public java.util.List<com.liferay.portal.model.PortletPreferences> getPortletPreferencesByPlid(
299                    long plid) throws com.liferay.portal.kernel.exception.SystemException;
300    
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public long getPortletPreferencesCount(int ownerType, long plid,
303                    java.lang.String portletId)
304                    throws com.liferay.portal.kernel.exception.SystemException;
305    
306            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307            public long getPortletPreferencesCount(int ownerType,
308                    java.lang.String portletId)
309                    throws com.liferay.portal.kernel.exception.SystemException;
310    
311            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
312            public long getPortletPreferencesCount(long ownerId, int ownerType,
313                    long plid, com.liferay.portal.model.Portlet portlet,
314                    boolean excludeDefaultPreferences)
315                    throws com.liferay.portal.kernel.exception.SystemException;
316    
317            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
318            public long getPortletPreferencesCount(long ownerId, int ownerType,
319                    java.lang.String portletId, boolean excludeDefaultPreferences)
320                    throws com.liferay.portal.kernel.exception.SystemException;
321    
322            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
323            public javax.portlet.PortletPreferences getPreferences(long companyId,
324                    long ownerId, int ownerType, long plid, java.lang.String portletId)
325                    throws com.liferay.portal.kernel.exception.SystemException;
326    
327            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
328            public javax.portlet.PortletPreferences getPreferences(long companyId,
329                    long ownerId, int ownerType, long plid, java.lang.String portletId,
330                    java.lang.String defaultPreferences)
331                    throws com.liferay.portal.kernel.exception.SystemException;
332    
333            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
334            public javax.portlet.PortletPreferences getPreferences(
335                    com.liferay.portal.model.PortletPreferencesIds portletPreferencesIds)
336                    throws com.liferay.portal.kernel.exception.SystemException;
337    
338            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
339            public javax.portlet.PortletPreferences getStrictPreferences(
340                    long companyId, long ownerId, int ownerType, long plid,
341                    java.lang.String portletId)
342                    throws com.liferay.portal.kernel.exception.SystemException;
343    
344            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
345            public javax.portlet.PortletPreferences getStrictPreferences(
346                    com.liferay.portal.model.PortletPreferencesIds portletPreferencesIds)
347                    throws com.liferay.portal.kernel.exception.SystemException;
348    
349            public com.liferay.portal.model.PortletPreferences updatePreferences(
350                    long ownerId, int ownerType, long plid, java.lang.String portletId,
351                    javax.portlet.PortletPreferences portletPreferences)
352                    throws com.liferay.portal.kernel.exception.SystemException;
353    
354            public com.liferay.portal.model.PortletPreferences updatePreferences(
355                    long ownerId, int ownerType, long plid, java.lang.String portletId,
356                    java.lang.String xml)
357                    throws com.liferay.portal.kernel.exception.SystemException;
358    }