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