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