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