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 LayoutRevision. 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 LayoutRevisionLocalServiceUtil
034     * @see com.liferay.portal.service.base.LayoutRevisionLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.LayoutRevisionLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface LayoutRevisionLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link LayoutRevisionLocalServiceUtil} to access the layout revision local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutRevisionLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048    
049            /**
050            * Adds the layout revision to the database. Also notifies the appropriate model listeners.
051            *
052            * @param layoutRevision the layout revision
053            * @return the layout revision that was added
054            */
055            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
056            public com.liferay.portal.model.LayoutRevision addLayoutRevision(
057                    com.liferay.portal.model.LayoutRevision layoutRevision);
058    
059            public com.liferay.portal.model.LayoutRevision addLayoutRevision(
060                    long userId, long layoutSetBranchId, long layoutBranchId,
061                    long parentLayoutRevisionId, boolean head, long plid,
062                    long portletPreferencesPlid, boolean privateLayout,
063                    java.lang.String name, java.lang.String title,
064                    java.lang.String description, java.lang.String keywords,
065                    java.lang.String robots, java.lang.String typeSettings,
066                    boolean iconImage, long iconImageId, java.lang.String themeId,
067                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
068                    java.lang.String wapColorSchemeId, java.lang.String css,
069                    com.liferay.portal.service.ServiceContext serviceContext)
070                    throws PortalException;
071    
072            /**
073            * Creates a new layout revision with the primary key. Does not add the layout revision to the database.
074            *
075            * @param layoutRevisionId the primary key for the new layout revision
076            * @return the new layout revision
077            */
078            public com.liferay.portal.model.LayoutRevision createLayoutRevision(
079                    long layoutRevisionId);
080    
081            public void deleteLayoutLayoutRevisions(long plid)
082                    throws PortalException;
083    
084            /**
085            * Deletes the layout revision from the database. Also notifies the appropriate model listeners.
086            *
087            * @param layoutRevision the layout revision
088            * @return the layout revision that was removed
089            * @throws PortalException
090            */
091            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
092            public com.liferay.portal.model.LayoutRevision deleteLayoutRevision(
093                    com.liferay.portal.model.LayoutRevision layoutRevision)
094                    throws PortalException;
095    
096            /**
097            * Deletes the layout revision with the primary key from the database. Also notifies the appropriate model listeners.
098            *
099            * @param layoutRevisionId the primary key of the layout revision
100            * @return the layout revision that was removed
101            * @throws PortalException if a layout revision with the primary key could not be found
102            */
103            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
104            public com.liferay.portal.model.LayoutRevision deleteLayoutRevision(
105                    long layoutRevisionId) throws PortalException;
106    
107            public void deleteLayoutRevisions(long layoutSetBranchId,
108                    long layoutBranchId, long plid) throws PortalException;
109    
110            public void deleteLayoutRevisions(long layoutSetBranchId, long plid)
111                    throws PortalException;
112    
113            public void deleteLayoutSetBranchLayoutRevisions(long layoutSetBranchId)
114                    throws PortalException;
115    
116            /**
117            * @throws PortalException
118            */
119            @Override
120            public com.liferay.portal.model.PersistedModel deletePersistedModel(
121                    com.liferay.portal.model.PersistedModel persistedModel)
122                    throws PortalException;
123    
124            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
125    
126            /**
127            * Performs a dynamic query on the database and returns the matching rows.
128            *
129            * @param dynamicQuery the dynamic query
130            * @return the matching rows
131            */
132            public <T> java.util.List<T> dynamicQuery(
133                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
134    
135            /**
136            * Performs a dynamic query on the database and returns a range of the matching rows.
137            *
138            * <p>
139            * 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.LayoutRevisionModelImpl}. 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.
140            * </p>
141            *
142            * @param dynamicQuery the dynamic query
143            * @param start the lower bound of the range of model instances
144            * @param end the upper bound of the range of model instances (not inclusive)
145            * @return the range of matching rows
146            */
147            public <T> java.util.List<T> dynamicQuery(
148                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
149                    int end);
150    
151            /**
152            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
153            *
154            * <p>
155            * 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.LayoutRevisionModelImpl}. 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.
156            * </p>
157            *
158            * @param dynamicQuery the dynamic query
159            * @param start the lower bound of the range of model instances
160            * @param end the upper bound of the range of model instances (not inclusive)
161            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
162            * @return the ordered range of matching rows
163            */
164            public <T> java.util.List<T> dynamicQuery(
165                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
166                    int end,
167                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
168    
169            /**
170            * Returns the number of rows matching the dynamic query.
171            *
172            * @param dynamicQuery the dynamic query
173            * @return the number of rows matching the dynamic query
174            */
175            public long dynamicQueryCount(
176                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
177    
178            /**
179            * Returns the number of rows matching the dynamic query.
180            *
181            * @param dynamicQuery the dynamic query
182            * @param projection the projection to apply to the query
183            * @return the number of rows matching the dynamic query
184            */
185            public long dynamicQueryCount(
186                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
187                    com.liferay.portal.kernel.dao.orm.Projection projection);
188    
189            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
190            public com.liferay.portal.model.LayoutRevision fetchLastLayoutRevision(
191                    long plid, boolean head);
192    
193            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
194            public com.liferay.portal.model.LayoutRevision fetchLatestLayoutRevision(
195                    long layoutSetBranchId, long plid);
196    
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public com.liferay.portal.model.LayoutRevision fetchLayoutRevision(
199                    long layoutRevisionId);
200    
201            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
202            public com.liferay.portal.model.LayoutRevision fetchLayoutRevision(
203                    long layoutSetBranchId, boolean head, long plid);
204    
205            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
207    
208            /**
209            * Returns the Spring bean ID for this bean.
210            *
211            * @return the Spring bean ID for this bean
212            */
213            public java.lang.String getBeanIdentifier();
214    
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
217                    long layoutSetBranchId, long parentLayoutRevision, long plid,
218                    int start, int end,
219                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator);
220    
221            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
222            public java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
223                    long layoutSetBranchId, long parentLayoutRevisionId, long plid);
224    
225            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
226            public int getChildLayoutRevisionsCount(long layoutSetBranchId,
227                    long parentLayoutRevision, long plid);
228    
229            /**
230            * Returns the layout revision with the primary key.
231            *
232            * @param layoutRevisionId the primary key of the layout revision
233            * @return the layout revision
234            * @throws PortalException if a layout revision with the primary key could not be found
235            */
236            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237            public com.liferay.portal.model.LayoutRevision getLayoutRevision(
238                    long layoutRevisionId) throws PortalException;
239    
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public com.liferay.portal.model.LayoutRevision getLayoutRevision(
242                    long layoutSetBranchId, long layoutBranchId, long plid)
243                    throws PortalException;
244    
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public com.liferay.portal.model.LayoutRevision getLayoutRevision(
247                    long layoutSetBranchId, long plid, boolean head)
248                    throws PortalException;
249    
250            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
252                    long layoutSetBranchId, boolean head);
253    
254            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
255            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
256                    long layoutSetBranchId, long layoutBranchId, long plid, int start,
257                    int end,
258                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator);
259    
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
262                    long layoutSetBranchId, long plid);
263    
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
266                    long layoutSetBranchId, long plid, int start, int end,
267                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator);
268    
269            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
271                    long layoutSetBranchId, long plid, int status);
272    
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
275                    long layoutSetBranchId, int status);
276    
277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
279                    long plid);
280    
281            /**
282            * Returns a range of all the layout revisions.
283            *
284            * <p>
285            * 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.LayoutRevisionModelImpl}. 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.
286            * </p>
287            *
288            * @param start the lower bound of the range of layout revisions
289            * @param end the upper bound of the range of layout revisions (not inclusive)
290            * @return the range of layout revisions
291            */
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
294                    int start, int end);
295    
296            /**
297            * Returns the number of layout revisions.
298            *
299            * @return the number of layout revisions
300            */
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public int getLayoutRevisionsCount();
303    
304            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
305            public int getLayoutRevisionsCount(long layoutSetBranchId,
306                    long layoutBranchId, long plid);
307    
308            @Override
309            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
310            public com.liferay.portal.model.PersistedModel getPersistedModel(
311                    java.io.Serializable primaryKeyObj) throws PortalException;
312    
313            /**
314            * Sets the Spring bean ID for this bean.
315            *
316            * @param beanIdentifier the Spring bean ID for this bean
317            */
318            public void setBeanIdentifier(java.lang.String beanIdentifier);
319    
320            /**
321            * Updates the layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
322            *
323            * @param layoutRevision the layout revision
324            * @return the layout revision that was updated
325            */
326            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
327            public com.liferay.portal.model.LayoutRevision updateLayoutRevision(
328                    com.liferay.portal.model.LayoutRevision layoutRevision);
329    
330            public com.liferay.portal.model.LayoutRevision updateLayoutRevision(
331                    long userId, long layoutRevisionId, long layoutBranchId,
332                    java.lang.String name, java.lang.String title,
333                    java.lang.String description, java.lang.String keywords,
334                    java.lang.String robots, java.lang.String typeSettings,
335                    boolean iconImage, long iconImageId, java.lang.String themeId,
336                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
337                    java.lang.String wapColorSchemeId, java.lang.String css,
338                    com.liferay.portal.service.ServiceContext serviceContext)
339                    throws PortalException;
340    
341            public com.liferay.portal.model.LayoutRevision updateStatus(long userId,
342                    long layoutRevisionId, int status,
343                    com.liferay.portal.service.ServiceContext serviceContext)
344                    throws PortalException;
345    }