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