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