001    /**
002     * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
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            public static com.liferay.portal.model.LayoutRevision fetchLayoutRevision(
164                    long layoutRevisionId)
165                    throws com.liferay.portal.kernel.exception.SystemException {
166                    return getService().fetchLayoutRevision(layoutRevisionId);
167            }
168    
169            /**
170            * Returns the layout revision with the primary key.
171            *
172            * @param layoutRevisionId the primary key of the layout revision
173            * @return the layout revision
174            * @throws PortalException if a layout revision with the primary key could not be found
175            * @throws SystemException if a system exception occurred
176            */
177            public static com.liferay.portal.model.LayoutRevision getLayoutRevision(
178                    long layoutRevisionId)
179                    throws com.liferay.portal.kernel.exception.PortalException,
180                            com.liferay.portal.kernel.exception.SystemException {
181                    return getService().getLayoutRevision(layoutRevisionId);
182            }
183    
184            public static com.liferay.portal.model.PersistedModel getPersistedModel(
185                    java.io.Serializable primaryKeyObj)
186                    throws com.liferay.portal.kernel.exception.PortalException,
187                            com.liferay.portal.kernel.exception.SystemException {
188                    return getService().getPersistedModel(primaryKeyObj);
189            }
190    
191            /**
192            * Returns a range of all the layout revisions.
193            *
194            * <p>
195            * 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.
196            * </p>
197            *
198            * @param start the lower bound of the range of layout revisions
199            * @param end the upper bound of the range of layout revisions (not inclusive)
200            * @return the range of layout revisions
201            * @throws SystemException if a system exception occurred
202            */
203            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
204                    int start, int end)
205                    throws com.liferay.portal.kernel.exception.SystemException {
206                    return getService().getLayoutRevisions(start, end);
207            }
208    
209            /**
210            * Returns the number of layout revisions.
211            *
212            * @return the number of layout revisions
213            * @throws SystemException if a system exception occurred
214            */
215            public static int getLayoutRevisionsCount()
216                    throws com.liferay.portal.kernel.exception.SystemException {
217                    return getService().getLayoutRevisionsCount();
218            }
219    
220            /**
221            * Updates the layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
222            *
223            * @param layoutRevision the layout revision
224            * @return the layout revision that was updated
225            * @throws SystemException if a system exception occurred
226            */
227            public static com.liferay.portal.model.LayoutRevision updateLayoutRevision(
228                    com.liferay.portal.model.LayoutRevision layoutRevision)
229                    throws com.liferay.portal.kernel.exception.SystemException {
230                    return getService().updateLayoutRevision(layoutRevision);
231            }
232    
233            /**
234            * Updates the layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
235            *
236            * @param layoutRevision the layout revision
237            * @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.
238            * @return the layout revision that was updated
239            * @throws SystemException if a system exception occurred
240            */
241            public static com.liferay.portal.model.LayoutRevision updateLayoutRevision(
242                    com.liferay.portal.model.LayoutRevision layoutRevision, boolean merge)
243                    throws com.liferay.portal.kernel.exception.SystemException {
244                    return getService().updateLayoutRevision(layoutRevision, merge);
245            }
246    
247            /**
248            * Returns the Spring bean ID for this bean.
249            *
250            * @return the Spring bean ID for this bean
251            */
252            public static java.lang.String getBeanIdentifier() {
253                    return getService().getBeanIdentifier();
254            }
255    
256            /**
257            * Sets the Spring bean ID for this bean.
258            *
259            * @param beanIdentifier the Spring bean ID for this bean
260            */
261            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
262                    getService().setBeanIdentifier(beanIdentifier);
263            }
264    
265            public static com.liferay.portal.model.LayoutRevision addLayoutRevision(
266                    long userId, long layoutSetBranchId, long layoutBranchId,
267                    long parentLayoutRevisionId, boolean head, long plid,
268                    boolean privateLayout, java.lang.String name, java.lang.String title,
269                    java.lang.String description, java.lang.String keywords,
270                    java.lang.String robots, java.lang.String typeSettings,
271                    boolean iconImage, long iconImageId, java.lang.String themeId,
272                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
273                    java.lang.String wapColorSchemeId, java.lang.String css,
274                    com.liferay.portal.service.ServiceContext serviceContext)
275                    throws com.liferay.portal.kernel.exception.PortalException,
276                            com.liferay.portal.kernel.exception.SystemException {
277                    return getService()
278                                       .addLayoutRevision(userId, layoutSetBranchId,
279                            layoutBranchId, parentLayoutRevisionId, head, plid, privateLayout,
280                            name, title, description, keywords, robots, typeSettings,
281                            iconImage, iconImageId, themeId, colorSchemeId, wapThemeId,
282                            wapColorSchemeId, css, serviceContext);
283            }
284    
285            public static void deleteLayoutLayoutRevisions(long plid)
286                    throws com.liferay.portal.kernel.exception.PortalException,
287                            com.liferay.portal.kernel.exception.SystemException {
288                    getService().deleteLayoutLayoutRevisions(plid);
289            }
290    
291            public static void deleteLayoutRevisions(long layoutSetBranchId, long plid)
292                    throws com.liferay.portal.kernel.exception.PortalException,
293                            com.liferay.portal.kernel.exception.SystemException {
294                    getService().deleteLayoutRevisions(layoutSetBranchId, plid);
295            }
296    
297            public static void deleteLayoutRevisions(long layoutSetBranchId,
298                    long layoutBranchId, long plid)
299                    throws com.liferay.portal.kernel.exception.PortalException,
300                            com.liferay.portal.kernel.exception.SystemException {
301                    getService()
302                            .deleteLayoutRevisions(layoutSetBranchId, layoutBranchId, plid);
303            }
304    
305            public static void deleteLayoutSetBranchLayoutRevisions(
306                    long layoutSetBranchId)
307                    throws com.liferay.portal.kernel.exception.PortalException,
308                            com.liferay.portal.kernel.exception.SystemException {
309                    getService().deleteLayoutSetBranchLayoutRevisions(layoutSetBranchId);
310            }
311    
312            public static java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
313                    long layoutSetBranchId, long parentLayoutRevisionId, long plid)
314                    throws com.liferay.portal.kernel.exception.SystemException {
315                    return getService()
316                                       .getChildLayoutRevisions(layoutSetBranchId,
317                            parentLayoutRevisionId, plid);
318            }
319    
320            public static java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
321                    long layoutSetBranchId, long parentLayoutRevision, long plid,
322                    int start, int end,
323                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
324                    throws com.liferay.portal.kernel.exception.SystemException {
325                    return getService()
326                                       .getChildLayoutRevisions(layoutSetBranchId,
327                            parentLayoutRevision, plid, start, end, orderByComparator);
328            }
329    
330            public static int getChildLayoutRevisionsCount(long layoutSetBranchId,
331                    long parentLayoutRevision, long plid)
332                    throws com.liferay.portal.kernel.exception.SystemException {
333                    return getService()
334                                       .getChildLayoutRevisionsCount(layoutSetBranchId,
335                            parentLayoutRevision, plid);
336            }
337    
338            public static com.liferay.portal.model.LayoutRevision getLayoutRevision(
339                    long layoutSetBranchId, long plid, boolean head)
340                    throws com.liferay.portal.kernel.exception.PortalException,
341                            com.liferay.portal.kernel.exception.SystemException {
342                    return getService().getLayoutRevision(layoutSetBranchId, plid, head);
343            }
344    
345            public static com.liferay.portal.model.LayoutRevision getLayoutRevision(
346                    long layoutSetBranchId, long layoutBranchId, long plid)
347                    throws com.liferay.portal.kernel.exception.PortalException,
348                            com.liferay.portal.kernel.exception.SystemException {
349                    return getService()
350                                       .getLayoutRevision(layoutSetBranchId, layoutBranchId, plid);
351            }
352    
353            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
354                    long plid) throws com.liferay.portal.kernel.exception.SystemException {
355                    return getService().getLayoutRevisions(plid);
356            }
357    
358            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
359                    long layoutSetBranchId, boolean head)
360                    throws com.liferay.portal.kernel.exception.SystemException {
361                    return getService().getLayoutRevisions(layoutSetBranchId, head);
362            }
363    
364            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
365                    long layoutSetBranchId, int status)
366                    throws com.liferay.portal.kernel.exception.SystemException {
367                    return getService().getLayoutRevisions(layoutSetBranchId, status);
368            }
369    
370            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
371                    long layoutSetBranchId, long plid)
372                    throws com.liferay.portal.kernel.exception.SystemException {
373                    return getService().getLayoutRevisions(layoutSetBranchId, plid);
374            }
375    
376            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
377                    long layoutSetBranchId, long plid, int status)
378                    throws com.liferay.portal.kernel.exception.SystemException {
379                    return getService().getLayoutRevisions(layoutSetBranchId, plid, status);
380            }
381    
382            public static java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
383                    long layoutSetBranchId, long layoutBranchId, long plid, int start,
384                    int end,
385                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
386                    throws com.liferay.portal.kernel.exception.SystemException {
387                    return getService()
388                                       .getLayoutRevisions(layoutSetBranchId, layoutBranchId, plid,
389                            start, end, orderByComparator);
390            }
391    
392            public static int getLayoutRevisionsCount(long layoutSetBranchId,
393                    long layoutBranchId, long plid)
394                    throws com.liferay.portal.kernel.exception.SystemException {
395                    return getService()
396                                       .getLayoutRevisionsCount(layoutSetBranchId, layoutBranchId,
397                            plid);
398            }
399    
400            public static com.liferay.portal.model.LayoutRevision updateLayoutRevision(
401                    long userId, long layoutRevisionId, long layoutBranchId,
402                    java.lang.String name, java.lang.String title,
403                    java.lang.String description, java.lang.String keywords,
404                    java.lang.String robots, java.lang.String typeSettings,
405                    boolean iconImage, long iconImageId, java.lang.String themeId,
406                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
407                    java.lang.String wapColorSchemeId, java.lang.String css,
408                    com.liferay.portal.service.ServiceContext serviceContext)
409                    throws com.liferay.portal.kernel.exception.PortalException,
410                            com.liferay.portal.kernel.exception.SystemException {
411                    return getService()
412                                       .updateLayoutRevision(userId, layoutRevisionId,
413                            layoutBranchId, name, title, description, keywords, robots,
414                            typeSettings, iconImage, iconImageId, themeId, colorSchemeId,
415                            wapThemeId, wapColorSchemeId, css, serviceContext);
416            }
417    
418            public static com.liferay.portal.model.LayoutRevision updateStatus(
419                    long userId, long layoutRevisionId, int status,
420                    com.liferay.portal.service.ServiceContext serviceContext)
421                    throws com.liferay.portal.kernel.exception.PortalException,
422                            com.liferay.portal.kernel.exception.SystemException {
423                    return getService()
424                                       .updateStatus(userId, layoutRevisionId, status,
425                            serviceContext);
426            }
427    
428            public static LayoutRevisionLocalService getService() {
429                    if (_service == null) {
430                            _service = (LayoutRevisionLocalService)PortalBeanLocatorUtil.locate(LayoutRevisionLocalService.class.getName());
431    
432                            ReferenceRegistry.registerReference(LayoutRevisionLocalServiceUtil.class,
433                                    "_service");
434                            MethodCache.remove(LayoutRevisionLocalService.class);
435                    }
436    
437                    return _service;
438            }
439    
440            public void setService(LayoutRevisionLocalService service) {
441                    MethodCache.remove(LayoutRevisionLocalService.class);
442    
443                    _service = service;
444    
445                    ReferenceRegistry.registerReference(LayoutRevisionLocalServiceUtil.class,
446                            "_service");
447                    MethodCache.remove(LayoutRevisionLocalService.class);
448            }
449    
450            private static LayoutRevisionLocalService _service;
451    }