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 com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.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)
106                    throws com.liferay.portal.kernel.exception.PortalException;
107    
108            public void deleteLayoutRevisions(long layoutSetBranchId,
109                    long layoutBranchId, long plid)
110                    throws com.liferay.portal.kernel.exception.PortalException;
111    
112            public void deleteLayoutRevisions(long layoutSetBranchId, long plid)
113                    throws com.liferay.portal.kernel.exception.PortalException;
114    
115            public void deleteLayoutSetBranchLayoutRevisions(long layoutSetBranchId)
116                    throws com.liferay.portal.kernel.exception.PortalException;
117    
118            /**
119            * @throws PortalException
120            */
121            @Override
122            public com.liferay.portal.model.PersistedModel deletePersistedModel(
123                    com.liferay.portal.model.PersistedModel persistedModel)
124                    throws com.liferay.portal.kernel.exception.PortalException;
125    
126            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
127    
128            /**
129            * Performs a dynamic query on the database and returns the matching rows.
130            *
131            * @param dynamicQuery the dynamic query
132            * @return the matching rows
133            */
134            public <T> java.util.List<T> dynamicQuery(
135                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
136    
137            /**
138            * Performs a dynamic query on the database and returns a range of the matching rows.
139            *
140            * <p>
141            * 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.
142            * </p>
143            *
144            * @param dynamicQuery the dynamic query
145            * @param start the lower bound of the range of model instances
146            * @param end the upper bound of the range of model instances (not inclusive)
147            * @return the range of matching rows
148            */
149            public <T> java.util.List<T> dynamicQuery(
150                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
151                    int end);
152    
153            /**
154            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
155            *
156            * <p>
157            * 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.
158            * </p>
159            *
160            * @param dynamicQuery the dynamic query
161            * @param start the lower bound of the range of model instances
162            * @param end the upper bound of the range of model instances (not inclusive)
163            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
164            * @return the ordered range of matching rows
165            */
166            public <T> java.util.List<T> dynamicQuery(
167                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
168                    int end,
169                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
170    
171            /**
172            * Returns the number of rows matching the dynamic query.
173            *
174            * @param dynamicQuery the dynamic query
175            * @return the number of rows matching the dynamic query
176            */
177            public long dynamicQueryCount(
178                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
179    
180            /**
181            * Returns the number of rows matching the dynamic query.
182            *
183            * @param dynamicQuery the dynamic query
184            * @param projection the projection to apply to the query
185            * @return the number of rows matching the dynamic query
186            */
187            public long dynamicQueryCount(
188                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
189                    com.liferay.portal.kernel.dao.orm.Projection projection);
190    
191            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
192            public com.liferay.portal.model.LayoutRevision fetchLastLayoutRevision(
193                    long plid, boolean head);
194    
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public com.liferay.portal.model.LayoutRevision fetchLayoutRevision(
197                    long layoutRevisionId);
198    
199            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
200            public com.liferay.portal.model.LayoutRevision fetchLayoutRevision(
201                    long layoutSetBranchId, boolean head, long plid);
202    
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
205    
206            /**
207            * Returns the Spring bean ID for this bean.
208            *
209            * @return the Spring bean ID for this bean
210            */
211            public java.lang.String getBeanIdentifier();
212    
213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214            public java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
215                    long layoutSetBranchId, long parentLayoutRevision, long plid,
216                    int start, int end,
217                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator);
218    
219            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220            public java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
221                    long layoutSetBranchId, long parentLayoutRevisionId, long plid);
222    
223            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
224            public int getChildLayoutRevisionsCount(long layoutSetBranchId,
225                    long parentLayoutRevision, long plid);
226    
227            /**
228            * Returns the layout revision with the primary key.
229            *
230            * @param layoutRevisionId the primary key of the layout revision
231            * @return the layout revision
232            * @throws PortalException if a layout revision with the primary key could not be found
233            */
234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235            public com.liferay.portal.model.LayoutRevision getLayoutRevision(
236                    long layoutRevisionId)
237                    throws com.liferay.portal.kernel.exception.PortalException;
238    
239            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
240            public com.liferay.portal.model.LayoutRevision getLayoutRevision(
241                    long layoutSetBranchId, long layoutBranchId, long plid)
242                    throws com.liferay.portal.kernel.exception.PortalException;
243    
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public com.liferay.portal.model.LayoutRevision getLayoutRevision(
246                    long layoutSetBranchId, long plid, boolean head)
247                    throws com.liferay.portal.kernel.exception.PortalException;
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
251                    long layoutSetBranchId, boolean head);
252    
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
255                    long layoutSetBranchId, long layoutBranchId, long plid, int start,
256                    int end,
257                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator);
258    
259            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
260            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
261                    long layoutSetBranchId, long plid);
262    
263            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
265                    long layoutSetBranchId, long plid, int start, int end,
266                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator);
267    
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
270                    long layoutSetBranchId, long plid, int status);
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
274                    long layoutSetBranchId, int status);
275    
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
278                    long plid);
279    
280            /**
281            * Returns a range of all the layout revisions.
282            *
283            * <p>
284            * 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.
285            * </p>
286            *
287            * @param start the lower bound of the range of layout revisions
288            * @param end the upper bound of the range of layout revisions (not inclusive)
289            * @return the range of layout revisions
290            */
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
293                    int start, int end);
294    
295            /**
296            * Returns the number of layout revisions.
297            *
298            * @return the number of layout revisions
299            */
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public int getLayoutRevisionsCount();
302    
303            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
304            public int getLayoutRevisionsCount(long layoutSetBranchId,
305                    long layoutBranchId, long plid);
306    
307            @Override
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public com.liferay.portal.model.PersistedModel getPersistedModel(
310                    java.io.Serializable primaryKeyObj)
311                    throws com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.PortalException;
345    }