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.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for LayoutRevision. This utility wraps
024     * {@link com.liferay.portal.service.impl.LayoutRevisionLocalServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on the local server. Methods of this service will not have security checks
027     * based on the propagated JAAS credentials because this service can only be
028     * accessed from within the same VM.
029     *
030     * @author Brian Wing Shun Chan
031     * @see LayoutRevisionLocalService
032     * @see com.liferay.portal.service.base.LayoutRevisionLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.LayoutRevisionLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class LayoutRevisionLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutRevisionLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * Adds the layout revision to the database. Also notifies the appropriate model listeners.
046            *
047            * @param layoutRevision the layout revision
048            * @return the layout revision that was added
049            */
050            public static com.liferay.portal.kernel.model.LayoutRevision addLayoutRevision(
051                    com.liferay.portal.kernel.model.LayoutRevision layoutRevision) {
052                    return getService().addLayoutRevision(layoutRevision);
053            }
054    
055            public static com.liferay.portal.kernel.model.LayoutRevision addLayoutRevision(
056                    long userId, long layoutSetBranchId, long layoutBranchId,
057                    long parentLayoutRevisionId, boolean head, long plid,
058                    long portletPreferencesPlid, boolean privateLayout,
059                    java.lang.String name, java.lang.String title,
060                    java.lang.String description, java.lang.String keywords,
061                    java.lang.String robots, java.lang.String typeSettings,
062                    boolean iconImage, long iconImageId, java.lang.String themeId,
063                    java.lang.String colorSchemeId, java.lang.String css,
064                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
065                    throws com.liferay.portal.kernel.exception.PortalException {
066                    return getService()
067                                       .addLayoutRevision(userId, layoutSetBranchId,
068                            layoutBranchId, parentLayoutRevisionId, head, plid,
069                            portletPreferencesPlid, privateLayout, name, title, description,
070                            keywords, robots, typeSettings, iconImage, iconImageId, themeId,
071                            colorSchemeId, css, serviceContext);
072            }
073    
074            /**
075            * Creates a new layout revision with the primary key. Does not add the layout revision to the database.
076            *
077            * @param layoutRevisionId the primary key for the new layout revision
078            * @return the new layout revision
079            */
080            public static com.liferay.portal.kernel.model.LayoutRevision createLayoutRevision(
081                    long layoutRevisionId) {
082                    return getService().createLayoutRevision(layoutRevisionId);
083            }
084    
085            public static void deleteLayoutLayoutRevisions(long plid)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    getService().deleteLayoutLayoutRevisions(plid);
088            }
089    
090            /**
091            * Deletes the layout revision from the database. Also notifies the appropriate model listeners.
092            *
093            * @param layoutRevision the layout revision
094            * @return the layout revision that was removed
095            * @throws PortalException
096            */
097            public static com.liferay.portal.kernel.model.LayoutRevision deleteLayoutRevision(
098                    com.liferay.portal.kernel.model.LayoutRevision layoutRevision)
099                    throws com.liferay.portal.kernel.exception.PortalException {
100                    return getService().deleteLayoutRevision(layoutRevision);
101            }
102    
103            /**
104            * Deletes the layout revision with the primary key from the database. Also notifies the appropriate model listeners.
105            *
106            * @param layoutRevisionId the primary key of the layout revision
107            * @return the layout revision that was removed
108            * @throws PortalException if a layout revision with the primary key could not be found
109            */
110            public static com.liferay.portal.kernel.model.LayoutRevision deleteLayoutRevision(
111                    long layoutRevisionId)
112                    throws com.liferay.portal.kernel.exception.PortalException {
113                    return getService().deleteLayoutRevision(layoutRevisionId);
114            }
115    
116            public static void deleteLayoutRevisions(long layoutSetBranchId,
117                    long layoutBranchId, long plid)
118                    throws com.liferay.portal.kernel.exception.PortalException {
119                    getService()
120                            .deleteLayoutRevisions(layoutSetBranchId, layoutBranchId, plid);
121            }
122    
123            public static void deleteLayoutRevisions(long layoutSetBranchId, long plid)
124                    throws com.liferay.portal.kernel.exception.PortalException {
125                    getService().deleteLayoutRevisions(layoutSetBranchId, plid);
126            }
127    
128            public static void deleteLayoutSetBranchLayoutRevisions(
129                    long layoutSetBranchId)
130                    throws com.liferay.portal.kernel.exception.PortalException {
131                    getService().deleteLayoutSetBranchLayoutRevisions(layoutSetBranchId);
132            }
133    
134            /**
135            * @throws PortalException
136            */
137            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
138                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
139                    throws com.liferay.portal.kernel.exception.PortalException {
140                    return getService().deletePersistedModel(persistedModel);
141            }
142    
143            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
144                    return getService().dynamicQuery();
145            }
146    
147            /**
148            * Performs a dynamic query on the database and returns the matching rows.
149            *
150            * @param dynamicQuery the dynamic query
151            * @return the matching rows
152            */
153            public static <T> java.util.List<T> dynamicQuery(
154                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
155                    return getService().dynamicQuery(dynamicQuery);
156            }
157    
158            /**
159            * Performs a dynamic query on the database and returns a range of the matching rows.
160            *
161            * <p>
162            * 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.LayoutRevisionModelImpl}. 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.
163            * </p>
164            *
165            * @param dynamicQuery the dynamic query
166            * @param start the lower bound of the range of model instances
167            * @param end the upper bound of the range of model instances (not inclusive)
168            * @return the range of matching rows
169            */
170            public static <T> java.util.List<T> dynamicQuery(
171                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
172                    int end) {
173                    return getService().dynamicQuery(dynamicQuery, start, end);
174            }
175    
176            /**
177            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
178            *
179            * <p>
180            * 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.LayoutRevisionModelImpl}. 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.
181            * </p>
182            *
183            * @param dynamicQuery the dynamic query
184            * @param start the lower bound of the range of model instances
185            * @param end the upper bound of the range of model instances (not inclusive)
186            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
187            * @return the ordered range of matching rows
188            */
189            public static <T> java.util.List<T> dynamicQuery(
190                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
191                    int end,
192                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
193                    return getService()
194                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
195            }
196    
197            /**
198            * Returns the number of rows matching the dynamic query.
199            *
200            * @param dynamicQuery the dynamic query
201            * @return the number of rows matching the dynamic query
202            */
203            public static long dynamicQueryCount(
204                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
205                    return getService().dynamicQueryCount(dynamicQuery);
206            }
207    
208            /**
209            * Returns the number of rows matching the dynamic query.
210            *
211            * @param dynamicQuery the dynamic query
212            * @param projection the projection to apply to the query
213            * @return the number of rows matching the dynamic query
214            */
215            public static long dynamicQueryCount(
216                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
217                    com.liferay.portal.kernel.dao.orm.Projection projection) {
218                    return getService().dynamicQueryCount(dynamicQuery, projection);
219            }
220    
221            public static com.liferay.portal.kernel.model.LayoutRevision fetchLastLayoutRevision(
222                    long plid, boolean head) {
223                    return getService().fetchLastLayoutRevision(plid, head);
224            }
225    
226            public static com.liferay.portal.kernel.model.LayoutRevision fetchLatestLayoutRevision(
227                    long layoutSetBranchId, long plid) {
228                    return getService().fetchLatestLayoutRevision(layoutSetBranchId, plid);
229            }
230    
231            public static com.liferay.portal.kernel.model.LayoutRevision fetchLayoutRevision(
232                    long layoutRevisionId) {
233                    return getService().fetchLayoutRevision(layoutRevisionId);
234            }
235    
236            public static com.liferay.portal.kernel.model.LayoutRevision fetchLayoutRevision(
237                    long layoutSetBranchId, boolean head, long plid) {
238                    return getService().fetchLayoutRevision(layoutSetBranchId, head, plid);
239            }
240    
241            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
242                    return getService().getActionableDynamicQuery();
243            }
244    
245            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getChildLayoutRevisions(
246                    long layoutSetBranchId, long parentLayoutRevision, long plid,
247                    int start, int end,
248                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.LayoutRevision> orderByComparator) {
249                    return getService()
250                                       .getChildLayoutRevisions(layoutSetBranchId,
251                            parentLayoutRevision, plid, start, end, orderByComparator);
252            }
253    
254            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getChildLayoutRevisions(
255                    long layoutSetBranchId, long parentLayoutRevisionId, long plid) {
256                    return getService()
257                                       .getChildLayoutRevisions(layoutSetBranchId,
258                            parentLayoutRevisionId, plid);
259            }
260    
261            public static int getChildLayoutRevisionsCount(long layoutSetBranchId,
262                    long parentLayoutRevision, long plid) {
263                    return getService()
264                                       .getChildLayoutRevisionsCount(layoutSetBranchId,
265                            parentLayoutRevision, plid);
266            }
267    
268            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
269                    return getService().getIndexableActionableDynamicQuery();
270            }
271    
272            /**
273            * Returns the layout revision with the primary key.
274            *
275            * @param layoutRevisionId the primary key of the layout revision
276            * @return the layout revision
277            * @throws PortalException if a layout revision with the primary key could not be found
278            */
279            public static com.liferay.portal.kernel.model.LayoutRevision getLayoutRevision(
280                    long layoutRevisionId)
281                    throws com.liferay.portal.kernel.exception.PortalException {
282                    return getService().getLayoutRevision(layoutRevisionId);
283            }
284    
285            public static com.liferay.portal.kernel.model.LayoutRevision getLayoutRevision(
286                    long layoutSetBranchId, long layoutBranchId, long plid)
287                    throws com.liferay.portal.kernel.exception.PortalException {
288                    return getService()
289                                       .getLayoutRevision(layoutSetBranchId, layoutBranchId, plid);
290            }
291    
292            public static com.liferay.portal.kernel.model.LayoutRevision getLayoutRevision(
293                    long layoutSetBranchId, long plid, boolean head)
294                    throws com.liferay.portal.kernel.exception.PortalException {
295                    return getService().getLayoutRevision(layoutSetBranchId, plid, head);
296            }
297    
298            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
299                    long layoutSetBranchId, boolean head) {
300                    return getService().getLayoutRevisions(layoutSetBranchId, head);
301            }
302    
303            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
304                    long layoutSetBranchId, long layoutBranchId, long plid, int start,
305                    int end,
306                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.LayoutRevision> orderByComparator) {
307                    return getService()
308                                       .getLayoutRevisions(layoutSetBranchId, layoutBranchId, plid,
309                            start, end, orderByComparator);
310            }
311    
312            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
313                    long layoutSetBranchId, long plid) {
314                    return getService().getLayoutRevisions(layoutSetBranchId, plid);
315            }
316    
317            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
318                    long layoutSetBranchId, long plid, int start, int end,
319                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.kernel.model.LayoutRevision> orderByComparator) {
320                    return getService()
321                                       .getLayoutRevisions(layoutSetBranchId, plid, start, end,
322                            orderByComparator);
323            }
324    
325            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
326                    long layoutSetBranchId, long plid, int status) {
327                    return getService().getLayoutRevisions(layoutSetBranchId, plid, status);
328            }
329    
330            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
331                    long layoutSetBranchId, int status) {
332                    return getService().getLayoutRevisions(layoutSetBranchId, status);
333            }
334    
335            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
336                    long plid) {
337                    return getService().getLayoutRevisions(plid);
338            }
339    
340            /**
341            * Returns a range of all the layout revisions.
342            *
343            * <p>
344            * 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.LayoutRevisionModelImpl}. 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.
345            * </p>
346            *
347            * @param start the lower bound of the range of layout revisions
348            * @param end the upper bound of the range of layout revisions (not inclusive)
349            * @return the range of layout revisions
350            */
351            public static java.util.List<com.liferay.portal.kernel.model.LayoutRevision> getLayoutRevisions(
352                    int start, int end) {
353                    return getService().getLayoutRevisions(start, end);
354            }
355    
356            /**
357            * Returns the number of layout revisions.
358            *
359            * @return the number of layout revisions
360            */
361            public static int getLayoutRevisionsCount() {
362                    return getService().getLayoutRevisionsCount();
363            }
364    
365            public static int getLayoutRevisionsCount(long layoutSetBranchId,
366                    long layoutBranchId, long plid) {
367                    return getService()
368                                       .getLayoutRevisionsCount(layoutSetBranchId, layoutBranchId,
369                            plid);
370            }
371    
372            /**
373            * Returns the OSGi service identifier.
374            *
375            * @return the OSGi service identifier
376            */
377            public static java.lang.String getOSGiServiceIdentifier() {
378                    return getService().getOSGiServiceIdentifier();
379            }
380    
381            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
382                    java.io.Serializable primaryKeyObj)
383                    throws com.liferay.portal.kernel.exception.PortalException {
384                    return getService().getPersistedModel(primaryKeyObj);
385            }
386    
387            /**
388            * Updates the layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
389            *
390            * @param layoutRevision the layout revision
391            * @return the layout revision that was updated
392            */
393            public static com.liferay.portal.kernel.model.LayoutRevision updateLayoutRevision(
394                    com.liferay.portal.kernel.model.LayoutRevision layoutRevision) {
395                    return getService().updateLayoutRevision(layoutRevision);
396            }
397    
398            public static com.liferay.portal.kernel.model.LayoutRevision updateLayoutRevision(
399                    long userId, long layoutRevisionId, long layoutBranchId,
400                    java.lang.String name, java.lang.String title,
401                    java.lang.String description, java.lang.String keywords,
402                    java.lang.String robots, java.lang.String typeSettings,
403                    boolean iconImage, long iconImageId, java.lang.String themeId,
404                    java.lang.String colorSchemeId, java.lang.String css,
405                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
406                    throws com.liferay.portal.kernel.exception.PortalException {
407                    return getService()
408                                       .updateLayoutRevision(userId, layoutRevisionId,
409                            layoutBranchId, name, title, description, keywords, robots,
410                            typeSettings, iconImage, iconImageId, themeId, colorSchemeId, css,
411                            serviceContext);
412            }
413    
414            public static com.liferay.portal.kernel.model.LayoutRevision updateStatus(
415                    long userId, long layoutRevisionId, int status,
416                    com.liferay.portal.kernel.service.ServiceContext serviceContext)
417                    throws com.liferay.portal.kernel.exception.PortalException {
418                    return getService()
419                                       .updateStatus(userId, layoutRevisionId, status,
420                            serviceContext);
421            }
422    
423            public static LayoutRevisionLocalService getService() {
424                    if (_service == null) {
425                            _service = (LayoutRevisionLocalService)PortalBeanLocatorUtil.locate(LayoutRevisionLocalService.class.getName());
426    
427                            ReferenceRegistry.registerReference(LayoutRevisionLocalServiceUtil.class,
428                                    "_service");
429                    }
430    
431                    return _service;
432            }
433    
434            private static LayoutRevisionLocalService _service;
435    }