001    /**
002     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portal.service;
016    
017    import aQute.bnd.annotation.ProviderType;
018    
019    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
020    import com.liferay.portal.kernel.util.ReferenceRegistry;
021    
022    /**
023     * Provides the local service utility for LayoutSet. This utility wraps
024     * {@link com.liferay.portal.service.impl.LayoutSetLocalServiceImpl} 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 LayoutSetLocalService
032     * @see com.liferay.portal.service.base.LayoutSetLocalServiceBaseImpl
033     * @see com.liferay.portal.service.impl.LayoutSetLocalServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class LayoutSetLocalServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutSetLocalServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043            public static com.liferay.portal.model.LayoutSet addLayoutSet(
044                    long groupId, boolean privateLayout)
045                    throws com.liferay.portal.kernel.exception.PortalException {
046                    return getService().addLayoutSet(groupId, privateLayout);
047            }
048    
049            /**
050            * Adds the layout set to the database. Also notifies the appropriate model listeners.
051            *
052            * @param layoutSet the layout set
053            * @return the layout set that was added
054            */
055            public static com.liferay.portal.model.LayoutSet addLayoutSet(
056                    com.liferay.portal.model.LayoutSet layoutSet) {
057                    return getService().addLayoutSet(layoutSet);
058            }
059    
060            /**
061            * Creates a new layout set with the primary key. Does not add the layout set to the database.
062            *
063            * @param layoutSetId the primary key for the new layout set
064            * @return the new layout set
065            */
066            public static com.liferay.portal.model.LayoutSet createLayoutSet(
067                    long layoutSetId) {
068                    return getService().createLayoutSet(layoutSetId);
069            }
070    
071            public static void deleteLayoutSet(long groupId, boolean privateLayout,
072                    com.liferay.portal.service.ServiceContext serviceContext)
073                    throws com.liferay.portal.kernel.exception.PortalException {
074                    getService().deleteLayoutSet(groupId, privateLayout, serviceContext);
075            }
076    
077            /**
078            * Deletes the layout set from the database. Also notifies the appropriate model listeners.
079            *
080            * @param layoutSet the layout set
081            * @return the layout set that was removed
082            */
083            public static com.liferay.portal.model.LayoutSet deleteLayoutSet(
084                    com.liferay.portal.model.LayoutSet layoutSet) {
085                    return getService().deleteLayoutSet(layoutSet);
086            }
087    
088            /**
089            * Deletes the layout set with the primary key from the database. Also notifies the appropriate model listeners.
090            *
091            * @param layoutSetId the primary key of the layout set
092            * @return the layout set that was removed
093            * @throws PortalException if a layout set with the primary key could not be found
094            */
095            public static com.liferay.portal.model.LayoutSet deleteLayoutSet(
096                    long layoutSetId)
097                    throws com.liferay.portal.kernel.exception.PortalException {
098                    return getService().deleteLayoutSet(layoutSetId);
099            }
100    
101            /**
102            * @throws PortalException
103            */
104            public static com.liferay.portal.model.PersistedModel deletePersistedModel(
105                    com.liferay.portal.model.PersistedModel persistedModel)
106                    throws com.liferay.portal.kernel.exception.PortalException {
107                    return getService().deletePersistedModel(persistedModel);
108            }
109    
110            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
111                    return getService().dynamicQuery();
112            }
113    
114            /**
115            * Performs a dynamic query on the database and returns the matching rows.
116            *
117            * @param dynamicQuery the dynamic query
118            * @return the matching rows
119            */
120            public static <T> java.util.List<T> dynamicQuery(
121                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
122                    return getService().dynamicQuery(dynamicQuery);
123            }
124    
125            /**
126            * Performs a dynamic query on the database and returns a range of the matching rows.
127            *
128            * <p>
129            * 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.LayoutSetModelImpl}. 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.
130            * </p>
131            *
132            * @param dynamicQuery the dynamic query
133            * @param start the lower bound of the range of model instances
134            * @param end the upper bound of the range of model instances (not inclusive)
135            * @return the range of matching rows
136            */
137            public static <T> java.util.List<T> dynamicQuery(
138                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
139                    int end) {
140                    return getService().dynamicQuery(dynamicQuery, start, end);
141            }
142    
143            /**
144            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
145            *
146            * <p>
147            * 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.LayoutSetModelImpl}. 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.
148            * </p>
149            *
150            * @param dynamicQuery the dynamic query
151            * @param start the lower bound of the range of model instances
152            * @param end the upper bound of the range of model instances (not inclusive)
153            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
154            * @return the ordered range of matching rows
155            */
156            public static <T> java.util.List<T> dynamicQuery(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
158                    int end,
159                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
160                    return getService()
161                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
162            }
163    
164            /**
165            * Returns the number of rows matching the dynamic query.
166            *
167            * @param dynamicQuery the dynamic query
168            * @return the number of rows matching the dynamic query
169            */
170            public static long dynamicQueryCount(
171                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
172                    return getService().dynamicQueryCount(dynamicQuery);
173            }
174    
175            /**
176            * Returns the number of rows matching the dynamic query.
177            *
178            * @param dynamicQuery the dynamic query
179            * @param projection the projection to apply to the query
180            * @return the number of rows matching the dynamic query
181            */
182            public static long dynamicQueryCount(
183                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
184                    com.liferay.portal.kernel.dao.orm.Projection projection) {
185                    return getService().dynamicQueryCount(dynamicQuery, projection);
186            }
187    
188            public static com.liferay.portal.model.LayoutSet fetchLayoutSet(
189                    long layoutSetId) {
190                    return getService().fetchLayoutSet(layoutSetId);
191            }
192    
193            public static com.liferay.portal.model.LayoutSet fetchLayoutSet(
194                    java.lang.String virtualHostname) {
195                    return getService().fetchLayoutSet(virtualHostname);
196            }
197    
198            public static com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
199                    return getService().getActionableDynamicQuery();
200            }
201    
202            /**
203            * Returns the Spring bean ID for this bean.
204            *
205            * @return the Spring bean ID for this bean
206            */
207            public static java.lang.String getBeanIdentifier() {
208                    return getService().getBeanIdentifier();
209            }
210    
211            public static com.liferay.portal.model.LayoutSet getLayoutSet(
212                    long groupId, boolean privateLayout)
213                    throws com.liferay.portal.kernel.exception.PortalException {
214                    return getService().getLayoutSet(groupId, privateLayout);
215            }
216    
217            /**
218            * Returns the layout set with the primary key.
219            *
220            * @param layoutSetId the primary key of the layout set
221            * @return the layout set
222            * @throws PortalException if a layout set with the primary key could not be found
223            */
224            public static com.liferay.portal.model.LayoutSet getLayoutSet(
225                    long layoutSetId)
226                    throws com.liferay.portal.kernel.exception.PortalException {
227                    return getService().getLayoutSet(layoutSetId);
228            }
229    
230            public static com.liferay.portal.model.LayoutSet getLayoutSet(
231                    java.lang.String virtualHostname)
232                    throws com.liferay.portal.kernel.exception.PortalException {
233                    return getService().getLayoutSet(virtualHostname);
234            }
235    
236            /**
237            * Returns a range of all the layout sets.
238            *
239            * <p>
240            * 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.LayoutSetModelImpl}. 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.
241            * </p>
242            *
243            * @param start the lower bound of the range of layout sets
244            * @param end the upper bound of the range of layout sets (not inclusive)
245            * @return the range of layout sets
246            */
247            public static java.util.List<com.liferay.portal.model.LayoutSet> getLayoutSets(
248                    int start, int end) {
249                    return getService().getLayoutSets(start, end);
250            }
251    
252            public static java.util.List<com.liferay.portal.model.LayoutSet> getLayoutSetsByLayoutSetPrototypeUuid(
253                    java.lang.String layoutSetPrototypeUuid) {
254                    return getService()
255                                       .getLayoutSetsByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
256            }
257    
258            /**
259            * Returns the number of layout sets.
260            *
261            * @return the number of layout sets
262            */
263            public static int getLayoutSetsCount() {
264                    return getService().getLayoutSetsCount();
265            }
266    
267            public static com.liferay.portal.model.PersistedModel getPersistedModel(
268                    java.io.Serializable primaryKeyObj)
269                    throws com.liferay.portal.kernel.exception.PortalException {
270                    return getService().getPersistedModel(primaryKeyObj);
271            }
272    
273            /**
274            * Sets the Spring bean ID for this bean.
275            *
276            * @param beanIdentifier the Spring bean ID for this bean
277            */
278            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
279                    getService().setBeanIdentifier(beanIdentifier);
280            }
281    
282            /**
283            * Updates the layout set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
284            *
285            * @param layoutSet the layout set
286            * @return the layout set that was updated
287            */
288            public static com.liferay.portal.model.LayoutSet updateLayoutSet(
289                    com.liferay.portal.model.LayoutSet layoutSet) {
290                    return getService().updateLayoutSet(layoutSet);
291            }
292    
293            /**
294            * Updates the state of the layout set prototype link.
295            *
296            * <p>
297            * This method can disable the layout set prototype's link by setting
298            * <code>layoutSetPrototypeLinkEnabled</code> to <code>false</code>.
299            * However, this method can only enable the layout set prototype's link if
300            * the layout set prototype's current uuid is not <code>null</code>. Setting
301            * the <code>layoutSetPrototypeLinkEnabled</code> to <code>true</code> when
302            * the layout set prototype's current uuid is <code>null</code> will have no
303            * effect.
304            * </p>
305            *
306            * @param groupId the primary key of the group
307            * @param privateLayout whether the layout set is private to the group
308            * @param layoutSetPrototypeLinkEnabled whether the layout set
309            prototype is link enabled
310            * @throws PortalException if a portal exception occurred
311            * @deprecated As of 6.1.0, replaced by {@link
312            #updateLayoutSetPrototypeLinkEnabled(long, boolean, boolean,
313            String)}
314            */
315            @Deprecated
316            public static void updateLayoutSetPrototypeLinkEnabled(long groupId,
317                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled)
318                    throws com.liferay.portal.kernel.exception.PortalException {
319                    getService()
320                            .updateLayoutSetPrototypeLinkEnabled(groupId, privateLayout,
321                            layoutSetPrototypeLinkEnabled);
322            }
323    
324            /**
325            * Updates the state of the layout set prototype link.
326            *
327            * @param groupId the primary key of the group
328            * @param privateLayout whether the layout set is private to the group
329            * @param layoutSetPrototypeLinkEnabled whether the layout set prototype is
330            link enabled
331            * @param layoutSetPrototypeUuid the uuid of the layout set prototype to
332            link with
333            * @throws PortalException if a portal exception occurred
334            */
335            public static void updateLayoutSetPrototypeLinkEnabled(long groupId,
336                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled,
337                    java.lang.String layoutSetPrototypeUuid)
338                    throws com.liferay.portal.kernel.exception.PortalException {
339                    getService()
340                            .updateLayoutSetPrototypeLinkEnabled(groupId, privateLayout,
341                            layoutSetPrototypeLinkEnabled, layoutSetPrototypeUuid);
342            }
343    
344            public static com.liferay.portal.model.LayoutSet updateLogo(long groupId,
345                    boolean privateLayout, boolean logo, byte[] bytes)
346                    throws com.liferay.portal.kernel.exception.PortalException {
347                    return getService().updateLogo(groupId, privateLayout, logo, bytes);
348            }
349    
350            public static com.liferay.portal.model.LayoutSet updateLogo(long groupId,
351                    boolean privateLayout, boolean logo, java.io.File file)
352                    throws com.liferay.portal.kernel.exception.PortalException {
353                    return getService().updateLogo(groupId, privateLayout, logo, file);
354            }
355    
356            public static com.liferay.portal.model.LayoutSet updateLogo(long groupId,
357                    boolean privateLayout, boolean logo, java.io.InputStream is)
358                    throws com.liferay.portal.kernel.exception.PortalException {
359                    return getService().updateLogo(groupId, privateLayout, logo, is);
360            }
361    
362            public static com.liferay.portal.model.LayoutSet updateLogo(long groupId,
363                    boolean privateLayout, boolean logo, java.io.InputStream is,
364                    boolean cleanUpStream)
365                    throws com.liferay.portal.kernel.exception.PortalException {
366                    return getService()
367                                       .updateLogo(groupId, privateLayout, logo, is, cleanUpStream);
368            }
369    
370            public static com.liferay.portal.model.LayoutSet updateLookAndFeel(
371                    long groupId, boolean privateLayout, java.lang.String themeId,
372                    java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
373                    throws com.liferay.portal.kernel.exception.PortalException {
374                    return getService()
375                                       .updateLookAndFeel(groupId, privateLayout, themeId,
376                            colorSchemeId, css, wapTheme);
377            }
378    
379            public static void updateLookAndFeel(long groupId,
380                    java.lang.String themeId, java.lang.String colorSchemeId,
381                    java.lang.String css, boolean wapTheme)
382                    throws com.liferay.portal.kernel.exception.PortalException {
383                    getService()
384                            .updateLookAndFeel(groupId, themeId, colorSchemeId, css, wapTheme);
385            }
386    
387            public static com.liferay.portal.model.LayoutSet updatePageCount(
388                    long groupId, boolean privateLayout)
389                    throws com.liferay.portal.kernel.exception.PortalException {
390                    return getService().updatePageCount(groupId, privateLayout);
391            }
392    
393            public static com.liferay.portal.model.LayoutSet updateSettings(
394                    long groupId, boolean privateLayout, java.lang.String settings)
395                    throws com.liferay.portal.kernel.exception.PortalException {
396                    return getService().updateSettings(groupId, privateLayout, settings);
397            }
398    
399            public static com.liferay.portal.model.LayoutSet updateVirtualHost(
400                    long groupId, boolean privateLayout, java.lang.String virtualHostname)
401                    throws com.liferay.portal.kernel.exception.PortalException {
402                    return getService()
403                                       .updateVirtualHost(groupId, privateLayout, virtualHostname);
404            }
405    
406            public static LayoutSetLocalService getService() {
407                    if (_service == null) {
408                            _service = (LayoutSetLocalService)PortalBeanLocatorUtil.locate(LayoutSetLocalService.class.getName());
409    
410                            ReferenceRegistry.registerReference(LayoutSetLocalServiceUtil.class,
411                                    "_service");
412                    }
413    
414                    return _service;
415            }
416    
417            /**
418             * @deprecated As of 6.2.0
419             */
420            @Deprecated
421            public void setService(LayoutSetLocalService service) {
422            }
423    
424            private static LayoutSetLocalService _service;
425    }