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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
068            public ActionableDynamicQuery getActionableDynamicQuery();
069    
070            public DynamicQuery dynamicQuery();
071    
072            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
073            public ExportActionableDynamicQuery getExportActionableDynamicQuery(
074                    PortletDataContext portletDataContext);
075    
076            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
077            public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
078    
079            /**
080            * Adds the layout set prototype to the database. Also notifies the appropriate model listeners.
081            *
082            * @param layoutSetPrototype the layout set prototype
083            * @return the layout set prototype that was added
084            */
085            @Indexable(type = IndexableType.REINDEX)
086            public LayoutSetPrototype addLayoutSetPrototype(
087                    LayoutSetPrototype layoutSetPrototype);
088    
089            /**
090            * @deprecated As of 7.0.0, replaced by {@link #addLayoutSetPrototype(long,
091            long, Map, Map, boolean, boolean, ServiceContext)}
092            */
093            @java.lang.Deprecated
094            public LayoutSetPrototype addLayoutSetPrototype(long userId,
095                    long companyId, Map<Locale, java.lang.String> nameMap,
096                    java.lang.String description, boolean active,
097                    boolean layoutsUpdateable, ServiceContext serviceContext)
098                    throws PortalException;
099    
100            public LayoutSetPrototype addLayoutSetPrototype(long userId,
101                    long companyId, Map<Locale, java.lang.String> nameMap,
102                    Map<Locale, java.lang.String> descriptionMap, boolean active,
103                    boolean layoutsUpdateable, ServiceContext serviceContext)
104                    throws PortalException;
105    
106            /**
107            * Creates a new layout set prototype with the primary key. Does not add the layout set prototype to the database.
108            *
109            * @param layoutSetPrototypeId the primary key for the new layout set prototype
110            * @return the new layout set prototype
111            */
112            public LayoutSetPrototype createLayoutSetPrototype(
113                    long layoutSetPrototypeId);
114    
115            /**
116            * Deletes the layout set prototype from the database. Also notifies the appropriate model listeners.
117            *
118            * @param layoutSetPrototype the layout set prototype
119            * @return the layout set prototype that was removed
120            * @throws PortalException
121            */
122            @Indexable(type = IndexableType.DELETE)
123            @SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
124            public LayoutSetPrototype deleteLayoutSetPrototype(
125                    LayoutSetPrototype layoutSetPrototype) throws PortalException;
126    
127            /**
128            * Deletes the layout set prototype with the primary key from the database. Also notifies the appropriate model listeners.
129            *
130            * @param layoutSetPrototypeId the primary key of the layout set prototype
131            * @return the layout set prototype that was removed
132            * @throws PortalException if a layout set prototype with the primary key could not be found
133            */
134            @Indexable(type = IndexableType.DELETE)
135            public LayoutSetPrototype deleteLayoutSetPrototype(
136                    long layoutSetPrototypeId) throws PortalException;
137    
138            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
139            public LayoutSetPrototype fetchLayoutSetPrototype(long layoutSetPrototypeId);
140    
141            /**
142            * Returns the layout set prototype with the matching UUID and company.
143            *
144            * @param uuid the layout set prototype's UUID
145            * @param companyId the primary key of the company
146            * @return the matching layout set prototype, or <code>null</code> if a matching layout set prototype could not be found
147            */
148            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
149            public LayoutSetPrototype fetchLayoutSetPrototypeByUuidAndCompanyId(
150                    java.lang.String uuid, long companyId);
151    
152            /**
153            * Returns the layout set prototype with the primary key.
154            *
155            * @param layoutSetPrototypeId the primary key of the layout set prototype
156            * @return the layout set prototype
157            * @throws PortalException if a layout set prototype with the primary key could not be found
158            */
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public LayoutSetPrototype getLayoutSetPrototype(long layoutSetPrototypeId)
161                    throws PortalException;
162    
163            /**
164            * Returns the layout set prototype with the matching UUID and company.
165            *
166            * @param uuid the layout set prototype's UUID
167            * @param companyId the primary key of the company
168            * @return the matching layout set prototype
169            * @throws PortalException if a matching layout set prototype could not be found
170            */
171            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
172            public LayoutSetPrototype getLayoutSetPrototypeByUuidAndCompanyId(
173                    java.lang.String uuid, long companyId) throws PortalException;
174    
175            /**
176            * Updates the layout set prototype in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
177            *
178            * @param layoutSetPrototype the layout set prototype
179            * @return the layout set prototype that was updated
180            */
181            @Indexable(type = IndexableType.REINDEX)
182            public LayoutSetPrototype updateLayoutSetPrototype(
183                    LayoutSetPrototype layoutSetPrototype);
184    
185            public LayoutSetPrototype updateLayoutSetPrototype(
186                    long layoutSetPrototypeId, java.lang.String settings)
187                    throws PortalException;
188    
189            /**
190            * @deprecated As of 7.0.0, replaced by {@link
191            #updateLayoutSetPrototype(long, Map, Map, boolean, boolean,
192            ServiceContext)}
193            */
194            @java.lang.Deprecated
195            public LayoutSetPrototype updateLayoutSetPrototype(
196                    long layoutSetPrototypeId, Map<Locale, java.lang.String> nameMap,
197                    java.lang.String description, boolean active,
198                    boolean layoutsUpdateable, ServiceContext serviceContext)
199                    throws PortalException;
200    
201            public LayoutSetPrototype updateLayoutSetPrototype(
202                    long layoutSetPrototypeId, Map<Locale, java.lang.String> nameMap,
203                    Map<Locale, java.lang.String> descriptionMap, boolean active,
204                    boolean layoutsUpdateable, ServiceContext serviceContext)
205                    throws PortalException;
206    
207            /**
208            * @throws PortalException
209            */
210            @Override
211            public PersistedModel deletePersistedModel(PersistedModel persistedModel)
212                    throws PortalException;
213    
214            @Override
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public PersistedModel getPersistedModel(Serializable primaryKeyObj)
217                    throws PortalException;
218    
219            /**
220            * Returns the number of layout set prototypes.
221            *
222            * @return the number of layout set prototypes
223            */
224            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225            public int getLayoutSetPrototypesCount();
226    
227            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
228            public int searchCount(long companyId, java.lang.Boolean active);
229    
230            /**
231            * Returns the OSGi service identifier.
232            *
233            * @return the OSGi service identifier
234            */
235            public java.lang.String getOSGiServiceIdentifier();
236    
237            /**
238            * Performs a dynamic query on the database and returns the matching rows.
239            *
240            * @param dynamicQuery the dynamic query
241            * @return the matching rows
242            */
243            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery);
244    
245            /**
246            * Performs a dynamic query on the database and returns a range of the matching rows.
247            *
248            * <p>
249            * 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.
250            * </p>
251            *
252            * @param dynamicQuery the dynamic query
253            * @param start the lower bound of the range of model instances
254            * @param end the upper bound of the range of model instances (not inclusive)
255            * @return the range of matching rows
256            */
257            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
258                    int end);
259    
260            /**
261            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
262            *
263            * <p>
264            * 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.
265            * </p>
266            *
267            * @param dynamicQuery the dynamic query
268            * @param start the lower bound of the range of model instances
269            * @param end the upper bound of the range of model instances (not inclusive)
270            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
271            * @return the ordered range of matching rows
272            */
273            public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start,
274                    int end, OrderByComparator<T> orderByComparator);
275    
276            /**
277            * Returns a range of all the layout set prototypes.
278            *
279            * <p>
280            * 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.
281            * </p>
282            *
283            * @param start the lower bound of the range of layout set prototypes
284            * @param end the upper bound of the range of layout set prototypes (not inclusive)
285            * @return the range of layout set prototypes
286            */
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public List<LayoutSetPrototype> getLayoutSetPrototypes(int start, int end);
289    
290            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
291            public List<LayoutSetPrototype> getLayoutSetPrototypes(long companyId);
292    
293            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294            public List<LayoutSetPrototype> search(long companyId,
295                    java.lang.Boolean active, int start, int end,
296                    OrderByComparator<LayoutSetPrototype> obc);
297    
298            /**
299            * Returns the number of rows matching the dynamic query.
300            *
301            * @param dynamicQuery the dynamic query
302            * @return the number of rows matching the dynamic query
303            */
304            public long dynamicQueryCount(DynamicQuery dynamicQuery);
305    
306            /**
307            * Returns the number of rows matching the dynamic query.
308            *
309            * @param dynamicQuery the dynamic query
310            * @param projection the projection to apply to the query
311            * @return the number of rows matching the dynamic query
312            */
313            public long dynamicQueryCount(DynamicQuery dynamicQuery,
314                    Projection projection);
315    
316            public void deleteLayoutSetPrototypes() throws PortalException;
317    
318            public void deleteNondefaultLayoutSetPrototypes(long companyId)
319                    throws PortalException;
320    }