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 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 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 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) throws PortalException;
113    
114            public void deleteLayoutSetPrototypes() throws PortalException;
115    
116            public void deleteNondefaultLayoutSetPrototypes(long companyId)
117                    throws PortalException;
118    
119            /**
120            * @throws PortalException
121            */
122            @Override
123            public com.liferay.portal.model.PersistedModel deletePersistedModel(
124                    com.liferay.portal.model.PersistedModel persistedModel)
125                    throws PortalException;
126    
127            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
128    
129            /**
130            * Performs a dynamic query on the database and returns the matching rows.
131            *
132            * @param dynamicQuery the dynamic query
133            * @return the matching rows
134            */
135            public <T> java.util.List<T> dynamicQuery(
136                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
137    
138            /**
139            * Performs a dynamic query on the database and returns a range of the matching rows.
140            *
141            * <p>
142            * 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.
143            * </p>
144            *
145            * @param dynamicQuery the dynamic query
146            * @param start the lower bound of the range of model instances
147            * @param end the upper bound of the range of model instances (not inclusive)
148            * @return the range of matching rows
149            */
150            public <T> java.util.List<T> dynamicQuery(
151                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
152                    int end);
153    
154            /**
155            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
156            *
157            * <p>
158            * 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.
159            * </p>
160            *
161            * @param dynamicQuery the dynamic query
162            * @param start the lower bound of the range of model instances
163            * @param end the upper bound of the range of model instances (not inclusive)
164            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
165            * @return the ordered range of matching rows
166            */
167            public <T> java.util.List<T> dynamicQuery(
168                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
169                    int end,
170                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
171    
172            /**
173            * Returns the number of rows matching the dynamic query.
174            *
175            * @param dynamicQuery the dynamic query
176            * @return the number of rows matching the dynamic query
177            */
178            public long dynamicQueryCount(
179                    com.liferay.portal.kernel.dao.orm.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(
189                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
190                    com.liferay.portal.kernel.dao.orm.Projection projection);
191    
192            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
193            public com.liferay.portal.model.LayoutSetPrototype fetchLayoutSetPrototype(
194                    long layoutSetPrototypeId);
195    
196            /**
197            * Returns the layout set prototype with the matching UUID and company.
198            *
199            * @param uuid the layout set prototype's UUID
200            * @param companyId the primary key of the company
201            * @return the matching layout set prototype, or <code>null</code> if a matching layout set prototype could not be found
202            */
203            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
204            public com.liferay.portal.model.LayoutSetPrototype fetchLayoutSetPrototypeByUuidAndCompanyId(
205                    java.lang.String uuid, long companyId);
206    
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
209    
210            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
211            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
212                    com.liferay.portlet.exportimport.lar.PortletDataContext portletDataContext);
213    
214            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
215            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
216    
217            /**
218            * Returns the layout set prototype with the primary key.
219            *
220            * @param layoutSetPrototypeId the primary key of the layout set prototype
221            * @return the layout set prototype
222            * @throws PortalException if a layout set prototype with the primary key could not be found
223            */
224            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225            public com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototype(
226                    long layoutSetPrototypeId) throws PortalException;
227    
228            /**
229            * @deprecated As of 6.2.0, replaced by {@link
230            #getLayoutSetPrototypeByUuidAndCompanyId(String, long)}
231            */
232            @java.lang.Deprecated
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototypeByUuid(
235                    java.lang.String uuid) throws PortalException;
236    
237            /**
238            * Returns the layout set prototype with the matching UUID and company.
239            *
240            * @param uuid the layout set prototype's UUID
241            * @param companyId the primary key of the company
242            * @return the matching layout set prototype
243            * @throws PortalException if a matching layout set prototype could not be found
244            */
245            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
246            public com.liferay.portal.model.LayoutSetPrototype getLayoutSetPrototypeByUuidAndCompanyId(
247                    java.lang.String uuid, long companyId) throws PortalException;
248    
249            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
250            public java.util.List<com.liferay.portal.model.LayoutSetPrototype> getLayoutSetPrototypes(
251                    long companyId);
252    
253            /**
254            * Returns a range of all the layout set prototypes.
255            *
256            * <p>
257            * 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.
258            * </p>
259            *
260            * @param start the lower bound of the range of layout set prototypes
261            * @param end the upper bound of the range of layout set prototypes (not inclusive)
262            * @return the range of layout set prototypes
263            */
264            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
265            public java.util.List<com.liferay.portal.model.LayoutSetPrototype> getLayoutSetPrototypes(
266                    int start, int end);
267    
268            /**
269            * Returns the number of layout set prototypes.
270            *
271            * @return the number of layout set prototypes
272            */
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public int getLayoutSetPrototypesCount();
275    
276            /**
277            * Returns the OSGi service identifier.
278            *
279            * @return the OSGi service identifier
280            */
281            public java.lang.String getOSGiServiceIdentifier();
282    
283            @Override
284            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285            public com.liferay.portal.model.PersistedModel getPersistedModel(
286                    java.io.Serializable primaryKeyObj) throws PortalException;
287    
288            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
289            public java.util.List<com.liferay.portal.model.LayoutSetPrototype> search(
290                    long companyId, java.lang.Boolean active, int start, int end,
291                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portal.model.LayoutSetPrototype> obc);
292    
293            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294            public int searchCount(long companyId, java.lang.Boolean active);
295    
296            /**
297            * Updates the layout set prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
298            *
299            * @param layoutSetPrototype the layout set prototype
300            * @return the layout set prototype that was updated
301            */
302            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
303            public com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
304                    com.liferay.portal.model.LayoutSetPrototype layoutSetPrototype);
305    
306            /**
307            * @deprecated As of 7.0.0, replaced by {@link
308            #updateLayoutSetPrototype(long, Map, Map, boolean, boolean,
309            ServiceContext)}
310            */
311            @java.lang.Deprecated
312            public com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
313                    long layoutSetPrototypeId,
314                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
315                    java.lang.String description, boolean active,
316                    boolean layoutsUpdateable,
317                    com.liferay.portal.service.ServiceContext serviceContext)
318                    throws PortalException;
319    
320            public com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
321                    long layoutSetPrototypeId,
322                    java.util.Map<java.util.Locale, java.lang.String> nameMap,
323                    java.util.Map<java.util.Locale, java.lang.String> descriptionMap,
324                    boolean active, boolean layoutsUpdateable,
325                    com.liferay.portal.service.ServiceContext serviceContext)
326                    throws PortalException;
327    
328            public com.liferay.portal.model.LayoutSetPrototype updateLayoutSetPrototype(
329                    long layoutSetPrototypeId, java.lang.String settings)
330                    throws PortalException;
331    }