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.kernel.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.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery() {
044                    return getService().getActionableDynamicQuery();
045            }
046    
047            public static com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery() {
048                    return getService().dynamicQuery();
049            }
050    
051            public static com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery() {
052                    return getService().getIndexableActionableDynamicQuery();
053            }
054    
055            /**
056            * Adds the layout set to the database. Also notifies the appropriate model listeners.
057            *
058            * @param layoutSet the layout set
059            * @return the layout set that was added
060            */
061            public static com.liferay.portal.kernel.model.LayoutSet addLayoutSet(
062                    com.liferay.portal.kernel.model.LayoutSet layoutSet) {
063                    return getService().addLayoutSet(layoutSet);
064            }
065    
066            public static com.liferay.portal.kernel.model.LayoutSet addLayoutSet(
067                    long groupId, boolean privateLayout)
068                    throws com.liferay.portal.kernel.exception.PortalException {
069                    return getService().addLayoutSet(groupId, privateLayout);
070            }
071    
072            /**
073            * Creates a new layout set with the primary key. Does not add the layout set to the database.
074            *
075            * @param layoutSetId the primary key for the new layout set
076            * @return the new layout set
077            */
078            public static com.liferay.portal.kernel.model.LayoutSet createLayoutSet(
079                    long layoutSetId) {
080                    return getService().createLayoutSet(layoutSetId);
081            }
082    
083            /**
084            * Deletes the layout set from the database. Also notifies the appropriate model listeners.
085            *
086            * @param layoutSet the layout set
087            * @return the layout set that was removed
088            */
089            public static com.liferay.portal.kernel.model.LayoutSet deleteLayoutSet(
090                    com.liferay.portal.kernel.model.LayoutSet layoutSet) {
091                    return getService().deleteLayoutSet(layoutSet);
092            }
093    
094            /**
095            * Deletes the layout set with the primary key from the database. Also notifies the appropriate model listeners.
096            *
097            * @param layoutSetId the primary key of the layout set
098            * @return the layout set that was removed
099            * @throws PortalException if a layout set with the primary key could not be found
100            */
101            public static com.liferay.portal.kernel.model.LayoutSet deleteLayoutSet(
102                    long layoutSetId)
103                    throws com.liferay.portal.kernel.exception.PortalException {
104                    return getService().deleteLayoutSet(layoutSetId);
105            }
106    
107            public static com.liferay.portal.kernel.model.LayoutSet fetchLayoutSet(
108                    java.lang.String virtualHostname) {
109                    return getService().fetchLayoutSet(virtualHostname);
110            }
111    
112            public static com.liferay.portal.kernel.model.LayoutSet fetchLayoutSet(
113                    long layoutSetId) {
114                    return getService().fetchLayoutSet(layoutSetId);
115            }
116    
117            public static com.liferay.portal.kernel.model.LayoutSet getLayoutSet(
118                    java.lang.String virtualHostname)
119                    throws com.liferay.portal.kernel.exception.PortalException {
120                    return getService().getLayoutSet(virtualHostname);
121            }
122    
123            public static com.liferay.portal.kernel.model.LayoutSet getLayoutSet(
124                    long groupId, boolean privateLayout)
125                    throws com.liferay.portal.kernel.exception.PortalException {
126                    return getService().getLayoutSet(groupId, privateLayout);
127            }
128    
129            /**
130            * Returns the layout set with the primary key.
131            *
132            * @param layoutSetId the primary key of the layout set
133            * @return the layout set
134            * @throws PortalException if a layout set with the primary key could not be found
135            */
136            public static com.liferay.portal.kernel.model.LayoutSet getLayoutSet(
137                    long layoutSetId)
138                    throws com.liferay.portal.kernel.exception.PortalException {
139                    return getService().getLayoutSet(layoutSetId);
140            }
141    
142            /**
143            * Updates the layout set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
144            *
145            * @param layoutSet the layout set
146            * @return the layout set that was updated
147            */
148            public static com.liferay.portal.kernel.model.LayoutSet updateLayoutSet(
149                    com.liferay.portal.kernel.model.LayoutSet layoutSet) {
150                    return getService().updateLayoutSet(layoutSet);
151            }
152    
153            public static com.liferay.portal.kernel.model.LayoutSet updateLogo(
154                    long groupId, boolean privateLayout, boolean logo, byte[] bytes)
155                    throws com.liferay.portal.kernel.exception.PortalException {
156                    return getService().updateLogo(groupId, privateLayout, logo, bytes);
157            }
158    
159            public static com.liferay.portal.kernel.model.LayoutSet updateLogo(
160                    long groupId, boolean privateLayout, boolean logo, java.io.File file)
161                    throws com.liferay.portal.kernel.exception.PortalException {
162                    return getService().updateLogo(groupId, privateLayout, logo, file);
163            }
164    
165            public static com.liferay.portal.kernel.model.LayoutSet updateLogo(
166                    long groupId, boolean privateLayout, boolean logo,
167                    java.io.InputStream is)
168                    throws com.liferay.portal.kernel.exception.PortalException {
169                    return getService().updateLogo(groupId, privateLayout, logo, is);
170            }
171    
172            public static com.liferay.portal.kernel.model.LayoutSet updateLogo(
173                    long groupId, boolean privateLayout, boolean logo,
174                    java.io.InputStream is, boolean cleanUpStream)
175                    throws com.liferay.portal.kernel.exception.PortalException {
176                    return getService()
177                                       .updateLogo(groupId, privateLayout, logo, is, cleanUpStream);
178            }
179    
180            public static com.liferay.portal.kernel.model.LayoutSet updateLookAndFeel(
181                    long groupId, boolean privateLayout, java.lang.String themeId,
182                    java.lang.String colorSchemeId, java.lang.String css)
183                    throws com.liferay.portal.kernel.exception.PortalException {
184                    return getService()
185                                       .updateLookAndFeel(groupId, privateLayout, themeId,
186                            colorSchemeId, css);
187            }
188    
189            public static com.liferay.portal.kernel.model.LayoutSet updatePageCount(
190                    long groupId, boolean privateLayout)
191                    throws com.liferay.portal.kernel.exception.PortalException {
192                    return getService().updatePageCount(groupId, privateLayout);
193            }
194    
195            public static com.liferay.portal.kernel.model.LayoutSet updateSettings(
196                    long groupId, boolean privateLayout, java.lang.String settings)
197                    throws com.liferay.portal.kernel.exception.PortalException {
198                    return getService().updateSettings(groupId, privateLayout, settings);
199            }
200    
201            public static com.liferay.portal.kernel.model.LayoutSet updateVirtualHost(
202                    long groupId, boolean privateLayout, java.lang.String virtualHostname)
203                    throws com.liferay.portal.kernel.exception.PortalException {
204                    return getService()
205                                       .updateVirtualHost(groupId, privateLayout, virtualHostname);
206            }
207    
208            /**
209            * @throws PortalException
210            */
211            public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
212                    com.liferay.portal.kernel.model.PersistedModel persistedModel)
213                    throws com.liferay.portal.kernel.exception.PortalException {
214                    return getService().deletePersistedModel(persistedModel);
215            }
216    
217            public static com.liferay.portal.kernel.model.PersistedModel getPersistedModel(
218                    java.io.Serializable primaryKeyObj)
219                    throws com.liferay.portal.kernel.exception.PortalException {
220                    return getService().getPersistedModel(primaryKeyObj);
221            }
222    
223            /**
224            * Returns the number of layout sets.
225            *
226            * @return the number of layout sets
227            */
228            public static int getLayoutSetsCount() {
229                    return getService().getLayoutSetsCount();
230            }
231    
232            /**
233            * Returns the OSGi service identifier.
234            *
235            * @return the OSGi service identifier
236            */
237            public static java.lang.String getOSGiServiceIdentifier() {
238                    return getService().getOSGiServiceIdentifier();
239            }
240    
241            /**
242            * Performs a dynamic query on the database and returns the matching rows.
243            *
244            * @param dynamicQuery the dynamic query
245            * @return the matching rows
246            */
247            public static <T> java.util.List<T> dynamicQuery(
248                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
249                    return getService().dynamicQuery(dynamicQuery);
250            }
251    
252            /**
253            * Performs a dynamic query on the database and returns a range of the matching rows.
254            *
255            * <p>
256            * 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.
257            * </p>
258            *
259            * @param dynamicQuery the dynamic query
260            * @param start the lower bound of the range of model instances
261            * @param end the upper bound of the range of model instances (not inclusive)
262            * @return the range of matching rows
263            */
264            public static <T> java.util.List<T> dynamicQuery(
265                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
266                    int end) {
267                    return getService().dynamicQuery(dynamicQuery, start, end);
268            }
269    
270            /**
271            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
272            *
273            * <p>
274            * 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.
275            * </p>
276            *
277            * @param dynamicQuery the dynamic query
278            * @param start the lower bound of the range of model instances
279            * @param end the upper bound of the range of model instances (not inclusive)
280            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
281            * @return the ordered range of matching rows
282            */
283            public static <T> java.util.List<T> dynamicQuery(
284                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
285                    int end,
286                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator) {
287                    return getService()
288                                       .dynamicQuery(dynamicQuery, start, end, orderByComparator);
289            }
290    
291            /**
292            * Returns a range of all the layout sets.
293            *
294            * <p>
295            * 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.
296            * </p>
297            *
298            * @param start the lower bound of the range of layout sets
299            * @param end the upper bound of the range of layout sets (not inclusive)
300            * @return the range of layout sets
301            */
302            public static java.util.List<com.liferay.portal.kernel.model.LayoutSet> getLayoutSets(
303                    int start, int end) {
304                    return getService().getLayoutSets(start, end);
305            }
306    
307            public static java.util.List<com.liferay.portal.kernel.model.LayoutSet> getLayoutSetsByLayoutSetPrototypeUuid(
308                    java.lang.String layoutSetPrototypeUuid) {
309                    return getService()
310                                       .getLayoutSetsByLayoutSetPrototypeUuid(layoutSetPrototypeUuid);
311            }
312    
313            /**
314            * Returns the number of rows matching the dynamic query.
315            *
316            * @param dynamicQuery the dynamic query
317            * @return the number of rows matching the dynamic query
318            */
319            public static long dynamicQueryCount(
320                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery) {
321                    return getService().dynamicQueryCount(dynamicQuery);
322            }
323    
324            /**
325            * Returns the number of rows matching the dynamic query.
326            *
327            * @param dynamicQuery the dynamic query
328            * @param projection the projection to apply to the query
329            * @return the number of rows matching the dynamic query
330            */
331            public static long dynamicQueryCount(
332                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
333                    com.liferay.portal.kernel.dao.orm.Projection projection) {
334                    return getService().dynamicQueryCount(dynamicQuery, projection);
335            }
336    
337            public static void deleteLayoutSet(long groupId, boolean privateLayout,
338                    ServiceContext serviceContext)
339                    throws com.liferay.portal.kernel.exception.PortalException {
340                    getService().deleteLayoutSet(groupId, privateLayout, serviceContext);
341            }
342    
343            /**
344            * Updates the state of the layout set prototype link.
345            *
346            * @param groupId the primary key of the group
347            * @param privateLayout whether the layout set is private to the group
348            * @param layoutSetPrototypeLinkEnabled whether the layout set prototype is
349            link enabled
350            * @param layoutSetPrototypeUuid the uuid of the layout set prototype to
351            link with
352            */
353            public static void updateLayoutSetPrototypeLinkEnabled(long groupId,
354                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled,
355                    java.lang.String layoutSetPrototypeUuid)
356                    throws com.liferay.portal.kernel.exception.PortalException {
357                    getService()
358                            .updateLayoutSetPrototypeLinkEnabled(groupId, privateLayout,
359                            layoutSetPrototypeLinkEnabled, layoutSetPrototypeUuid);
360            }
361    
362            public static void updateLookAndFeel(long groupId,
363                    java.lang.String themeId, java.lang.String colorSchemeId,
364                    java.lang.String css)
365                    throws com.liferay.portal.kernel.exception.PortalException {
366                    getService().updateLookAndFeel(groupId, themeId, colorSchemeId, css);
367            }
368    
369            public static LayoutSetLocalService getService() {
370                    if (_service == null) {
371                            _service = (LayoutSetLocalService)PortalBeanLocatorUtil.locate(LayoutSetLocalService.class.getName());
372    
373                            ReferenceRegistry.registerReference(LayoutSetLocalServiceUtil.class,
374                                    "_service");
375                    }
376    
377                    return _service;
378            }
379    
380            private static LayoutSetLocalService _service;
381    }