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            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
270                    return getService().getIndexableActionableDynamicQuery();
271            }
272    
273            /**
274            * Returns the layout revision with the primary key.
275            *
276            * @param layoutRevisionId the primary key of the layout revision
277            * @return the layout revision
278            * @throws PortalException if a layout revision with the primary key could not be found
279            */
280            public static com.liferay.portal.model.LayoutRevision getLayoutRevision(
281                    long layoutRevisionId)
282                    throws com.liferay.portal.kernel.exception.PortalException {
283                    return getService().getLayoutRevision(layoutRevisionId);
284            }
285    
286            public static com.liferay.portal.model.LayoutRevision getLayoutRevision(
287                    long layoutSetBranchId, long layoutBranchId, long plid)
288                    throws com.liferay.portal.kernel.exception.PortalException {
289                    return getService()
290                                       .getLayoutRevision(layoutSetBranchId, layoutBranchId, plid);
291            }
292    
293            public static com.liferay.portal.model.LayoutRevision getLayoutRevision(
294                    long layoutSetBranchId, long plid, boolean head)
295                    throws com.liferay.portal.kernel.exception.PortalException {
296                    return getService().getLayoutRevision(layoutSetBranchId, plid, head);
297            }
298    
299            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
300                    long layoutSetBranchId, boolean head) {
301                    return getService().getLayoutRevisions(layoutSetBranchId, head);
302            }
303    
304            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
305                    long layoutSetBranchId, long layoutBranchId, long plid, int start,
306                    int end,
307                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator) {
308                    return getService()
309                                       .getLayoutRevisions(layoutSetBranchId, layoutBranchId, plid,
310                            start, end, orderByComparator);
311            }
312    
313            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
314                    long layoutSetBranchId, long plid) {
315                    return getService().getLayoutRevisions(layoutSetBranchId, plid);
316            }
317    
318            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
319                    long layoutSetBranchId, long plid, int start, int end,
320                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator) {
321                    return getService()
322                                       .getLayoutRevisions(layoutSetBranchId, plid, start, end,
323                            orderByComparator);
324            }
325    
326            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
327                    long layoutSetBranchId, long plid, int status) {
328                    return getService().getLayoutRevisions(layoutSetBranchId, plid, status);
329            }
330    
331            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
332                    long layoutSetBranchId, int status) {
333                    return getService().getLayoutRevisions(layoutSetBranchId, status);
334            }
335    
336            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
337                    long plid) {
338                    return getService().getLayoutRevisions(plid);
339            }
340    
341            /**
342            * Returns a range of all the layout revisions.
343            *
344            * <p>
345            * 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.
346            * </p>
347            *
348            * @param start the lower bound of the range of layout revisions
349            * @param end the upper bound of the range of layout revisions (not inclusive)
350            * @return the range of layout revisions
351            */
352            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
353                    int start, int end) {
354                    return getService().getLayoutRevisions(start, end);
355            }
356    
357            /**
358            * Returns the number of layout revisions.
359            *
360            * @return the number of layout revisions
361            */
362            public static int getLayoutRevisionsCount() {
363                    return getService().getLayoutRevisionsCount();
364            }
365    
366            public static int getLayoutRevisionsCount(long layoutSetBranchId,
367                    long layoutBranchId, long plid) {
368                    return getService()
369                                       .getLayoutRevisionsCount(layoutSetBranchId, layoutBranchId,
370                            plid);
371            }
372    
373            /**
374            * Returns the OSGi service identifier.
375            *
376            * @return the OSGi service identifier
377            */
378            public static java.lang.String getOSGiServiceIdentifier() {
379                    return getService().getOSGiServiceIdentifier();
380            }
381    
382            public static com.liferay.portal.model.PersistedModel getPersistedModel(
383                    java.io.Serializable primaryKeyObj)
384                    throws com.liferay.portal.kernel.exception.PortalException {
385                    return getService().getPersistedModel(primaryKeyObj);
386            }
387    
388            /**
389            * Updates the layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
390            *
391            * @param layoutRevision the layout revision
392            * @return the layout revision that was updated
393            */
394            public static com.liferay.portal.model.LayoutRevision updateLayoutRevision(
395                    com.liferay.portal.model.LayoutRevision layoutRevision) {
396                    return getService().updateLayoutRevision(layoutRevision);
397            }
398    
399            public static com.liferay.portal.model.LayoutRevision updateLayoutRevision(
400                    long userId, long layoutRevisionId, long layoutBranchId,
401                    java.lang.String name, java.lang.String title,
402                    java.lang.String description, java.lang.String keywords,
403                    java.lang.String robots, java.lang.String typeSettings,
404                    boolean iconImage, long iconImageId, java.lang.String themeId,
405                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
406                    java.lang.String wapColorSchemeId, java.lang.String css,
407                    com.liferay.portal.service.ServiceContext serviceContext)
408                    throws com.liferay.portal.kernel.exception.PortalException {
409                    return getService()
410                                       .updateLayoutRevision(userId, layoutRevisionId,
411                            layoutBranchId, name, title, description, keywords, robots,
412                            typeSettings, iconImage, iconImageId, themeId, colorSchemeId,
413                            wapThemeId, wapColorSchemeId, css, serviceContext);
414            }
415    
416            public static com.liferay.portal.model.LayoutRevision updateStatus(
417                    long userId, long layoutRevisionId, int status,
418                    com.liferay.portal.service.ServiceContext serviceContext)
419                    throws com.liferay.portal.kernel.exception.PortalException {
420                    return getService()
421                                       .updateStatus(userId, layoutRevisionId, status,
422                            serviceContext);
423            }
424    
425            public static LayoutRevisionLocalService getService() {
426                    if (_service == null) {
427                            _service = (LayoutRevisionLocalService)PortalBeanLocatorUtil.locate(LayoutRevisionLocalService.class.getName());
428    
429                            ReferenceRegistry.registerReference(LayoutRevisionLocalServiceUtil.class,
430                                    "_service");
431                    }
432    
433                    return _service;
434            }
435    
436            private static LayoutRevisionLocalService _service;
437    }