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