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            public static com.liferay.portal.model.LayoutSet getLayoutSet(
203                    long groupId, boolean privateLayout)
204                    throws com.liferay.portal.kernel.exception.PortalException {
205                    return getService().getLayoutSet(groupId, privateLayout);
206            }
207    
208            /**
209            * Returns the layout set with the primary key.
210            *
211            * @param layoutSetId the primary key of the layout set
212            * @return the layout set
213            * @throws PortalException if a layout set with the primary key could not be found
214            */
215            public static com.liferay.portal.model.LayoutSet getLayoutSet(
216                    long layoutSetId)
217                    throws com.liferay.portal.kernel.exception.PortalException {
218                    return getService().getLayoutSet(layoutSetId);
219            }
220    
221            public static com.liferay.portal.model.LayoutSet getLayoutSet(
222                    java.lang.String virtualHostname)
223                    throws com.liferay.portal.kernel.exception.PortalException {
224                    return getService().getLayoutSet(virtualHostname);
225            }
226    
227            /**
228            * Returns a range of all the layout sets.
229            *
230            * <p>
231            * 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.
232            * </p>
233            *
234            * @param start the lower bound of the range of layout sets
235            * @param end the upper bound of the range of layout sets (not inclusive)
236            * @return the range of layout sets
237            */
238            public static java.util.List<com.liferay.portal.model.LayoutSet> getLayoutSets(
239                    int start, int end) {
240                    return getService().getLayoutSets(start, end);
241            }
242    
243            public static java.util.List<com.liferay.portal.model.LayoutSet> getLayoutSetsByLayoutSetPrototypeUuid(
244                    java.lang.String layoutSetPrototypeUuid) {
245                    return getService()
246                                       .getLayoutSetsByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
247            }
248    
249            /**
250            * Returns the number of layout sets.
251            *
252            * @return the number of layout sets
253            */
254            public static int getLayoutSetsCount() {
255                    return getService().getLayoutSetsCount();
256            }
257    
258            /**
259            * Returns the OSGi service identifier.
260            *
261            * @return the OSGi service identifier
262            */
263            public static java.lang.String getOSGiServiceIdentifier() {
264                    return getService().getOSGiServiceIdentifier();
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            * Updates the layout set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
275            *
276            * @param layoutSet the layout set
277            * @return the layout set that was updated
278            */
279            public static com.liferay.portal.model.LayoutSet updateLayoutSet(
280                    com.liferay.portal.model.LayoutSet layoutSet) {
281                    return getService().updateLayoutSet(layoutSet);
282            }
283    
284            /**
285            * Updates the state of the layout set prototype link.
286            *
287            * <p>
288            * This method can disable the layout set prototype's link by setting
289            * <code>layoutSetPrototypeLinkEnabled</code> to <code>false</code>.
290            * However, this method can only enable the layout set prototype's link if
291            * the layout set prototype's current uuid is not <code>null</code>. Setting
292            * the <code>layoutSetPrototypeLinkEnabled</code> to <code>true</code> when
293            * the layout set prototype's current uuid is <code>null</code> will have no
294            * effect.
295            * </p>
296            *
297            * @param groupId the primary key of the group
298            * @param privateLayout whether the layout set is private to the group
299            * @param layoutSetPrototypeLinkEnabled whether the layout set
300            prototype is link enabled
301            * @deprecated As of 6.1.0, replaced by {@link
302            #updateLayoutSetPrototypeLinkEnabled(long, boolean, boolean,
303            String)}
304            */
305            @Deprecated
306            public static void updateLayoutSetPrototypeLinkEnabled(long groupId,
307                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled)
308                    throws com.liferay.portal.kernel.exception.PortalException {
309                    getService()
310                            .updateLayoutSetPrototypeLinkEnabled(groupId, privateLayout,
311                            layoutSetPrototypeLinkEnabled);
312            }
313    
314            /**
315            * Updates the state of the layout set prototype link.
316            *
317            * @param groupId the primary key of the group
318            * @param privateLayout whether the layout set is private to the group
319            * @param layoutSetPrototypeLinkEnabled whether the layout set prototype is
320            link enabled
321            * @param layoutSetPrototypeUuid the uuid of the layout set prototype to
322            link with
323            */
324            public static void updateLayoutSetPrototypeLinkEnabled(long groupId,
325                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled,
326                    java.lang.String layoutSetPrototypeUuid)
327                    throws com.liferay.portal.kernel.exception.PortalException {
328                    getService()
329                            .updateLayoutSetPrototypeLinkEnabled(groupId, privateLayout,
330                            layoutSetPrototypeLinkEnabled, layoutSetPrototypeUuid);
331            }
332    
333            public static com.liferay.portal.model.LayoutSet updateLogo(long groupId,
334                    boolean privateLayout, boolean logo, byte[] bytes)
335                    throws com.liferay.portal.kernel.exception.PortalException {
336                    return getService().updateLogo(groupId, privateLayout, logo, bytes);
337            }
338    
339            public static com.liferay.portal.model.LayoutSet updateLogo(long groupId,
340                    boolean privateLayout, boolean logo, java.io.File file)
341                    throws com.liferay.portal.kernel.exception.PortalException {
342                    return getService().updateLogo(groupId, privateLayout, logo, file);
343            }
344    
345            public static com.liferay.portal.model.LayoutSet updateLogo(long groupId,
346                    boolean privateLayout, boolean logo, java.io.InputStream is)
347                    throws com.liferay.portal.kernel.exception.PortalException {
348                    return getService().updateLogo(groupId, privateLayout, logo, is);
349            }
350    
351            public static com.liferay.portal.model.LayoutSet updateLogo(long groupId,
352                    boolean privateLayout, boolean logo, java.io.InputStream is,
353                    boolean cleanUpStream)
354                    throws com.liferay.portal.kernel.exception.PortalException {
355                    return getService()
356                                       .updateLogo(groupId, privateLayout, logo, is, cleanUpStream);
357            }
358    
359            public static com.liferay.portal.model.LayoutSet updateLookAndFeel(
360                    long groupId, boolean privateLayout, java.lang.String themeId,
361                    java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
362                    throws com.liferay.portal.kernel.exception.PortalException {
363                    return getService()
364                                       .updateLookAndFeel(groupId, privateLayout, themeId,
365                            colorSchemeId, css, wapTheme);
366            }
367    
368            public static void updateLookAndFeel(long groupId,
369                    java.lang.String themeId, java.lang.String colorSchemeId,
370                    java.lang.String css, boolean wapTheme)
371                    throws com.liferay.portal.kernel.exception.PortalException {
372                    getService()
373                            .updateLookAndFeel(groupId, themeId, colorSchemeId, css, wapTheme);
374            }
375    
376            public static com.liferay.portal.model.LayoutSet updatePageCount(
377                    long groupId, boolean privateLayout)
378                    throws com.liferay.portal.kernel.exception.PortalException {
379                    return getService().updatePageCount(groupId, privateLayout);
380            }
381    
382            public static com.liferay.portal.model.LayoutSet updateSettings(
383                    long groupId, boolean privateLayout, java.lang.String settings)
384                    throws com.liferay.portal.kernel.exception.PortalException {
385                    return getService().updateSettings(groupId, privateLayout, settings);
386            }
387    
388            public static com.liferay.portal.model.LayoutSet updateVirtualHost(
389                    long groupId, boolean privateLayout, java.lang.String virtualHostname)
390                    throws com.liferay.portal.kernel.exception.PortalException {
391                    return getService()
392                                       .updateVirtualHost(groupId, privateLayout, virtualHostname);
393            }
394    
395            public static LayoutSetLocalService getService() {
396                    if (_service == null) {
397                            _service = (LayoutSetLocalService)PortalBeanLocatorUtil.locate(LayoutSetLocalService.class.getName());
398    
399                            ReferenceRegistry.registerReference(LayoutSetLocalServiceUtil.class,
400                                    "_service");
401                    }
402    
403                    return _service;
404            }
405    
406            /**
407             * @deprecated As of 6.2.0
408             */
409            @Deprecated
410            public void setService(LayoutSetLocalService service) {
411            }
412    
413            private static LayoutSetLocalService _service;
414    }