001    /**
002     * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import 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            * @throws SystemException if a system exception occurred
050            */
051            public static com.liferay.portal.model.LayoutRevision addLayoutRevision(
052                    com.liferay.portal.model.LayoutRevision layoutRevision)
053                    throws com.liferay.portal.kernel.exception.SystemException {
054                    return getService().addLayoutRevision(layoutRevision);
055            }
056    
057            /**
058            * Creates a new layout revision with the primary key. Does not add the layout revision to the database.
059            *
060            * @param layoutRevisionId the primary key for the new layout revision
061            * @return the new layout revision
062            */
063            public static com.liferay.portal.model.LayoutRevision createLayoutRevision(
064                    long layoutRevisionId) {
065                    return getService().createLayoutRevision(layoutRevisionId);
066            }
067    
068            /**
069            * Deletes the layout revision with the primary key from the database. Also notifies the appropriate model listeners.
070            *
071            * @param layoutRevisionId the primary key of the layout revision
072            * @return the layout revision that was removed
073            * @throws PortalException if a layout revision with the primary key could not be found
074            * @throws SystemException if a system exception occurred
075            */
076            public static com.liferay.portal.model.LayoutRevision deleteLayoutRevision(
077                    long layoutRevisionId)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException {
080                    return getService().deleteLayoutRevision(layoutRevisionId);
081            }
082    
083            /**
084            * Deletes the layout revision from the database. Also notifies the appropriate model listeners.
085            *
086            * @param layoutRevision the layout revision
087            * @return the layout revision that was removed
088            * @throws PortalException
089            * @throws SystemException if a system exception occurred
090            */
091            public static com.liferay.portal.model.LayoutRevision deleteLayoutRevision(
092                    com.liferay.portal.model.LayoutRevision layoutRevision)
093                    throws com.liferay.portal.kernel.exception.PortalException,
094                            com.liferay.portal.kernel.exception.SystemException {
095                    return getService().deleteLayoutRevision(layoutRevision);
096            }
097    
098            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
099                    return getService().dynamicQuery();
100            }
101    
102            /**
103            * Performs a dynamic query on the database and returns the matching rows.
104            *
105            * @param dynamicQuery the dynamic query
106            * @return the matching rows
107            * @throws SystemException if a system exception occurred
108            */
109            @SuppressWarnings("rawtypes")
110            public static java.util.List dynamicQuery(
111                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
112                    throws com.liferay.portal.kernel.exception.SystemException {
113                    return getService().dynamicQuery(dynamicQuery);
114            }
115    
116            /**
117            * Performs a dynamic query on the database and returns a range of the matching rows.
118            *
119            * <p>
120            * 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.
121            * </p>
122            *
123            * @param dynamicQuery the dynamic query
124            * @param start the lower bound of the range of model instances
125            * @param end the upper bound of the range of model instances (not inclusive)
126            * @return the range of matching rows
127            * @throws SystemException if a system exception occurred
128            */
129            @SuppressWarnings("rawtypes")
130            public static java.util.List dynamicQuery(
131                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
132                    int end) throws com.liferay.portal.kernel.exception.SystemException {
133                    return getService().dynamicQuery(dynamicQuery, start, end);
134            }
135    
136            /**
137            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
138            *
139            * <p>
140            * 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.
141            * </p>
142            *
143            * @param dynamicQuery the dynamic query
144            * @param start the lower bound of the range of model instances
145            * @param end the upper bound of the range of model instances (not inclusive)
146            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
147            * @return the ordered range of matching rows
148            * @throws SystemException if a system exception occurred
149            */
150            @SuppressWarnings("rawtypes")
151            public static java.util.List dynamicQuery(
152                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
153                    int end,
154                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
155                    throws com.liferay.portal.kernel.exception.SystemException {
156                    return getService()
157                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
158            }
159    
160            /**
161            * Returns the number of rows that match the dynamic query.
162            *
163            * @param dynamicQuery the dynamic query
164            * @return the number of rows that match the dynamic query
165            * @throws SystemException if a system exception occurred
166            */
167            public static long dynamicQueryCount(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
169                    throws com.liferay.portal.kernel.exception.SystemException {
170                    return getService().dynamicQueryCount(dynamicQuery);
171            }
172    
173            /**
174            * Returns the number of rows that match the dynamic query.
175            *
176            * @param dynamicQuery the dynamic query
177            * @param projection the projection to apply to the query
178            * @return the number of rows that match the dynamic query
179            * @throws SystemException if a system exception occurred
180            */
181            public static long dynamicQueryCount(
182                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
183                    com.liferay.portal.kernel.dao.orm.Projection projection)
184                    throws com.liferay.portal.kernel.exception.SystemException {
185                    return getService().dynamicQueryCount(dynamicQuery, projection);
186            }
187    
188            public static com.liferay.portal.model.LayoutRevision fetchLayoutRevision(
189                    long layoutRevisionId)
190                    throws com.liferay.portal.kernel.exception.SystemException {
191                    return getService().fetchLayoutRevision(layoutRevisionId);
192            }
193    
194            /**
195            * Returns the layout revision with the primary key.
196            *
197            * @param layoutRevisionId the primary key of the layout revision
198            * @return the layout revision
199            * @throws PortalException if a layout revision with the primary key could not be found
200            * @throws SystemException if a system exception occurred
201            */
202            public static com.liferay.portal.model.LayoutRevision getLayoutRevision(
203                    long layoutRevisionId)
204                    throws com.liferay.portal.kernel.exception.PortalException,
205                            com.liferay.portal.kernel.exception.SystemException {
206                    return getService().getLayoutRevision(layoutRevisionId);
207            }
208    
209            public static com.liferay.portal.model.PersistedModel getPersistedModel(
210                    java.io.Serializable primaryKeyObj)
211                    throws com.liferay.portal.kernel.exception.PortalException,
212                            com.liferay.portal.kernel.exception.SystemException {
213                    return getService().getPersistedModel(primaryKeyObj);
214            }
215    
216            /**
217            * Returns a range of all the layout revisions.
218            *
219            * <p>
220            * 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.
221            * </p>
222            *
223            * @param start the lower bound of the range of layout revisions
224            * @param end the upper bound of the range of layout revisions (not inclusive)
225            * @return the range of layout revisions
226            * @throws SystemException if a system exception occurred
227            */
228            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
229                    int start, int end)
230                    throws com.liferay.portal.kernel.exception.SystemException {
231                    return getService().getLayoutRevisions(start, end);
232            }
233    
234            /**
235            * Returns the number of layout revisions.
236            *
237            * @return the number of layout revisions
238            * @throws SystemException if a system exception occurred
239            */
240            public static int getLayoutRevisionsCount()
241                    throws com.liferay.portal.kernel.exception.SystemException {
242                    return getService().getLayoutRevisionsCount();
243            }
244    
245            /**
246            * Updates the layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
247            *
248            * @param layoutRevision the layout revision
249            * @return the layout revision that was updated
250            * @throws SystemException if a system exception occurred
251            */
252            public static com.liferay.portal.model.LayoutRevision updateLayoutRevision(
253                    com.liferay.portal.model.LayoutRevision layoutRevision)
254                    throws com.liferay.portal.kernel.exception.SystemException {
255                    return getService().updateLayoutRevision(layoutRevision);
256            }
257    
258            /**
259            * Returns the Spring bean ID for this bean.
260            *
261            * @return the Spring bean ID for this bean
262            */
263            public static java.lang.String getBeanIdentifier() {
264                    return getService().getBeanIdentifier();
265            }
266    
267            /**
268            * Sets the Spring bean ID for this bean.
269            *
270            * @param beanIdentifier the Spring bean ID for this bean
271            */
272            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
273                    getService().setBeanIdentifier(beanIdentifier);
274            }
275    
276            public static com.liferay.portal.model.LayoutRevision addLayoutRevision(
277                    long userId, long layoutSetBranchId, long layoutBranchId,
278                    long parentLayoutRevisionId, boolean head, long plid,
279                    long portletPreferencesPlid, boolean privateLayout,
280                    java.lang.String name, java.lang.String title,
281                    java.lang.String description, java.lang.String keywords,
282                    java.lang.String robots, java.lang.String typeSettings,
283                    boolean iconImage, long iconImageId, java.lang.String themeId,
284                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
285                    java.lang.String wapColorSchemeId, java.lang.String css,
286                    com.liferay.portal.service.ServiceContext serviceContext)
287                    throws com.liferay.portal.kernel.exception.PortalException,
288                            com.liferay.portal.kernel.exception.SystemException {
289                    return getService()
290                                       .addLayoutRevision(userId, layoutSetBranchId,
291                            layoutBranchId, parentLayoutRevisionId, head, plid,
292                            portletPreferencesPlid, privateLayout, name, title, description,
293                            keywords, robots, typeSettings, iconImage, iconImageId, themeId,
294                            colorSchemeId, wapThemeId, wapColorSchemeId, css, serviceContext);
295            }
296    
297            public static void deleteLayoutLayoutRevisions(long plid)
298                    throws com.liferay.portal.kernel.exception.PortalException,
299                            com.liferay.portal.kernel.exception.SystemException {
300                    getService().deleteLayoutLayoutRevisions(plid);
301            }
302    
303            public static void deleteLayoutRevisions(long layoutSetBranchId, long plid)
304                    throws com.liferay.portal.kernel.exception.PortalException,
305                            com.liferay.portal.kernel.exception.SystemException {
306                    getService().deleteLayoutRevisions(layoutSetBranchId, plid);
307            }
308    
309            public static void deleteLayoutRevisions(long layoutSetBranchId,
310                    long layoutBranchId, long plid)
311                    throws com.liferay.portal.kernel.exception.PortalException,
312                            com.liferay.portal.kernel.exception.SystemException {
313                    getService()
314                            .deleteLayoutRevisions(layoutSetBranchId, layoutBranchId, plid);
315            }
316    
317            public static void deleteLayoutSetBranchLayoutRevisions(
318                    long layoutSetBranchId)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException {
321                    getService().deleteLayoutSetBranchLayoutRevisions(layoutSetBranchId);
322            }
323    
324            public static com.liferay.portal.model.LayoutRevision fetchLastLayoutRevision(
325                    long plid, boolean head)
326                    throws com.liferay.portal.kernel.exception.SystemException {
327                    return getService().fetchLastLayoutRevision(plid, head);
328            }
329    
330            public static com.liferay.portal.model.LayoutRevision fetchLatestLayoutRevision(
331                    long layoutSetBranchId, long plid)
332                    throws com.liferay.portal.kernel.exception.SystemException {
333                    return getService().fetchLatestLayoutRevision(layoutSetBranchId, plid);
334            }
335    
336            public static com.liferay.portal.model.LayoutRevision fetchLayoutRevision(
337                    long layoutSetBranchId, boolean head, long plid)
338                    throws com.liferay.portal.kernel.exception.SystemException {
339                    return getService().fetchLayoutRevision(layoutSetBranchId, head, plid);
340            }
341    
342            public static java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
343                    long layoutSetBranchId, long parentLayoutRevisionId, long plid)
344                    throws com.liferay.portal.kernel.exception.SystemException {
345                    return getService()
346                                       .getChildLayoutRevisions(layoutSetBranchId,
347                            parentLayoutRevisionId, plid);
348            }
349    
350            public static java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
351                    long layoutSetBranchId, long parentLayoutRevision, long plid,
352                    int start, int end,
353                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
354                    throws com.liferay.portal.kernel.exception.SystemException {
355                    return getService()
356                                       .getChildLayoutRevisions(layoutSetBranchId,
357                            parentLayoutRevision, plid, start, end, orderByComparator);
358            }
359    
360            public static int getChildLayoutRevisionsCount(long layoutSetBranchId,
361                    long parentLayoutRevision, long plid)
362                    throws com.liferay.portal.kernel.exception.SystemException {
363                    return getService()
364                                       .getChildLayoutRevisionsCount(layoutSetBranchId,
365                            parentLayoutRevision, plid);
366            }
367    
368            public static com.liferay.portal.model.LayoutRevision getLayoutRevision(
369                    long layoutSetBranchId, long plid, boolean head)
370                    throws com.liferay.portal.kernel.exception.PortalException,
371                            com.liferay.portal.kernel.exception.SystemException {
372                    return getService().getLayoutRevision(layoutSetBranchId, plid, head);
373            }
374    
375            public static com.liferay.portal.model.LayoutRevision getLayoutRevision(
376                    long layoutSetBranchId, long layoutBranchId, long plid)
377                    throws com.liferay.portal.kernel.exception.PortalException,
378                            com.liferay.portal.kernel.exception.SystemException {
379                    return getService()
380                                       .getLayoutRevision(layoutSetBranchId, layoutBranchId, plid);
381            }
382    
383            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
384                    long plid) throws com.liferay.portal.kernel.exception.SystemException {
385                    return getService().getLayoutRevisions(plid);
386            }
387    
388            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
389                    long layoutSetBranchId, boolean head)
390                    throws com.liferay.portal.kernel.exception.SystemException {
391                    return getService().getLayoutRevisions(layoutSetBranchId, head);
392            }
393    
394            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
395                    long layoutSetBranchId, int status)
396                    throws com.liferay.portal.kernel.exception.SystemException {
397                    return getService().getLayoutRevisions(layoutSetBranchId, status);
398            }
399    
400            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
401                    long layoutSetBranchId, long plid)
402                    throws com.liferay.portal.kernel.exception.SystemException {
403                    return getService().getLayoutRevisions(layoutSetBranchId, plid);
404            }
405    
406            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
407                    long layoutSetBranchId, long plid, int status)
408                    throws com.liferay.portal.kernel.exception.SystemException {
409                    return getService().getLayoutRevisions(layoutSetBranchId, plid, status);
410            }
411    
412            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
413                    long layoutSetBranchId, long plid, int start, int end,
414                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
415                    throws com.liferay.portal.kernel.exception.SystemException {
416                    return getService()
417                                       .getLayoutRevisions(layoutSetBranchId, plid, start, end,
418                            orderByComparator);
419            }
420    
421            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
422                    long layoutSetBranchId, long layoutBranchId, long plid, int start,
423                    int end,
424                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
425                    throws com.liferay.portal.kernel.exception.SystemException {
426                    return getService()
427                                       .getLayoutRevisions(layoutSetBranchId, layoutBranchId, plid,
428                            start, end, orderByComparator);
429            }
430    
431            public static int getLayoutRevisionsCount(long layoutSetBranchId,
432                    long layoutBranchId, long plid)
433                    throws com.liferay.portal.kernel.exception.SystemException {
434                    return getService()
435                                       .getLayoutRevisionsCount(layoutSetBranchId, layoutBranchId,
436                            plid);
437            }
438    
439            public static com.liferay.portal.model.LayoutRevision updateLayoutRevision(
440                    long userId, long layoutRevisionId, long layoutBranchId,
441                    java.lang.String name, java.lang.String title,
442                    java.lang.String description, java.lang.String keywords,
443                    java.lang.String robots, java.lang.String typeSettings,
444                    boolean iconImage, long iconImageId, java.lang.String themeId,
445                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
446                    java.lang.String wapColorSchemeId, java.lang.String css,
447                    com.liferay.portal.service.ServiceContext serviceContext)
448                    throws com.liferay.portal.kernel.exception.PortalException,
449                            com.liferay.portal.kernel.exception.SystemException {
450                    return getService()
451                                       .updateLayoutRevision(userId, layoutRevisionId,
452                            layoutBranchId, name, title, description, keywords, robots,
453                            typeSettings, iconImage, iconImageId, themeId, colorSchemeId,
454                            wapThemeId, wapColorSchemeId, css, serviceContext);
455            }
456    
457            public static com.liferay.portal.model.LayoutRevision updateStatus(
458                    long userId, long layoutRevisionId, int status,
459                    com.liferay.portal.service.ServiceContext serviceContext)
460                    throws com.liferay.portal.kernel.exception.PortalException,
461                            com.liferay.portal.kernel.exception.SystemException {
462                    return getService()
463                                       .updateStatus(userId, layoutRevisionId, status,
464                            serviceContext);
465            }
466    
467            public static LayoutRevisionLocalService getService() {
468                    if (_service == null) {
469                            _service = (LayoutRevisionLocalService)PortalBeanLocatorUtil.locate(LayoutRevisionLocalService.class.getName());
470    
471                            ReferenceRegistry.registerReference(LayoutRevisionLocalServiceUtil.class,
472                                    "_service");
473                    }
474    
475                    return _service;
476            }
477    
478            /**
479             * @deprecated As of 6.2.0
480             */
481            public void setService(LayoutRevisionLocalService service) {
482            }
483    
484            private static LayoutRevisionLocalService _service;
485    }