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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209            public java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
210                    long layoutSetBranchId, long parentLayoutRevision, long plid,
211                    int start, int end,
212                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator);
213    
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public java.util.List<com.liferay.portal.model.LayoutRevision> getChildLayoutRevisions(
216                    long layoutSetBranchId, long parentLayoutRevisionId, long plid);
217    
218            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219            public int getChildLayoutRevisionsCount(long layoutSetBranchId,
220                    long parentLayoutRevision, long plid);
221    
222            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
223            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
224    
225            /**
226            * Returns the layout revision with the primary key.
227            *
228            * @param layoutRevisionId the primary key of the layout revision
229            * @return the layout revision
230            * @throws PortalException if a layout revision with the primary key could not be found
231            */
232            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
233            public com.liferay.portal.model.LayoutRevision getLayoutRevision(
234                    long layoutRevisionId) throws PortalException;
235    
236            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237            public com.liferay.portal.model.LayoutRevision getLayoutRevision(
238                    long layoutSetBranchId, long layoutBranchId, long plid)
239                    throws PortalException;
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public com.liferay.portal.model.LayoutRevision getLayoutRevision(
243                    long layoutSetBranchId, long plid, boolean head)
244                    throws PortalException;
245    
246            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
247            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
248                    long layoutSetBranchId, boolean head);
249    
250            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
251            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
252                    long layoutSetBranchId, long layoutBranchId, long plid, int start,
253                    int end,
254                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator);
255    
256            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
257            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
258                    long layoutSetBranchId, long plid);
259    
260            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
261            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
262                    long layoutSetBranchId, long plid, int start, int end,
263                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutRevision> orderByComparator);
264    
265            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
266            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
267                    long layoutSetBranchId, long plid, int status);
268    
269            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
270            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
271                    long layoutSetBranchId, int status);
272    
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
275                    long plid);
276    
277            /**
278            * Returns a range of all the layout revisions.
279            *
280            * <p>
281            * 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.
282            * </p>
283            *
284            * @param start the lower bound of the range of layout revisions
285            * @param end the upper bound of the range of layout revisions (not inclusive)
286            * @return the range of layout revisions
287            */
288            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289            public java.util.List<com.liferay.portal.model.LayoutRevision> getLayoutRevisions(
290                    int start, int end);
291    
292            /**
293            * Returns the number of layout revisions.
294            *
295            * @return the number of layout revisions
296            */
297            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
298            public int getLayoutRevisionsCount();
299    
300            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
301            public int getLayoutRevisionsCount(long layoutSetBranchId,
302                    long layoutBranchId, long plid);
303    
304            /**
305            * Returns the OSGi service identifier.
306            *
307            * @return the OSGi service identifier
308            */
309            public java.lang.String getOSGiServiceIdentifier();
310    
311            @Override
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public com.liferay.portal.model.PersistedModel getPersistedModel(
314                    java.io.Serializable primaryKeyObj) throws PortalException;
315    
316            /**
317            * Updates the layout revision in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
318            *
319            * @param layoutRevision the layout revision
320            * @return the layout revision that was updated
321            */
322            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
323            public com.liferay.portal.model.LayoutRevision updateLayoutRevision(
324                    com.liferay.portal.model.LayoutRevision layoutRevision);
325    
326            public com.liferay.portal.model.LayoutRevision updateLayoutRevision(
327                    long userId, long layoutRevisionId, long layoutBranchId,
328                    java.lang.String name, java.lang.String title,
329                    java.lang.String description, java.lang.String keywords,
330                    java.lang.String robots, java.lang.String typeSettings,
331                    boolean iconImage, long iconImageId, java.lang.String themeId,
332                    java.lang.String colorSchemeId, java.lang.String wapThemeId,
333                    java.lang.String wapColorSchemeId, java.lang.String css,
334                    com.liferay.portal.service.ServiceContext serviceContext)
335                    throws PortalException;
336    
337            public com.liferay.portal.model.LayoutRevision updateStatus(long userId,
338                    long layoutRevisionId, int status,
339                    com.liferay.portal.service.ServiceContext serviceContext)
340                    throws PortalException;
341    }