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.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.kernel.model.LayoutSet addLayoutSet(
056                    com.liferay.portal.kernel.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.kernel.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.kernel.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.kernel.model.LayoutSet deleteLayoutSet(
084                    com.liferay.portal.kernel.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.kernel.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.kernel.model.PersistedModel deletePersistedModel(
105                    com.liferay.portal.kernel.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.kernel.model.LayoutSet fetchLayoutSet(
189                    long layoutSetId) {
190                    return getService().fetchLayoutSet(layoutSetId);
191            }
192    
193            public static com.liferay.portal.kernel.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.kernel.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.kernel.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.kernel.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.kernel.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.kernel.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.kernel.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.kernel.model.LayoutSet updateLayoutSet(
284                    com.liferay.portal.kernel.model.LayoutSet layoutSet) {
285                    return getService().updateLayoutSet(layoutSet);
286            }
287    
288            /**
289            * Updates the state of the layout set prototype link.
290            *
291            * @param groupId the primary key of the group
292            * @param privateLayout whether the layout set is private to the group
293            * @param layoutSetPrototypeLinkEnabled whether the layout set prototype is
294            link enabled
295            * @param layoutSetPrototypeUuid the uuid of the layout set prototype to
296            link with
297            */
298            public static void updateLayoutSetPrototypeLinkEnabled(long groupId,
299                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled,
300                    java.lang.String layoutSetPrototypeUuid)
301                    throws com.liferay.portal.kernel.exception.PortalException {
302                    getService()
303                            .updateLayoutSetPrototypeLinkEnabled(groupId, privateLayout,
304                            layoutSetPrototypeLinkEnabled, layoutSetPrototypeUuid);
305            }
306    
307            public static com.liferay.portal.kernel.model.LayoutSet updateLogo(
308                    long groupId, boolean privateLayout, boolean logo, byte[] bytes)
309                    throws com.liferay.portal.kernel.exception.PortalException {
310                    return getService().updateLogo(groupId, privateLayout, logo, bytes);
311            }
312    
313            public static com.liferay.portal.kernel.model.LayoutSet updateLogo(
314                    long groupId, boolean privateLayout, boolean logo, java.io.File file)
315                    throws com.liferay.portal.kernel.exception.PortalException {
316                    return getService().updateLogo(groupId, privateLayout, logo, file);
317            }
318    
319            public static com.liferay.portal.kernel.model.LayoutSet updateLogo(
320                    long groupId, boolean privateLayout, boolean logo,
321                    java.io.InputStream is)
322                    throws com.liferay.portal.kernel.exception.PortalException {
323                    return getService().updateLogo(groupId, privateLayout, logo, is);
324            }
325    
326            public static com.liferay.portal.kernel.model.LayoutSet updateLogo(
327                    long groupId, boolean privateLayout, boolean logo,
328                    java.io.InputStream is, boolean cleanUpStream)
329                    throws com.liferay.portal.kernel.exception.PortalException {
330                    return getService()
331                                       .updateLogo(groupId, privateLayout, logo, is, cleanUpStream);
332            }
333    
334            public static com.liferay.portal.kernel.model.LayoutSet updateLookAndFeel(
335                    long groupId, boolean privateLayout, java.lang.String themeId,
336                    java.lang.String colorSchemeId, java.lang.String css)
337                    throws com.liferay.portal.kernel.exception.PortalException {
338                    return getService()
339                                       .updateLookAndFeel(groupId, privateLayout, themeId,
340                            colorSchemeId, css);
341            }
342    
343            public static void updateLookAndFeel(long groupId,
344                    java.lang.String themeId, java.lang.String colorSchemeId,
345                    java.lang.String css)
346                    throws com.liferay.portal.kernel.exception.PortalException {
347                    getService().updateLookAndFeel(groupId, themeId, colorSchemeId, css);
348            }
349    
350            public static com.liferay.portal.kernel.model.LayoutSet updatePageCount(
351                    long groupId, boolean privateLayout)
352                    throws com.liferay.portal.kernel.exception.PortalException {
353                    return getService().updatePageCount(groupId, privateLayout);
354            }
355    
356            public static com.liferay.portal.kernel.model.LayoutSet updateSettings(
357                    long groupId, boolean privateLayout, java.lang.String settings)
358                    throws com.liferay.portal.kernel.exception.PortalException {
359                    return getService().updateSettings(groupId, privateLayout, settings);
360            }
361    
362            public static com.liferay.portal.kernel.model.LayoutSet updateVirtualHost(
363                    long groupId, boolean privateLayout, java.lang.String virtualHostname)
364                    throws com.liferay.portal.kernel.exception.PortalException {
365                    return getService()
366                                       .updateVirtualHost(groupId, privateLayout, virtualHostname);
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    }