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