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 com.liferay.portal.kernel.exception.PortalException;
064    
065            public void checkPortlets(long companyId)
066                    throws com.liferay.portal.kernel.exception.PortalException;
067    
068            @com.liferay.portal.kernel.spring.aop.Skip
069            public void clearCache();
070    
071            @com.liferay.portal.kernel.cluster.Clusterable
072            @com.liferay.portal.kernel.transaction.Transactional(enabled = false)
073            public void clearCompanyPortletsPool();
074    
075            /**
076            * @deprecated As of 6.1.0, replaced by {@link #clonePortlet(String)}
077            */
078            @java.lang.Deprecated
079            @com.liferay.portal.kernel.spring.aop.Skip
080            public com.liferay.portal.model.Portlet clonePortlet(long companyId,
081                    java.lang.String portletId);
082    
083            @com.liferay.portal.kernel.spring.aop.Skip
084            public com.liferay.portal.model.Portlet clonePortlet(
085                    java.lang.String portletId);
086    
087            /**
088            * Creates a new portlet with the primary key. Does not add the portlet to the database.
089            *
090            * @param id the primary key for the new portlet
091            * @return the new portlet
092            */
093            public com.liferay.portal.model.Portlet createPortlet(long id);
094    
095            /**
096            * @throws PortalException
097            */
098            @Override
099            public com.liferay.portal.model.PersistedModel deletePersistedModel(
100                    com.liferay.portal.model.PersistedModel persistedModel)
101                    throws com.liferay.portal.kernel.exception.PortalException;
102    
103            public void deletePortlet(long companyId, java.lang.String portletId,
104                    long plid) throws com.liferay.portal.kernel.exception.PortalException;
105    
106            /**
107            * Deletes the portlet with the primary key from the database. Also notifies the appropriate model listeners.
108            *
109            * @param id the primary key of the portlet
110            * @return the portlet that was removed
111            * @throws PortalException if a portlet with the primary key could not be found
112            */
113            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
114            public com.liferay.portal.model.Portlet deletePortlet(long id)
115                    throws com.liferay.portal.kernel.exception.PortalException;
116    
117            /**
118            * Deletes the portlet from the database. Also notifies the appropriate model listeners.
119            *
120            * @param portlet the portlet
121            * @return the portlet that was removed
122            */
123            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
124            public com.liferay.portal.model.Portlet deletePortlet(
125                    com.liferay.portal.model.Portlet portlet);
126    
127            public void deletePortlets(long companyId, java.lang.String[] portletIds,
128                    long plid) throws com.liferay.portal.kernel.exception.PortalException;
129    
130            public com.liferay.portal.model.Portlet deployRemotePortlet(
131                    com.liferay.portal.model.Portlet portlet, java.lang.String categoryName)
132                    throws com.liferay.portal.kernel.exception.PortalException;
133    
134            public com.liferay.portal.model.Portlet deployRemotePortlet(
135                    com.liferay.portal.model.Portlet portlet,
136                    java.lang.String[] categoryNames)
137                    throws com.liferay.portal.kernel.exception.PortalException;
138    
139            public com.liferay.portal.model.Portlet deployRemotePortlet(
140                    com.liferay.portal.model.Portlet portlet,
141                    java.lang.String[] categoryNames, boolean eagerDestroy)
142                    throws com.liferay.portal.kernel.exception.PortalException;
143    
144            @com.liferay.portal.kernel.spring.aop.Skip
145            public void destroyPortlet(com.liferay.portal.model.Portlet portlet);
146    
147            @com.liferay.portal.kernel.spring.aop.Skip
148            public void destroyRemotePortlet(com.liferay.portal.model.Portlet portlet);
149    
150            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
151    
152            /**
153            * Performs a dynamic query on the database and returns the matching rows.
154            *
155            * @param dynamicQuery the dynamic query
156            * @return the matching rows
157            */
158            public <T> java.util.List<T> dynamicQuery(
159                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
160    
161            /**
162            * Performs a dynamic query on the database and returns a range of the matching rows.
163            *
164            * <p>
165            * 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.
166            * </p>
167            *
168            * @param dynamicQuery the dynamic query
169            * @param start the lower bound of the range of model instances
170            * @param end the upper bound of the range of model instances (not inclusive)
171            * @return the 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    
177            /**
178            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
179            *
180            * <p>
181            * 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.
182            * </p>
183            *
184            * @param dynamicQuery the dynamic query
185            * @param start the lower bound of the range of model instances
186            * @param end the upper bound of the range of model instances (not inclusive)
187            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
188            * @return the ordered range of matching rows
189            */
190            public <T> java.util.List<T> dynamicQuery(
191                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
192                    int end,
193                    com.liferay.portal.kernel.util.OrderByComparator<T> orderByComparator);
194    
195            /**
196            * Returns the number of rows matching the dynamic query.
197            *
198            * @param dynamicQuery the dynamic query
199            * @return the number of rows matching the dynamic query
200            */
201            public long dynamicQueryCount(
202                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery);
203    
204            /**
205            * Returns the number of rows matching the dynamic query.
206            *
207            * @param dynamicQuery the dynamic query
208            * @param projection the projection to apply to the query
209            * @return the number of rows matching the dynamic query
210            */
211            public long dynamicQueryCount(
212                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
213                    com.liferay.portal.kernel.dao.orm.Projection projection);
214    
215            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
216            public com.liferay.portal.model.Portlet fetchPortlet(long id);
217    
218            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
219            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
220    
221            /**
222            * Returns the Spring bean ID for this bean.
223            *
224            * @return the Spring bean ID for this bean
225            */
226            public java.lang.String getBeanIdentifier();
227    
228            @com.liferay.portal.kernel.spring.aop.Skip
229            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
230            public java.util.List<com.liferay.portlet.expando.model.CustomAttributesDisplay> getCustomAttributesDisplays();
231    
232            @com.liferay.portal.kernel.spring.aop.Skip
233            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
234            public com.liferay.portal.model.PortletCategory getEARDisplay(
235                    java.lang.String xml);
236    
237            @com.liferay.portal.kernel.spring.aop.Skip
238            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239            public java.util.List<com.liferay.portal.model.Portlet> getFriendlyURLMapperPortlets();
240    
241            @com.liferay.portal.kernel.spring.aop.Skip
242            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
243            public java.util.List<com.liferay.portal.kernel.portlet.FriendlyURLMapper> getFriendlyURLMappers();
244    
245            @Override
246            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
247            public com.liferay.portal.model.PersistedModel getPersistedModel(
248                    java.io.Serializable primaryKeyObj)
249                    throws com.liferay.portal.kernel.exception.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 com.liferay.portal.kernel.exception.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> loadGetPortletsPool(
345                    long companyId);
346    
347            @com.liferay.portal.kernel.cluster.Clusterable
348            @com.liferay.portal.kernel.transaction.Transactional(enabled = false)
349            public void removeCompanyPortletsPool(long companyId);
350    
351            /**
352            * Sets the Spring bean ID for this bean.
353            *
354            * @param beanIdentifier the Spring bean ID for this bean
355            */
356            public void setBeanIdentifier(java.lang.String beanIdentifier);
357    
358            public com.liferay.portal.model.Portlet updatePortlet(long companyId,
359                    java.lang.String portletId, java.lang.String roles, boolean active);
360    
361            /**
362            * Updates the portlet in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
363            *
364            * @param portlet the portlet
365            * @return the portlet that was updated
366            */
367            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
368            public com.liferay.portal.model.Portlet updatePortlet(
369                    com.liferay.portal.model.Portlet portlet);
370    }