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.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.exportimport.kernel.lar.PortletDataContext;
020    
021    import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
022    import com.liferay.portal.kernel.dao.orm.DynamicQuery;
023    import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
024    import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
025    import com.liferay.portal.kernel.dao.orm.Projection;
026    import com.liferay.portal.kernel.exception.PortalException;
027    import com.liferay.portal.kernel.exception.SystemException;
028    import com.liferay.portal.kernel.model.LayoutFriendlyURL;
029    import com.liferay.portal.kernel.model.PersistedModel;
030    import com.liferay.portal.kernel.search.Indexable;
031    import com.liferay.portal.kernel.search.IndexableType;
032    import com.liferay.portal.kernel.transaction.Isolation;
033    import com.liferay.portal.kernel.transaction.Propagation;
034    import com.liferay.portal.kernel.transaction.Transactional;
035    import com.liferay.portal.kernel.util.OrderByComparator;
036    
037    import java.io.Serializable;
038    
039    import java.util.List;
040    import java.util.Locale;
041    import java.util.Map;
042    
043    /**
044     * Provides the local service interface for LayoutFriendlyURL. Methods of this
045     * service will not have security checks based on the propagated JAAS
046     * credentials because this service can only be accessed from within the same
047     * VM.
048     *
049     * @author Brian Wing Shun Chan
050     * @see LayoutFriendlyURLLocalServiceUtil
051     * @see com.liferay.portal.service.base.LayoutFriendlyURLLocalServiceBaseImpl
052     * @see com.liferay.portal.service.impl.LayoutFriendlyURLLocalServiceImpl
053     * @generated
054     */
055    @ProviderType
056    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
057            PortalException.class, SystemException.class})
058    public interface LayoutFriendlyURLLocalService extends BaseLocalService,
059            PersistedModelLocalService {
060            /*
061             * NOTE FOR DEVELOPERS:
062             *
063             * Never modify or reference this interface directly. Always use {@link LayoutFriendlyURLLocalServiceUtil} to access the layout friendly u r l local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutFriendlyURLLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
064             */
065            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
066            public ActionableDynamicQuery getActionableDynamicQuery();
067    
068            public DynamicQuery dynamicQuery();
069    
070            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
071            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
072                    PortletDataContext portletDataContext);
073    
074            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
075            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
076    
077            /**
078            * Adds the layout friendly u r l to the database. Also notifies the appropriate model listeners.
079            *
080            * @param layoutFriendlyURL the layout friendly u r l
081            * @return the layout friendly u r l that was added
082            */
083            @Indexable(type = IndexableType.REINDEX)
084            public LayoutFriendlyURL addLayoutFriendlyURL(
085                    LayoutFriendlyURL layoutFriendlyURL);
086    
087            public LayoutFriendlyURL addLayoutFriendlyURL(long userId, long companyId,
088                    long groupId, long plid, boolean privateLayout,
089                    java.lang.String friendlyURL, java.lang.String languageId,
090                    ServiceContext serviceContext) throws PortalException;
091    
092            /**
093            * Creates a new layout friendly u r l with the primary key. Does not add the layout friendly u r l to the database.
094            *
095            * @param layoutFriendlyURLId the primary key for the new layout friendly u r l
096            * @return the new layout friendly u r l
097            */
098            public LayoutFriendlyURL createLayoutFriendlyURL(long layoutFriendlyURLId);
099    
100            /**
101            * Deletes the layout friendly u r l from the database. Also notifies the appropriate model listeners.
102            *
103            * @param layoutFriendlyURL the layout friendly u r l
104            * @return the layout friendly u r l that was removed
105            */
106            @Indexable(type = IndexableType.DELETE)
107            public LayoutFriendlyURL deleteLayoutFriendlyURL(
108                    LayoutFriendlyURL layoutFriendlyURL);
109    
110            /**
111            * Deletes the layout friendly u r l with the primary key from the database. Also notifies the appropriate model listeners.
112            *
113            * @param layoutFriendlyURLId the primary key of the layout friendly u r l
114            * @return the layout friendly u r l that was removed
115            * @throws PortalException if a layout friendly u r l with the primary key could not be found
116            */
117            @Indexable(type = IndexableType.DELETE)
118            public LayoutFriendlyURL deleteLayoutFriendlyURL(long layoutFriendlyURLId)
119                    throws PortalException;
120    
121            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
122            public LayoutFriendlyURL fetchFirstLayoutFriendlyURL(long groupId,
123                    boolean privateLayout, java.lang.String friendlyURL);
124    
125            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
126            public LayoutFriendlyURL fetchLayoutFriendlyURL(long groupId,
127                    boolean privateLayout, java.lang.String friendlyURL,
128                    java.lang.String languageId);
129    
130            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
131            public LayoutFriendlyURL fetchLayoutFriendlyURL(long layoutFriendlyURLId);
132    
133            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
134            public LayoutFriendlyURL fetchLayoutFriendlyURL(long plid,
135                    java.lang.String languageId);
136    
137            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
138            public LayoutFriendlyURL fetchLayoutFriendlyURL(long plid,
139                    java.lang.String languageId, boolean useDefault);
140    
141            /**
142            * Returns the layout friendly u r l matching the UUID and group.
143            *
144            * @param uuid the layout friendly u r l's UUID
145            * @param groupId the primary key of the group
146            * @return the matching layout friendly u r l, or <code>null</code> if a matching layout friendly u r l could not be found
147            */
148            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149            public LayoutFriendlyURL fetchLayoutFriendlyURLByUuidAndGroupId(
150                    java.lang.String uuid, long groupId);
151    
152            /**
153            * Returns the layout friendly u r l with the primary key.
154            *
155            * @param layoutFriendlyURLId the primary key of the layout friendly u r l
156            * @return the layout friendly u r l
157            * @throws PortalException if a layout friendly u r l with the primary key could not be found
158            */
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public LayoutFriendlyURL getLayoutFriendlyURL(long layoutFriendlyURLId)
161                    throws PortalException;
162    
163            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
164            public LayoutFriendlyURL getLayoutFriendlyURL(long plid,
165                    java.lang.String languageId) throws PortalException;
166    
167            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
168            public LayoutFriendlyURL getLayoutFriendlyURL(long plid,
169                    java.lang.String languageId, boolean useDefault)
170                    throws PortalException;
171    
172            /**
173            * Returns the layout friendly u r l matching the UUID and group.
174            *
175            * @param uuid the layout friendly u r l's UUID
176            * @param groupId the primary key of the group
177            * @return the matching layout friendly u r l
178            * @throws PortalException if a matching layout friendly u r l could not be found
179            */
180            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
181            public LayoutFriendlyURL getLayoutFriendlyURLByUuidAndGroupId(
182                    java.lang.String uuid, long groupId) throws PortalException;
183    
184            /**
185            * Updates the layout friendly u r l in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
186            *
187            * @param layoutFriendlyURL the layout friendly u r l
188            * @return the layout friendly u r l that was updated
189            */
190            @Indexable(type = IndexableType.REINDEX)
191            public LayoutFriendlyURL updateLayoutFriendlyURL(
192                    LayoutFriendlyURL layoutFriendlyURL);
193    
194            public LayoutFriendlyURL updateLayoutFriendlyURL(long userId,
195                    long companyId, long groupId, long plid, boolean privateLayout,
196                    java.lang.String friendlyURL, java.lang.String languageId,
197                    ServiceContext serviceContext) throws PortalException;
198    
199            /**
200            * @throws PortalException
201            */
202            @Override
203            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
204                    throws PortalException;
205    
206            @Override
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
209                    throws PortalException;
210    
211            /**
212            * Returns the number of layout friendly u r ls.
213            *
214            * @return the number of layout friendly u r ls
215            */
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public int getLayoutFriendlyURLsCount();
218    
219            /**
220            * Returns the OSGi service identifier.
221            *
222            * @return the OSGi service identifier
223            */
224            public java.lang.String getOSGiServiceIdentifier();
225    
226            public List<LayoutFriendlyURL> addLayoutFriendlyURLs(long userId,
227                    long companyId, long groupId, long plid, boolean privateLayout,
228                    Map<Locale, java.lang.String> friendlyURLMap,
229                    ServiceContext serviceContext) throws PortalException;
230    
231            /**
232            * Performs a dynamic query on the database and returns the matching rows.
233            *
234            * @param dynamicQuery the dynamic query
235            * @return the matching rows
236            */
237            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
238    
239            /**
240            * Performs a dynamic query on the database and returns a range of the matching rows.
241            *
242            * <p>
243            * 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.LayoutFriendlyURLModelImpl}. 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.
244            * </p>
245            *
246            * @param dynamicQuery the dynamic query
247            * @param start the lower bound of the range of model instances
248            * @param end the upper bound of the range of model instances (not inclusive)
249            * @return the range of matching rows
250            */
251            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
252                    int end);
253    
254            /**
255            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
256            *
257            * <p>
258            * 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.LayoutFriendlyURLModelImpl}. 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.
259            * </p>
260            *
261            * @param dynamicQuery the dynamic query
262            * @param start the lower bound of the range of model instances
263            * @param end the upper bound of the range of model instances (not inclusive)
264            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
265            * @return the ordered range of matching rows
266            */
267            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
268                    int end, OrderByComparator<T> orderByComparator);
269    
270            /**
271            * Returns a range of all the layout friendly u r ls.
272            *
273            * <p>
274            * 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.LayoutFriendlyURLModelImpl}. 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.
275            * </p>
276            *
277            * @param start the lower bound of the range of layout friendly u r ls
278            * @param end the upper bound of the range of layout friendly u r ls (not inclusive)
279            * @return the range of layout friendly u r ls
280            */
281            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282            public List<LayoutFriendlyURL> getLayoutFriendlyURLs(int start, int end);
283    
284            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285            public List<LayoutFriendlyURL> getLayoutFriendlyURLs(long plid);
286    
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public List<LayoutFriendlyURL> getLayoutFriendlyURLs(long plid,
289                    java.lang.String friendlyURL, int start, int end);
290    
291            /**
292            * Returns all the layout friendly u r ls matching the UUID and company.
293            *
294            * @param uuid the UUID of the layout friendly u r ls
295            * @param companyId the primary key of the company
296            * @return the matching layout friendly u r ls, or an empty list if no matches were found
297            */
298            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
299            public List<LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId(
300                    java.lang.String uuid, long companyId);
301    
302            /**
303            * Returns a range of layout friendly u r ls matching the UUID and company.
304            *
305            * @param uuid the UUID of the layout friendly u r ls
306            * @param companyId the primary key of the company
307            * @param start the lower bound of the range of layout friendly u r ls
308            * @param end the upper bound of the range of layout friendly u r ls (not inclusive)
309            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
310            * @return the range of matching layout friendly u r ls, or an empty list if no matches were found
311            */
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public List<LayoutFriendlyURL> getLayoutFriendlyURLsByUuidAndCompanyId(
314                    java.lang.String uuid, long companyId, int start, int end,
315                    OrderByComparator<LayoutFriendlyURL> orderByComparator);
316    
317            public List<LayoutFriendlyURL> updateLayoutFriendlyURLs(long userId,
318                    long companyId, long groupId, long plid, boolean privateLayout,
319                    Map<Locale, java.lang.String> friendlyURLMap,
320                    ServiceContext serviceContext) throws PortalException;
321    
322            /**
323            * Returns the number of rows matching the dynamic query.
324            *
325            * @param dynamicQuery the dynamic query
326            * @return the number of rows matching the dynamic query
327            */
328            public long dynamicQueryCount(DynamicQuery dynamicQuery);
329    
330            /**
331            * Returns the number of rows matching the dynamic query.
332            *
333            * @param dynamicQuery the dynamic query
334            * @param projection the projection to apply to the query
335            * @return the number of rows matching the dynamic query
336            */
337            public long dynamicQueryCount(DynamicQuery dynamicQuery,
338                    Projection projection);
339    
340            public void deleteLayoutFriendlyURL(long plid, java.lang.String languageId);
341    
342            public void deleteLayoutFriendlyURLs(long plid);
343    }