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    import com.liferay.portal.model.SystemEventConstants;
026    
027    /**
028     * Provides the local service interface for LayoutSetPrototype. Methods of this
029     * service will not have security checks based on the propagated JAAS
030     * credentials because this service can only be accessed from within the same
031     * VM.
032     *
033     * @author Brian Wing Shun Chan
034     * @see LayoutSetPrototypeLocalServiceUtil
035     * @see com.liferay.portal.service.base.LayoutSetPrototypeLocalServiceBaseImpl
036     * @see com.liferay.portal.service.impl.LayoutSetPrototypeLocalServiceImpl
037     * @generated
038     */
039    @ProviderType
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface LayoutSetPrototypeLocalService extends BaseLocalService,
043            PersistedModelLocalService {
044            /*
045             * NOTE FOR DEVELOPERS:
046             *
047             * Never modify or reference this interface directly. Always use {@link LayoutSetPrototypeLocalServiceUtil} to access the layout set prototype local service. Add custom service methods to {@link com.liferay.portal.service.impl.LayoutSetPrototypeLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
048             */
049    
050            /**
051            * Adds the layout set prototype to the database. Also notifies the appropriate model listeners.
052            *
053            * @param layoutSetPrototype the layout set prototype
054            * @return the layout set prototype that was added
055            */
056            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
057            public com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype(
058                    com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype);
059    
060            /**
061            * @deprecated As of 7.0.0, replaced by {@link #addLayoutSetPrototype(long,
062            long, Map, Map, boolean, boolean, ServiceContext)}
063            */
064            @java.lang.Deprecated
065            public com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype(
066                    long userId, long companyId,
067                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
068                    java.lang.String description, boolean active,
069                    boolean layoutsUpdateable,
070                    com.liferay.portal.service.ServiceContext serviceContext)
071                    throws com.liferay.portal.kernel.exception.PortalException;
072    
073            public com.liferay.portal.model.LayoutSetPrototype addLayoutSetPrototype(
074                    long userId, long companyId,
075                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
076                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
077                    boolean active, boolean layoutsUpdateable,
078                    com.liferay.portal.service.ServiceContext serviceContext)
079                    throws com.liferay.portal.kernel.exception.PortalException;
080    
081            /**
082            * Creates a new layout set prototype with the primary key. Does not add the layout set prototype to the database.
083            *
084            * @param layoutSetPrototypeId the primary key for the new layout set prototype
085            * @return the new layout set prototype
086            */
087            public com.liferay.portal.model.LayoutSetPrototype createLayoutSetPrototype(
088                    long layoutSetPrototypeId);
089    
090            /**
091            * Deletes the layout set prototype from the database. Also notifies the appropriate model listeners.
092            *
093            * @param layoutSetPrototype the layout set prototype
094            * @return the layout set prototype that was removed
095            * @throws PortalException
096            */
097            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
098            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
099            public com.liferay.portal.model.LayoutSetPrototype deleteLayoutSetPrototype(
100                    com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype)
101                    throws com.liferay.portal.kernel.exception.PortalException;
102    
103            /**
104            * Deletes the layout set prototype with the primary key from the database. Also notifies the appropriate model listeners.
105            *
106            * @param layoutSetPrototypeId the primary key of the layout set prototype
107            * @return the layout set prototype that was removed
108            * @throws PortalException if a layout set prototype with the primary key could not be found
109            */
110            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
111            public com.liferay.portal.model.LayoutSetPrototype deleteLayoutSetPrototype(
112                    long layoutSetPrototypeId)
113                    throws com.liferay.portal.kernel.exception.PortalException;
114    
115            public void deleteLayoutSetPrototypes()
116                    throws com.liferay.portal.kernel.exception.PortalException;
117    
118            public void deleteNondefaultLayoutSetPrototypes(long companyId)
119                    throws com.liferay.portal.kernel.exception.PortalException;
120    
121            /**
122            * @throws PortalException
123            */
124            @Override
125            public com.liferay.portal.model.PersistedModel deletePersistedModel(
126                    com.liferay.portal.model.PersistedModel persistedModel)
127                    throws com.liferay.portal.kernel.exception.PortalException;
128    
129            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
130    
131            /**
132            * Performs a dynamic query on the database and returns the matching rows.
133            *
134            * @param dynamicQuery the dynamic query
135            * @return the matching rows
136            */
137            public <T> java.util.List<T> dynamicQuery(
138                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
139    
140            /**
141            * Performs a dynamic query on the database and returns a range of the matching rows.
142            *
143            * <p>
144            * 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.LayoutSetPrototypeModelImpl}. 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.
145            * </p>
146            *
147            * @param dynamicQuery the dynamic query
148            * @param start the lower bound of the range of model instances
149            * @param end the upper bound of the range of model instances (not inclusive)
150            * @return the range of matching rows
151            */
152            public <T> java.util.List<T> dynamicQuery(
153                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
154                    int end);
155    
156            /**
157            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
158            *
159            * <p>
160            * 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.LayoutSetPrototypeModelImpl}. 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.
161            * </p>
162            *
163            * @param dynamicQuery the dynamic query
164            * @param start the lower bound of the range of model instances
165            * @param end the upper bound of the range of model instances (not inclusive)
166            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
167            * @return the ordered range of matching rows
168            */
169            public <T> java.util.List<T> dynamicQuery(
170                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
171                    int end,
172                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
173    
174            /**
175            * Returns the number of rows matching the dynamic query.
176            *
177            * @param dynamicQuery the dynamic query
178            * @return the number of rows matching the dynamic query
179            */
180            public long dynamicQueryCount(
181                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
182    
183            /**
184            * Returns the number of rows matching the dynamic query.
185            *
186            * @param dynamicQuery the dynamic query
187            * @param projection the projection to apply to the query
188            * @return the number of rows matching the dynamic query
189            */
190            public long dynamicQueryCount(
191                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
192                    com.liferay.portal.kernel.dao.orm.Projection projection);
193    
194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195            public com.liferay.portal.model.LayoutSetPrototype fetchLayoutSetPrototype(
196                    long layoutSetPrototypeId);
197    
198            /**
199            * Returns the layout set prototype with the matching UUID and company.
200            *
201            * @param uuid the layout set prototype's UUID
202            * @param companyId the primary key of the company
203            * @return the matching layout set prototype, or <code>null</code> if a matching layout set prototype could not be found
204            */
205            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
206            public com.liferay.portal.model.LayoutSetPrototype fetchLayoutSetPrototypeByUuidAndCompanyId(
207                    java.lang.String uuid, long companyId);
208    
209            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
210            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
211    
212            /**
213            * Returns the Spring bean ID for this bean.
214            *
215            * @return the Spring bean ID for this bean
216            */
217            public java.lang.String getBeanIdentifier();
218    
219            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
220            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
221                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
222    
223            /**
224            * Returns the layout set prototype with the primary key.
225            *
226            * @param layoutSetPrototypeId the primary key of the layout set prototype
227            * @return the layout set prototype
228            * @throws PortalException if a layout set prototype with the primary key could not be found
229            */
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype(
232                    long layoutSetPrototypeId)
233                    throws com.liferay.portal.kernel.exception.PortalException;
234    
235            /**
236            * @deprecated As of 6.2.0, replaced by {@link
237            #getLayoutSetPrototypeByUuidAndCompanyId(String, long)}
238            */
239            @java.lang.Deprecated
240            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
241            public com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototypeByUuid(
242                    java.lang.String uuid)
243                    throws com.liferay.portal.kernel.exception.PortalException;
244    
245            /**
246            * Returns the layout set prototype with the matching UUID and company.
247            *
248            * @param uuid the layout set prototype's UUID
249            * @param companyId the primary key of the company
250            * @return the matching layout set prototype
251            * @throws PortalException if a matching layout set prototype could not be found
252            */
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototypeByUuidAndCompanyId(
255                    java.lang.String uuid, long companyId)
256                    throws com.liferay.portal.kernel.exception.PortalException;
257    
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public java.util.List<com.liferay.portal.model.LayoutSetPrototype> getLayoutSetPrototypes(
260                    long companyId);
261    
262            /**
263            * Returns a range of all the layout set prototypes.
264            *
265            * <p>
266            * 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.LayoutSetPrototypeModelImpl}. 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.
267            * </p>
268            *
269            * @param start the lower bound of the range of layout set prototypes
270            * @param end the upper bound of the range of layout set prototypes (not inclusive)
271            * @return the range of layout set prototypes
272            */
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public java.util.List<com.liferay.portal.model.LayoutSetPrototype> getLayoutSetPrototypes(
275                    int start, int end);
276    
277            /**
278            * Returns the number of layout set prototypes.
279            *
280            * @return the number of layout set prototypes
281            */
282            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
283            public int getLayoutSetPrototypesCount();
284    
285            @Override
286            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
287            public com.liferay.portal.model.PersistedModel getPersistedModel(
288                    java.io.Serializable primaryKeyObj)
289                    throws com.liferay.portal.kernel.exception.PortalException;
290    
291            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
292            public java.util.List<com.liferay.portal.model.LayoutSetPrototype> search(
293                    long companyId, java.lang.Boolean active, int start, int end,
294                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutSetPrototype> obc);
295    
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public int searchCount(long companyId, java.lang.Boolean active);
298    
299            /**
300            * Sets the Spring bean ID for this bean.
301            *
302            * @param beanIdentifier the Spring bean ID for this bean
303            */
304            public void setBeanIdentifier(java.lang.String beanIdentifier);
305    
306            /**
307            * Updates the layout set prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
308            *
309            * @param layoutSetPrototype the layout set prototype
310            * @return the layout set prototype that was updated
311            */
312            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
313            public com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
314                    com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype);
315    
316            /**
317            * @deprecated As of 7.0.0, replaced by {@link
318            #updateLayoutSetPrototype(long, Map, Map, boolean, boolean,
319            ServiceContext)}
320            */
321            @java.lang.Deprecated
322            public com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
323                    long layoutSetPrototypeId,
324                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
325                    java.lang.String description, boolean active,
326                    boolean layoutsUpdateable,
327                    com.liferay.portal.service.ServiceContext serviceContext)
328                    throws com.liferay.portal.kernel.exception.PortalException;
329    
330            public com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
331                    long layoutSetPrototypeId,
332                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
333                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
334                    boolean active, boolean layoutsUpdateable,
335                    com.liferay.portal.service.ServiceContext serviceContext)
336                    throws com.liferay.portal.kernel.exception.PortalException;
337    
338            public com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
339                    long layoutSetPrototypeId, java.lang.String settings)
340                    throws com.liferay.portal.kernel.exception.PortalException;
341    }