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.portlet.wiki.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    import com.liferay.portal.service.BaseLocalService;
027    import com.liferay.portal.service.PersistedModelLocalService;
028    
029    /**
030     * Provides the local service interface for WikiNode. Methods of this
031     * service will not have security checks based on the propagated JAAS
032     * credentials because this service can only be accessed from within the same
033     * VM.
034     *
035     * @author Brian Wing Shun Chan
036     * @see WikiNodeLocalServiceUtil
037     * @see com.liferay.portlet.wiki.service.base.WikiNodeLocalServiceBaseImpl
038     * @see com.liferay.portlet.wiki.service.impl.WikiNodeLocalServiceImpl
039     * @generated
040     */
041    @ProviderType
042    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
043            PortalException.class, SystemException.class})
044    public interface WikiNodeLocalService extends BaseLocalService,
045            PersistedModelLocalService {
046            /*
047             * NOTE FOR DEVELOPERS:
048             *
049             * Never modify or reference this interface directly. Always use {@link WikiNodeLocalServiceUtil} to access the wiki node local service. Add custom service methods to {@link com.liferay.portlet.wiki.service.impl.WikiNodeLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
050             */
051            public com.liferay.portlet.wiki.model.WikiNode addDefaultNode(long userId,
052                    com.liferay.portal.service.ServiceContext serviceContext)
053                    throws com.liferay.portal.kernel.exception.PortalException;
054    
055            public com.liferay.portlet.wiki.model.WikiNode addNode(long userId,
056                    java.lang.String name, java.lang.String description,
057                    com.liferay.portal.service.ServiceContext serviceContext)
058                    throws com.liferay.portal.kernel.exception.PortalException;
059    
060            public void addNodeResources(com.liferay.portlet.wiki.model.WikiNode node,
061                    boolean addGroupPermissions, boolean addGuestPermissions)
062                    throws com.liferay.portal.kernel.exception.PortalException;
063    
064            public void addNodeResources(com.liferay.portlet.wiki.model.WikiNode node,
065                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
066                    throws com.liferay.portal.kernel.exception.PortalException;
067    
068            public void addNodeResources(long nodeId, boolean addGroupPermissions,
069                    boolean addGuestPermissions)
070                    throws com.liferay.portal.kernel.exception.PortalException;
071    
072            public void addNodeResources(long nodeId,
073                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
074                    throws com.liferay.portal.kernel.exception.PortalException;
075    
076            /**
077            * Adds the wiki node to the database. Also notifies the appropriate model listeners.
078            *
079            * @param wikiNode the wiki node
080            * @return the wiki node that was added
081            */
082            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
083            public com.liferay.portlet.wiki.model.WikiNode addWikiNode(
084                    com.liferay.portlet.wiki.model.WikiNode wikiNode);
085    
086            /**
087            * Creates a new wiki node with the primary key. Does not add the wiki node to the database.
088            *
089            * @param nodeId the primary key for the new wiki node
090            * @return the new wiki node
091            */
092            public com.liferay.portlet.wiki.model.WikiNode createWikiNode(long nodeId);
093    
094            @com.liferay.portal.kernel.systemevent.SystemEvent(action = SystemEventConstants.ACTION_SKIP, type = SystemEventConstants.TYPE_DELETE)
095            public void deleteNode(com.liferay.portlet.wiki.model.WikiNode node)
096                    throws com.liferay.portal.kernel.exception.PortalException;
097    
098            public void deleteNode(long nodeId)
099                    throws com.liferay.portal.kernel.exception.PortalException;
100    
101            public void deleteNodes(long groupId)
102                    throws com.liferay.portal.kernel.exception.PortalException;
103    
104            /**
105            * @throws PortalException
106            */
107            @Override
108            public com.liferay.portal.model.PersistedModel deletePersistedModel(
109                    com.liferay.portal.model.PersistedModel persistedModel)
110                    throws com.liferay.portal.kernel.exception.PortalException;
111    
112            /**
113            * Deletes the wiki node with the primary key from the database. Also notifies the appropriate model listeners.
114            *
115            * @param nodeId the primary key of the wiki node
116            * @return the wiki node that was removed
117            * @throws PortalException if a wiki node with the primary key could not be found
118            */
119            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
120            public com.liferay.portlet.wiki.model.WikiNode deleteWikiNode(long nodeId)
121                    throws com.liferay.portal.kernel.exception.PortalException;
122    
123            /**
124            * Deletes the wiki node from the database. Also notifies the appropriate model listeners.
125            *
126            * @param wikiNode the wiki node
127            * @return the wiki node that was removed
128            */
129            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.DELETE)
130            public com.liferay.portlet.wiki.model.WikiNode deleteWikiNode(
131                    com.liferay.portlet.wiki.model.WikiNode wikiNode);
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.portlet.wiki.model.impl.WikiNodeModelImpl}. 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.portlet.wiki.model.impl.WikiNodeModelImpl}. 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.portlet.wiki.model.WikiNode fetchNode(long groupId,
200                    java.lang.String name);
201    
202            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
203            public com.liferay.portlet.wiki.model.WikiNode fetchNodeByUuidAndGroupId(
204                    java.lang.String uuid, long groupId);
205    
206            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
207            public com.liferay.portlet.wiki.model.WikiNode fetchWikiNode(long nodeId);
208    
209            /**
210            * Returns the wiki node matching the UUID and group.
211            *
212            * @param uuid the wiki node's UUID
213            * @param groupId the primary key of the group
214            * @return the matching wiki node, or <code>null</code> if a matching wiki node could not be found
215            */
216            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
217            public com.liferay.portlet.wiki.model.WikiNode fetchWikiNodeByUuidAndGroupId(
218                    java.lang.String uuid, long groupId);
219    
220            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
221            public com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery getActionableDynamicQuery();
222    
223            /**
224            * Returns the Spring bean ID for this bean.
225            *
226            * @return the Spring bean ID for this bean
227            */
228            public java.lang.String getBeanIdentifier();
229    
230            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
231            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getCompanyNodes(
232                    long companyId, int start, int end);
233    
234            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
235            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getCompanyNodes(
236                    long companyId, int status, int start, int end);
237    
238            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
239            public int getCompanyNodesCount(long companyId);
240    
241            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
242            public int getCompanyNodesCount(long companyId, int status);
243    
244            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
245            public com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery getExportActionableDynamicQuery(
246                    com.liferay.portal.kernel.lar.PortletDataContext portletDataContext);
247    
248            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
249            public com.liferay.portlet.wiki.model.WikiNode getNode(long groupId,
250                    java.lang.String nodeName)
251                    throws com.liferay.portal.kernel.exception.PortalException;
252    
253            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
254            public com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
255                    throws com.liferay.portal.kernel.exception.PortalException;
256    
257            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
258            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
259                    long groupId)
260                    throws com.liferay.portal.kernel.exception.PortalException;
261    
262            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
263            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
264                    long groupId, int start, int end)
265                    throws com.liferay.portal.kernel.exception.PortalException;
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
269                    long groupId, int status)
270                    throws com.liferay.portal.kernel.exception.PortalException;
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
274                    long groupId, int status, int start, int end)
275                    throws com.liferay.portal.kernel.exception.PortalException;
276    
277            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
278            public int getNodesCount(long groupId);
279    
280            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
281            public int getNodesCount(long groupId, int status);
282    
283            @Override
284            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
285            public com.liferay.portal.model.PersistedModel getPersistedModel(
286                    java.io.Serializable primaryKeyObj)
287                    throws com.liferay.portal.kernel.exception.PortalException;
288    
289            /**
290            * Returns the wiki node with the primary key.
291            *
292            * @param nodeId the primary key of the wiki node
293            * @return the wiki node
294            * @throws PortalException if a wiki node with the primary key could not be found
295            */
296            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
297            public com.liferay.portlet.wiki.model.WikiNode getWikiNode(long nodeId)
298                    throws com.liferay.portal.kernel.exception.PortalException;
299    
300            /**
301            * Returns the wiki node matching the UUID and group.
302            *
303            * @param uuid the wiki node's UUID
304            * @param groupId the primary key of the group
305            * @return the matching wiki node
306            * @throws PortalException if a matching wiki node could not be found
307            */
308            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
309            public com.liferay.portlet.wiki.model.WikiNode getWikiNodeByUuidAndGroupId(
310                    java.lang.String uuid, long groupId)
311                    throws com.liferay.portal.kernel.exception.PortalException;
312    
313            /**
314            * Returns a range of all the wiki nodes.
315            *
316            * <p>
317            * 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.portlet.wiki.model.impl.WikiNodeModelImpl}. 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.
318            * </p>
319            *
320            * @param start the lower bound of the range of wiki nodes
321            * @param end the upper bound of the range of wiki nodes (not inclusive)
322            * @return the range of wiki nodes
323            */
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getWikiNodes(
326                    int start, int end);
327    
328            /**
329            * Returns all the wiki nodes matching the UUID and company.
330            *
331            * @param uuid the UUID of the wiki nodes
332            * @param companyId the primary key of the company
333            * @return the matching wiki nodes, or an empty list if no matches were found
334            */
335            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
336            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getWikiNodesByUuidAndCompanyId(
337                    java.lang.String uuid, long companyId);
338    
339            /**
340            * Returns a range of wiki nodes matching the UUID and company.
341            *
342            * @param uuid the UUID of the wiki nodes
343            * @param companyId the primary key of the company
344            * @param start the lower bound of the range of wiki nodes
345            * @param end the upper bound of the range of wiki nodes (not inclusive)
346            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
347            * @return the range of matching wiki nodes, or an empty list if no matches were found
348            */
349            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
350            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getWikiNodesByUuidAndCompanyId(
351                    java.lang.String uuid, long companyId, int start, int end,
352                    com.liferay.portal.kernel.util.OrderByComparator<com.liferay.portlet.wiki.model.WikiNode> orderByComparator);
353    
354            /**
355            * Returns the number of wiki nodes.
356            *
357            * @return the number of wiki nodes
358            */
359            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
360            public int getWikiNodesCount();
361    
362            public void importPages(long userId, long nodeId,
363                    java.lang.String importer, java.io.InputStream[] inputStreams,
364                    java.util.Map<java.lang.String, java.lang.String[]> options)
365                    throws com.liferay.portal.kernel.exception.PortalException;
366    
367            public com.liferay.portlet.wiki.model.WikiNode moveNodeToTrash(
368                    long userId, com.liferay.portlet.wiki.model.WikiNode node)
369                    throws com.liferay.portal.kernel.exception.PortalException;
370    
371            public com.liferay.portlet.wiki.model.WikiNode moveNodeToTrash(
372                    long userId, long nodeId)
373                    throws com.liferay.portal.kernel.exception.PortalException;
374    
375            public void restoreNodeFromTrash(long userId,
376                    com.liferay.portlet.wiki.model.WikiNode node)
377                    throws com.liferay.portal.kernel.exception.PortalException;
378    
379            /**
380            * Sets the Spring bean ID for this bean.
381            *
382            * @param beanIdentifier the Spring bean ID for this bean
383            */
384            public void setBeanIdentifier(java.lang.String beanIdentifier);
385    
386            public void subscribeNode(long userId, long nodeId)
387                    throws com.liferay.portal.kernel.exception.PortalException;
388    
389            public void unsubscribeNode(long userId, long nodeId)
390                    throws com.liferay.portal.kernel.exception.PortalException;
391    
392            public com.liferay.portlet.wiki.model.WikiNode updateNode(long nodeId,
393                    java.lang.String name, java.lang.String description,
394                    com.liferay.portal.service.ServiceContext serviceContext)
395                    throws com.liferay.portal.kernel.exception.PortalException;
396    
397            public com.liferay.portlet.wiki.model.WikiNode updateStatus(long userId,
398                    com.liferay.portlet.wiki.model.WikiNode node, int status,
399                    com.liferay.portal.service.ServiceContext serviceContext)
400                    throws com.liferay.portal.kernel.exception.PortalException;
401    
402            /**
403            * Updates the wiki node in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
404            *
405            * @param wikiNode the wiki node
406            * @return the wiki node that was updated
407            */
408            @com.liferay.portal.kernel.search.Indexable(type = IndexableType.REINDEX)
409            public com.liferay.portlet.wiki.model.WikiNode updateWikiNode(
410                    com.liferay.portlet.wiki.model.WikiNode wikiNode);
411    }