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.exception.PortalException;
020    import com.liferay.portal.kernel.exception.SystemException;
021    import com.liferay.portal.kernel.search.IndexableType;
022    import com.liferay.portal.kernel.transaction.Isolation;
023    import com.liferay.portal.kernel.transaction.Propagation;
024    import com.liferay.portal.kernel.transaction.Transactional;
025    
026    /**
027     * Provides the local service interface for LayoutSet. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see LayoutSetLocalServiceUtil
034     * @see com.liferay.portal.service.base.LayoutSetLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.LayoutSetLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface LayoutSetLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link LayoutSetLocalServiceUtil} to access the layout set local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutSetLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048            public com.liferay.portal.model.LayoutSet addLayoutSet(long groupId,
049                    boolean privateLayout)
050                    throws com.liferay.portal.kernel.exception.PortalException;
051    
052            /**
053            * Adds the layout set to the database. Also notifies the appropriate model listeners.
054            *
055            * @param layoutSet the layout set
056            * @return the layout set that was added
057            */
058            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
059            public com.liferay.portal.model.LayoutSet addLayoutSet(
060                    com.liferay.portal.model.LayoutSet layoutSet);
061    
062            /**
063            * Creates a new layout set with the primary key. Does not add the layout set to the database.
064            *
065            * @param layoutSetId the primary key for the new layout set
066            * @return the new layout set
067            */
068            public com.liferay.portal.model.LayoutSet createLayoutSet(long layoutSetId);
069    
070            public void deleteLayoutSet(long groupId, boolean privateLayout,
071                    com.liferay.portal.service.ServiceContext serviceContext)
072                    throws com.liferay.portal.kernel.exception.PortalException;
073    
074            /**
075            * Deletes the layout set from the database. Also notifies the appropriate model listeners.
076            *
077            * @param layoutSet the layout set
078            * @return the layout set that was removed
079            */
080            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
081            public com.liferay.portal.model.LayoutSet deleteLayoutSet(
082                    com.liferay.portal.model.LayoutSet layoutSet);
083    
084            /**
085            * Deletes the layout set with the primary key from the database. Also notifies the appropriate model listeners.
086            *
087            * @param layoutSetId the primary key of the layout set
088            * @return the layout set that was removed
089            * @throws PortalException if a layout set with the primary key could not be found
090            */
091            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
092            public com.liferay.portal.model.LayoutSet deleteLayoutSet(long layoutSetId)
093                    throws com.liferay.portal.kernel.exception.PortalException;
094    
095            /**
096            * @throws PortalException
097            */
098            @Override
099            public com.liferay.portal.model.PersistedModel deletePersistedModel(
100                    com.liferay.portal.model.PersistedModel persistedModel)
101                    throws com.liferay.portal.kernel.exception.PortalException;
102    
103            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
104    
105            /**
106            * Performs a dynamic query on the database and returns the matching rows.
107            *
108            * @param dynamicQuery the dynamic query
109            * @return the matching rows
110            */
111            public <T> java.util.List<T> dynamicQuery(
112                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
113    
114            /**
115            * Performs a dynamic query on the database and returns a range of the matching rows.
116            *
117            * <p>
118            * 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.
119            * </p>
120            *
121            * @param dynamicQuery the dynamic query
122            * @param start the lower bound of the range of model instances
123            * @param end the upper bound of the range of model instances (not inclusive)
124            * @return the range of matching rows
125            */
126            public <T> java.util.List<T> dynamicQuery(
127                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
128                    int end);
129    
130            /**
131            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
132            *
133            * <p>
134            * 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.
135            * </p>
136            *
137            * @param dynamicQuery the dynamic query
138            * @param start the lower bound of the range of model instances
139            * @param end the upper bound of the range of model instances (not inclusive)
140            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
141            * @return the ordered range of matching rows
142            */
143            public <T> java.util.List<T> dynamicQuery(
144                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
145                    int end,
146                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
147    
148            /**
149            * Returns the number of rows matching the dynamic query.
150            *
151            * @param dynamicQuery the dynamic query
152            * @return the number of rows matching the dynamic query
153            */
154            public long dynamicQueryCount(
155                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
156    
157            /**
158            * Returns the number of rows matching the dynamic query.
159            *
160            * @param dynamicQuery the dynamic query
161            * @param projection the projection to apply to the query
162            * @return the number of rows matching the dynamic query
163            */
164            public long dynamicQueryCount(
165                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
166                    com.liferay.portal.kernel.dao.orm.Projection projection);
167    
168            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
169            public com.liferay.portal.model.LayoutSet fetchLayoutSet(long layoutSetId);
170    
171            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172            public com.liferay.portal.model.LayoutSet fetchLayoutSet(
173                    java.lang.String virtualHostname);
174    
175            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
176            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
177    
178            /**
179            * Returns the Spring bean ID for this bean.
180            *
181            * @return the Spring bean ID for this bean
182            */
183            public java.lang.String getBeanIdentifier();
184    
185            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
186            public com.liferay.portal.model.LayoutSet getLayoutSet(long groupId,
187                    boolean privateLayout)
188                    throws com.liferay.portal.kernel.exception.PortalException;
189    
190            /**
191            * Returns the layout set with the primary key.
192            *
193            * @param layoutSetId the primary key of the layout set
194            * @return the layout set
195            * @throws PortalException if a layout set with the primary key could not be found
196            */
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public com.liferay.portal.model.LayoutSet getLayoutSet(long layoutSetId)
199                    throws com.liferay.portal.kernel.exception.PortalException;
200    
201            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public com.liferay.portal.model.LayoutSet getLayoutSet(
203                    java.lang.String virtualHostname)
204                    throws com.liferay.portal.kernel.exception.PortalException;
205    
206            /**
207            * Returns a range of all the layout sets.
208            *
209            * <p>
210            * 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.
211            * </p>
212            *
213            * @param start the lower bound of the range of layout sets
214            * @param end the upper bound of the range of layout sets (not inclusive)
215            * @return the range of layout sets
216            */
217            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
218            public java.util.List<com.liferay.portal.model.LayoutSet> getLayoutSets(
219                    int start, int end);
220    
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public java.util.List<com.liferay.portal.model.LayoutSet> getLayoutSetsByLayoutSetPrototypeUuid(
223                    java.lang.String layoutSetPrototypeUuid);
224    
225            /**
226            * Returns the number of layout sets.
227            *
228            * @return the number of layout sets
229            */
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public int getLayoutSetsCount();
232    
233            @Override
234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235            public com.liferay.portal.model.PersistedModel getPersistedModel(
236                    java.io.Serializable primaryKeyObj)
237                    throws com.liferay.portal.kernel.exception.PortalException;
238    
239            /**
240            * Sets the Spring bean ID for this bean.
241            *
242            * @param beanIdentifier the Spring bean ID for this bean
243            */
244            public void setBeanIdentifier(java.lang.String beanIdentifier);
245    
246            /**
247            * Updates the layout set in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
248            *
249            * @param layoutSet the layout set
250            * @return the layout set that was updated
251            */
252            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
253            public com.liferay.portal.model.LayoutSet updateLayoutSet(
254                    com.liferay.portal.model.LayoutSet layoutSet);
255    
256            /**
257            * Updates the state of the layout set prototype link.
258            *
259            * <p>
260            * This method can disable the layout set prototype's link by setting
261            * <code>layoutSetPrototypeLinkEnabled</code> to <code>false</code>.
262            * However, this method can only enable the layout set prototype's link if
263            * the layout set prototype's current uuid is not <code>null</code>. Setting
264            * the <code>layoutSetPrototypeLinkEnabled</code> to <code>true</code> when
265            * the layout set prototype's current uuid is <code>null</code> will have no
266            * effect.
267            * </p>
268            *
269            * @param groupId the primary key of the group
270            * @param privateLayout whether the layout set is private to the group
271            * @param layoutSetPrototypeLinkEnabled whether the layout set
272            prototype is link enabled
273            * @throws PortalException if a portal exception occurred
274            * @deprecated As of 6.1.0, replaced by {@link
275            #updateLayoutSetPrototypeLinkEnabled(long, boolean, boolean,
276            String)}
277            */
278            @java.lang.Deprecated
279            public void updateLayoutSetPrototypeLinkEnabled(long groupId,
280                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled)
281                    throws com.liferay.portal.kernel.exception.PortalException;
282    
283            /**
284            * Updates the state of the layout set prototype link.
285            *
286            * @param groupId the primary key of the group
287            * @param privateLayout whether the layout set is private to the group
288            * @param layoutSetPrototypeLinkEnabled whether the layout set prototype is
289            link enabled
290            * @param layoutSetPrototypeUuid the uuid of the layout set prototype to
291            link with
292            * @throws PortalException if a portal exception occurred
293            */
294            public void updateLayoutSetPrototypeLinkEnabled(long groupId,
295                    boolean privateLayout, boolean layoutSetPrototypeLinkEnabled,
296                    java.lang.String layoutSetPrototypeUuid)
297                    throws com.liferay.portal.kernel.exception.PortalException;
298    
299            public com.liferay.portal.model.LayoutSet updateLogo(long groupId,
300                    boolean privateLayout, boolean logo, byte[] bytes)
301                    throws com.liferay.portal.kernel.exception.PortalException;
302    
303            public com.liferay.portal.model.LayoutSet updateLogo(long groupId,
304                    boolean privateLayout, boolean logo, java.io.File file)
305                    throws com.liferay.portal.kernel.exception.PortalException;
306    
307            public com.liferay.portal.model.LayoutSet updateLogo(long groupId,
308                    boolean privateLayout, boolean logo, java.io.InputStream is)
309                    throws com.liferay.portal.kernel.exception.PortalException;
310    
311            public com.liferay.portal.model.LayoutSet updateLogo(long groupId,
312                    boolean privateLayout, boolean logo, java.io.InputStream is,
313                    boolean cleanUpStream)
314                    throws com.liferay.portal.kernel.exception.PortalException;
315    
316            public com.liferay.portal.model.LayoutSet updateLookAndFeel(long groupId,
317                    boolean privateLayout, java.lang.String themeId,
318                    java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
319                    throws com.liferay.portal.kernel.exception.PortalException;
320    
321            public void updateLookAndFeel(long groupId, java.lang.String themeId,
322                    java.lang.String colorSchemeId, java.lang.String css, boolean wapTheme)
323                    throws com.liferay.portal.kernel.exception.PortalException;
324    
325            public com.liferay.portal.model.LayoutSet updatePageCount(long groupId,
326                    boolean privateLayout)
327                    throws com.liferay.portal.kernel.exception.PortalException;
328    
329            public com.liferay.portal.model.LayoutSet updateSettings(long groupId,
330                    boolean privateLayout, java.lang.String settings)
331                    throws com.liferay.portal.kernel.exception.PortalException;
332    
333            public com.liferay.portal.model.LayoutSet updateVirtualHost(long groupId,
334                    boolean privateLayout, java.lang.String virtualHostname)
335                    throws com.liferay.portal.kernel.exception.PortalException;
336    }