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