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