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    
026    /**
027     * Provides the local service interface for Portlet. Methods of this
028     * service will not have security checks based on the propagated JAAS
029     * credentials because this service can only be accessed from within the same
030     * VM.
031     *
032     * @author Brian Wing Shun Chan
033     * @see PortletLocalServiceUtil
034     * @see com.liferay.portal.service.base.PortletLocalServiceBaseImpl
035     * @see com.liferay.portal.service.impl.PortletLocalServiceImpl
036     * @generated
037     */
038    @ProviderType
039    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
040            PortalException.class, SystemException.class})
041    public interface PortletLocalService extends BaseLocalService,
042            PersistedModelLocalService {
043            /*
044             * NOTE FOR DEVELOPERS:
045             *
046             * Never modify or reference this interface directly. Always use {@link PortletLocalServiceUtil} to access the portlet local service. Add custom service methods to {@link com.liferay.portal.service.impl.PortletLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
047             */
048    
049            /**
050            * Adds the portlet to the database. Also notifies the appropriate model listeners.
051            *
052            * @param portlet the portlet
053            * @return the portlet that was added
054            */
055            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
056            public com.liferay.portal.model.Portlet addPortlet(
057                    com.liferay.portal.model.Portlet portlet);
058    
059            @com.liferay.portal.kernel.spring.aop.Skip
060            public void addPortletCategory(long companyId, java.lang.String categoryName);
061    
062            public void checkPortlet(com.liferay.portal.model.Portlet portlet)
063                    throws PortalException;
064    
065            public void checkPortlets(long companyId) throws PortalException;
066    
067            @com.liferay.portal.kernel.spring.aop.Skip
068            public void clearCache();
069    
070            /**
071            * @deprecated As of 7.0.0, replaced by {@link #clearPortletsMap)}
072            */
073            @com.liferay.portal.kernel.cluster.Clusterable
074            @java.lang.Deprecated
075            @Transactional(enabled = false)
076            public void clearCompanyPortletsPool();
077    
078            @com.liferay.portal.kernel.cluster.Clusterable
079            @Transactional(enabled = false)
080            public void clearPortletsMap();
081    
082            @com.liferay.portal.kernel.spring.aop.Skip
083            public com.liferay.portal.model.Portlet clonePortlet(
084                    java.lang.String portletId);
085    
086            /**
087            * Creates a new portlet with the primary key. Does not add the portlet to the database.
088            *
089            * @param id the primary key for the new portlet
090            * @return the new portlet
091            */
092            public com.liferay.portal.model.Portlet createPortlet(long id);
093    
094            /**
095            * @throws PortalException
096            */
097            @Override
098            public com.liferay.portal.model.PersistedModel deletePersistedModel(
099                    com.liferay.portal.model.PersistedModel persistedModel)
100                    throws PortalException;
101    
102            public void deletePortlet(long companyId, java.lang.String portletId,
103                    long plid) throws PortalException;
104    
105            /**
106            * Deletes the portlet with the primary key from the database. Also notifies the appropriate model listeners.
107            *
108            * @param id the primary key of the portlet
109            * @return the portlet that was removed
110            * @throws PortalException if a portlet with the primary key could not be found
111            */
112            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
113            public com.liferay.portal.model.Portlet deletePortlet(long id)
114                    throws PortalException;
115    
116            /**
117            * Deletes the portlet from the database. Also notifies the appropriate model listeners.
118            *
119            * @param portlet the portlet
120            * @return the portlet that was removed
121            */
122            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
123            public com.liferay.portal.model.Portlet deletePortlet(
124                    com.liferay.portal.model.Portlet portlet);
125    
126            public void deletePortlets(long companyId, java.lang.String[] portletIds,
127                    long plid) throws PortalException;
128    
129            public com.liferay.portal.model.Portlet deployRemotePortlet(
130                    com.liferay.portal.model.Portlet portlet, java.lang.String categoryName)
131                    throws PortalException;
132    
133            public com.liferay.portal.model.Portlet deployRemotePortlet(
134                    com.liferay.portal.model.Portlet portlet,
135                    java.lang.String[] categoryNames) throws PortalException;
136    
137            public com.liferay.portal.model.Portlet deployRemotePortlet(
138                    com.liferay.portal.model.Portlet portlet,
139                    java.lang.String[] categoryNames, boolean eagerDestroy)
140                    throws PortalException;
141    
142            @com.liferay.portal.kernel.spring.aop.Skip
143            public void destroyPortlet(com.liferay.portal.model.Portlet portlet);
144    
145            @com.liferay.portal.kernel.spring.aop.Skip
146            public void destroyRemotePortlet(com.liferay.portal.model.Portlet portlet);
147    
148            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
149    
150            /**
151            * Performs a dynamic query on the database and returns the matching rows.
152            *
153            * @param dynamicQuery the dynamic query
154            * @return the matching rows
155            */
156            public <T> java.util.List<T> dynamicQuery(
157                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
158    
159            /**
160            * Performs a dynamic query on the database and returns a range of the matching rows.
161            *
162            * <p>
163            * 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.PortletModelImpl}. 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.
164            * </p>
165            *
166            * @param dynamicQuery the dynamic query
167            * @param start the lower bound of the range of model instances
168            * @param end the upper bound of the range of model instances (not inclusive)
169            * @return the range of matching rows
170            */
171            public <T> java.util.List<T> dynamicQuery(
172                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
173                    int end);
174    
175            /**
176            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
177            *
178            * <p>
179            * 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.PortletModelImpl}. 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.
180            * </p>
181            *
182            * @param dynamicQuery the dynamic query
183            * @param start the lower bound of the range of model instances
184            * @param end the upper bound of the range of model instances (not inclusive)
185            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
186            * @return the ordered range of matching rows
187            */
188            public <T> java.util.List<T> dynamicQuery(
189                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
190                    int end,
191                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
192    
193            /**
194            * Returns the number of rows matching the dynamic query.
195            *
196            * @param dynamicQuery the dynamic query
197            * @return the number of rows matching the dynamic query
198            */
199            public long dynamicQueryCount(
200                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
201    
202            /**
203            * Returns the number of rows matching the dynamic query.
204            *
205            * @param dynamicQuery the dynamic query
206            * @param projection the projection to apply to the query
207            * @return the number of rows matching the dynamic query
208            */
209            public long dynamicQueryCount(
210                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
211                    com.liferay.portal.kernel.dao.orm.Projection projection);
212    
213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214            public com.liferay.portal.model.Portlet fetchPortlet(long id);
215    
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
218    
219            @com.liferay.portal.kernel.spring.aop.Skip
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public java.util.List<com.liferay.portlet.expando.model.CustomAttributesDisplay> getCustomAttributesDisplays();
222    
223            @com.liferay.portal.kernel.spring.aop.Skip
224            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
225            public com.liferay.portal.model.PortletCategory getEARDisplay(
226                    java.lang.String xml);
227    
228            @com.liferay.portal.kernel.spring.aop.Skip
229            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230            public java.util.List<com.liferay.portal.model.Portlet> getFriendlyURLMapperPortlets();
231    
232            @com.liferay.portal.kernel.spring.aop.Skip
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public java.util.List<com.liferay.portal.kernel.portlet.FriendlyURLMapper> getFriendlyURLMappers();
235    
236            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
237            public com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery getIndexableActionableDynamicQuery();
238    
239            /**
240            * Returns the OSGi service identifier.
241            *
242            * @return the OSGi service identifier
243            */
244            public java.lang.String getOSGiServiceIdentifier();
245    
246            @Override
247            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
248            public com.liferay.portal.model.PersistedModel getPersistedModel(
249                    java.io.Serializable primaryKeyObj) throws PortalException;
250    
251            /**
252            * Returns the portlet with the primary key.
253            *
254            * @param id the primary key of the portlet
255            * @return the portlet
256            * @throws PortalException if a portlet with the primary key could not be found
257            */
258            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
259            public com.liferay.portal.model.Portlet getPortlet(long id)
260                    throws PortalException;
261    
262            @com.liferay.portal.kernel.spring.aop.Skip
263            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
264            public com.liferay.portal.model.PortletApp getPortletApp(
265                    java.lang.String servletContextName);
266    
267            @com.liferay.portal.kernel.spring.aop.Skip
268            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
269            public com.liferay.portal.model.Portlet getPortletById(long companyId,
270                    java.lang.String portletId);
271    
272            @com.liferay.portal.kernel.spring.aop.Skip
273            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
274            public com.liferay.portal.model.Portlet getPortletById(
275                    java.lang.String portletId);
276    
277            @com.liferay.portal.kernel.spring.aop.Skip
278            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
279            public com.liferay.portal.model.Portlet getPortletByStrutsPath(
280                    long companyId, java.lang.String strutsPath);
281    
282            @com.liferay.portal.kernel.spring.aop.Skip
283            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
284            public java.util.List<com.liferay.portal.model.Portlet> getPortlets();
285    
286            @com.liferay.portal.kernel.spring.aop.Skip
287            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
288            public java.util.List<com.liferay.portal.model.Portlet> getPortlets(
289                    long companyId);
290    
291            @com.liferay.portal.kernel.spring.aop.Skip
292            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
293            public java.util.List<com.liferay.portal.model.Portlet> getPortlets(
294                    long companyId, boolean showSystem, boolean showPortal);
295    
296            /**
297            * Returns a range of all the portlets.
298            *
299            * <p>
300            * 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.PortletModelImpl}. 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.
301            * </p>
302            *
303            * @param start the lower bound of the range of portlets
304            * @param end the upper bound of the range of portlets (not inclusive)
305            * @return the range of portlets
306            */
307            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
308            public java.util.List<com.liferay.portal.model.Portlet> getPortlets(
309                    int start, int end);
310    
311            /**
312            * Returns the number of portlets.
313            *
314            * @return the number of portlets
315            */
316            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
317            public int getPortletsCount();
318    
319            @com.liferay.portal.kernel.spring.aop.Skip
320            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
321            public java.util.List<com.liferay.portal.model.Portlet> getScopablePortlets();
322    
323            @com.liferay.portal.kernel.spring.aop.Skip
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public com.liferay.portal.model.PortletCategory getWARDisplay(
326                    java.lang.String servletContextName, java.lang.String xml);
327    
328            @com.liferay.portal.kernel.spring.aop.Skip
329            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
330            public boolean hasPortlet(long companyId, java.lang.String portletId);
331    
332            @com.liferay.portal.kernel.spring.aop.Skip
333            public void initEAR(javax.servlet.ServletContext servletContext,
334                    java.lang.String[] xmls,
335                    com.liferay.portal.kernel.plugin.PluginPackage pluginPackage);
336    
337            @com.liferay.portal.kernel.spring.aop.Skip
338            public java.util.List<com.liferay.portal.model.Portlet> initWAR(
339                    java.lang.String servletContextName,
340                    javax.servlet.ServletContext servletContext, java.lang.String[] xmls,
341                    com.liferay.portal.kernel.plugin.PluginPackage pluginPackage);
342    
343            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
344            public java.util.Map<java.lang.String, com.liferay.portal.model.Portlet> loadGetPortletsMap(
345                    long companyId);
346    
347            /**
348            * @deprecated As of 7.0.0, replaced by {@link #loadGetPortletsMap(long))}
349            */
350            @java.lang.Deprecated
351            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
352            public java.util.Map<java.lang.String, com.liferay.portal.model.Portlet> loadGetPortletsPool(
353                    long companyId);
354    
355            @com.liferay.portal.kernel.cluster.Clusterable
356            @Transactional(enabled = false)
357            public void removeCompanyPortletsPool(long companyId);
358    
359            public com.liferay.portal.model.Portlet updatePortlet(long companyId,
360                    java.lang.String portletId, java.lang.String roles, boolean active);
361    
362            /**
363            * Updates the portlet in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
364            *
365            * @param portlet the portlet
366            * @return the portlet that was updated
367            */
368            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
369            public com.liferay.portal.model.Portlet updatePortlet(
370                    com.liferay.portal.model.Portlet portlet);
371    }