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