001    /**
002     * Copyright (c) 2000-2013 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.transaction.Isolation;
022    import com.liferay.portal.kernel.transaction.Propagation;
023    import com.liferay.portal.kernel.transaction.Transactional;
024    import com.liferay.portal.service.BaseLocalService;
025    import com.liferay.portal.service.PersistedModelLocalService;
026    
027    /**
028     * Provides the local service interface for WikiNode. Methods of this
029     * service will not have security checks based on the propagated JAAS
030     * credentials because this service can only be accessed from within the same
031     * VM.
032     *
033     * @author Brian Wing Shun Chan
034     * @see WikiNodeLocalServiceUtil
035     * @see com.liferay.portlet.wiki.service.base.WikiNodeLocalServiceBaseImpl
036     * @see com.liferay.portlet.wiki.service.impl.WikiNodeLocalServiceImpl
037     * @generated
038     */
039    @ProviderType
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface WikiNodeLocalService extends BaseLocalService,
043            PersistedModelLocalService {
044            /*
045             * NOTE FOR DEVELOPERS:
046             *
047             * 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.
048             */
049    
050            /**
051            * Adds the wiki node to the database. Also notifies the appropriate model listeners.
052            *
053            * @param wikiNode the wiki node
054            * @return the wiki node that was added
055            * @throws SystemException if a system exception occurred
056            */
057            public com.liferay.portlet.wiki.model.WikiNode addWikiNode(
058                    com.liferay.portlet.wiki.model.WikiNode wikiNode)
059                    throws com.liferay.portal.kernel.exception.SystemException;
060    
061            /**
062            * Creates a new wiki node with the primary key. Does not add the wiki node to the database.
063            *
064            * @param nodeId the primary key for the new wiki node
065            * @return the new wiki node
066            */
067            public com.liferay.portlet.wiki.model.WikiNode createWikiNode(long nodeId);
068    
069            /**
070            * Deletes the wiki node with the primary key from the database. Also notifies the appropriate model listeners.
071            *
072            * @param nodeId the primary key of the wiki node
073            * @return the wiki node that was removed
074            * @throws PortalException if a wiki node with the primary key could not be found
075            * @throws SystemException if a system exception occurred
076            */
077            public com.liferay.portlet.wiki.model.WikiNode deleteWikiNode(long nodeId)
078                    throws com.liferay.portal.kernel.exception.PortalException,
079                            com.liferay.portal.kernel.exception.SystemException;
080    
081            /**
082            * Deletes the wiki node from the database. Also notifies the appropriate model listeners.
083            *
084            * @param wikiNode the wiki node
085            * @return the wiki node that was removed
086            * @throws SystemException if a system exception occurred
087            */
088            public com.liferay.portlet.wiki.model.WikiNode deleteWikiNode(
089                    com.liferay.portlet.wiki.model.WikiNode wikiNode)
090                    throws com.liferay.portal.kernel.exception.SystemException;
091    
092            public com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery();
093    
094            /**
095            * Performs a dynamic query on the database and returns the matching rows.
096            *
097            * @param dynamicQuery the dynamic query
098            * @return the matching rows
099            * @throws SystemException if a system exception occurred
100            */
101            @SuppressWarnings("rawtypes")
102            public java.util.List dynamicQuery(
103                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
104                    throws com.liferay.portal.kernel.exception.SystemException;
105    
106            /**
107            * Performs a dynamic query on the database and returns a range of the matching rows.
108            *
109            * <p>
110            * 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.
111            * </p>
112            *
113            * @param dynamicQuery the dynamic query
114            * @param start the lower bound of the range of model instances
115            * @param end the upper bound of the range of model instances (not inclusive)
116            * @return the range of matching rows
117            * @throws SystemException if a system exception occurred
118            */
119            @SuppressWarnings("rawtypes")
120            public java.util.List dynamicQuery(
121                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
122                    int end) throws com.liferay.portal.kernel.exception.SystemException;
123    
124            /**
125            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
126            *
127            * <p>
128            * 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.
129            * </p>
130            *
131            * @param dynamicQuery the dynamic query
132            * @param start the lower bound of the range of model instances
133            * @param end the upper bound of the range of model instances (not inclusive)
134            * @param orderByComparator the comparator to order the results by (optionally <code>null</code>)
135            * @return the ordered range of matching rows
136            * @throws SystemException if a system exception occurred
137            */
138            @SuppressWarnings("rawtypes")
139            public java.util.List dynamicQuery(
140                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
141                    int end,
142                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
143                    throws com.liferay.portal.kernel.exception.SystemException;
144    
145            /**
146            * Returns the number of rows that match the dynamic query.
147            *
148            * @param dynamicQuery the dynamic query
149            * @return the number of rows that match the dynamic query
150            * @throws SystemException if a system exception occurred
151            */
152            public long dynamicQueryCount(
153                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
154                    throws com.liferay.portal.kernel.exception.SystemException;
155    
156            /**
157            * Returns the number of rows that match the dynamic query.
158            *
159            * @param dynamicQuery the dynamic query
160            * @param projection the projection to apply to the query
161            * @return the number of rows that match the dynamic query
162            * @throws SystemException if a system exception occurred
163            */
164            public long dynamicQueryCount(
165                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery,
166                    com.liferay.portal.kernel.dao.orm.Projection projection)
167                    throws com.liferay.portal.kernel.exception.SystemException;
168    
169            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
170            public com.liferay.portlet.wiki.model.WikiNode fetchWikiNode(long nodeId)
171                    throws com.liferay.portal.kernel.exception.SystemException;
172    
173            /**
174            * Returns the wiki node with the matching UUID and company.
175            *
176            * @param uuid the wiki node's UUID
177            * @param companyId the primary key of the company
178            * @return the matching wiki node, or <code>null</code> if a matching wiki node could not be found
179            * @throws SystemException if a system exception occurred
180            */
181            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
182            public com.liferay.portlet.wiki.model.WikiNode fetchWikiNodeByUuidAndCompanyId(
183                    java.lang.String uuid, long companyId)
184                    throws com.liferay.portal.kernel.exception.SystemException;
185    
186            /**
187            * Returns the wiki node matching the UUID and group.
188            *
189            * @param uuid the wiki node's UUID
190            * @param groupId the primary key of the group
191            * @return the matching wiki node, or <code>null</code> if a matching wiki node could not be found
192            * @throws SystemException if a system exception occurred
193            */
194            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
195            public com.liferay.portlet.wiki.model.WikiNode fetchWikiNodeByUuidAndGroupId(
196                    java.lang.String uuid, long groupId)
197                    throws com.liferay.portal.kernel.exception.SystemException;
198    
199            /**
200            * Returns the wiki node with the primary key.
201            *
202            * @param nodeId the primary key of the wiki node
203            * @return the wiki node
204            * @throws PortalException if a wiki node with the primary key could not be found
205            * @throws SystemException if a system exception occurred
206            */
207            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
208            public com.liferay.portlet.wiki.model.WikiNode getWikiNode(long nodeId)
209                    throws com.liferay.portal.kernel.exception.PortalException,
210                            com.liferay.portal.kernel.exception.SystemException;
211    
212            @Override
213            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
214            public com.liferay.portal.model.PersistedModel getPersistedModel(
215                    java.io.Serializable primaryKeyObj)
216                    throws com.liferay.portal.kernel.exception.PortalException,
217                            com.liferay.portal.kernel.exception.SystemException;
218    
219            /**
220            * Returns the wiki node with the matching UUID and company.
221            *
222            * @param uuid the wiki node's UUID
223            * @param companyId the primary key of the company
224            * @return the matching wiki node
225            * @throws PortalException if a matching wiki node could not be found
226            * @throws SystemException if a system exception occurred
227            */
228            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
229            public com.liferay.portlet.wiki.model.WikiNode getWikiNodeByUuidAndCompanyId(
230                    java.lang.String uuid, long companyId)
231                    throws com.liferay.portal.kernel.exception.PortalException,
232                            com.liferay.portal.kernel.exception.SystemException;
233    
234            /**
235            * Returns the wiki node matching the UUID and group.
236            *
237            * @param uuid the wiki node's UUID
238            * @param groupId the primary key of the group
239            * @return the matching wiki node
240            * @throws PortalException if a matching wiki node could not be found
241            * @throws SystemException if a system exception occurred
242            */
243            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
244            public com.liferay.portlet.wiki.model.WikiNode getWikiNodeByUuidAndGroupId(
245                    java.lang.String uuid, long groupId)
246                    throws com.liferay.portal.kernel.exception.PortalException,
247                            com.liferay.portal.kernel.exception.SystemException;
248    
249            /**
250            * Returns a range of all the wiki nodes.
251            *
252            * <p>
253            * 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.
254            * </p>
255            *
256            * @param start the lower bound of the range of wiki nodes
257            * @param end the upper bound of the range of wiki nodes (not inclusive)
258            * @return the range of wiki nodes
259            * @throws SystemException if a system exception occurred
260            */
261            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
262            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getWikiNodes(
263                    int start, int end)
264                    throws com.liferay.portal.kernel.exception.SystemException;
265    
266            /**
267            * Returns the number of wiki nodes.
268            *
269            * @return the number of wiki nodes
270            * @throws SystemException if a system exception occurred
271            */
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public int getWikiNodesCount()
274                    throws com.liferay.portal.kernel.exception.SystemException;
275    
276            /**
277            * Updates the wiki node in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
278            *
279            * @param wikiNode the wiki node
280            * @return the wiki node that was updated
281            * @throws SystemException if a system exception occurred
282            */
283            public com.liferay.portlet.wiki.model.WikiNode updateWikiNode(
284                    com.liferay.portlet.wiki.model.WikiNode wikiNode)
285                    throws com.liferay.portal.kernel.exception.SystemException;
286    
287            /**
288            * Returns the Spring bean ID for this bean.
289            *
290            * @return the Spring bean ID for this bean
291            */
292            public java.lang.String getBeanIdentifier();
293    
294            /**
295            * Sets the Spring bean ID for this bean.
296            *
297            * @param beanIdentifier the Spring bean ID for this bean
298            */
299            public void setBeanIdentifier(java.lang.String beanIdentifier);
300    
301            public com.liferay.portlet.wiki.model.WikiNode addDefaultNode(long userId,
302                    com.liferay.portal.service.ServiceContext serviceContext)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException;
305    
306            public com.liferay.portlet.wiki.model.WikiNode addNode(long userId,
307                    java.lang.String name, java.lang.String description,
308                    com.liferay.portal.service.ServiceContext serviceContext)
309                    throws com.liferay.portal.kernel.exception.PortalException,
310                            com.liferay.portal.kernel.exception.SystemException;
311    
312            public void addNodeResources(long nodeId, boolean addGroupPermissions,
313                    boolean addGuestPermissions)
314                    throws com.liferay.portal.kernel.exception.PortalException,
315                            com.liferay.portal.kernel.exception.SystemException;
316    
317            public void addNodeResources(long nodeId,
318                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
319                    throws com.liferay.portal.kernel.exception.PortalException,
320                            com.liferay.portal.kernel.exception.SystemException;
321    
322            public void addNodeResources(com.liferay.portlet.wiki.model.WikiNode node,
323                    boolean addGroupPermissions, boolean addGuestPermissions)
324                    throws com.liferay.portal.kernel.exception.PortalException,
325                            com.liferay.portal.kernel.exception.SystemException;
326    
327            public void addNodeResources(com.liferay.portlet.wiki.model.WikiNode node,
328                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
329                    throws com.liferay.portal.kernel.exception.PortalException,
330                            com.liferay.portal.kernel.exception.SystemException;
331    
332            public void deleteNode(long nodeId)
333                    throws com.liferay.portal.kernel.exception.PortalException,
334                            com.liferay.portal.kernel.exception.SystemException;
335    
336            public void deleteNode(com.liferay.portlet.wiki.model.WikiNode node)
337                    throws com.liferay.portal.kernel.exception.PortalException,
338                            com.liferay.portal.kernel.exception.SystemException;
339    
340            public void deleteNodes(long groupId)
341                    throws com.liferay.portal.kernel.exception.PortalException,
342                            com.liferay.portal.kernel.exception.SystemException;
343    
344            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
345            public com.liferay.portlet.wiki.model.WikiNode fetchNode(long groupId,
346                    java.lang.String name)
347                    throws com.liferay.portal.kernel.exception.SystemException;
348    
349            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
350            public com.liferay.portlet.wiki.model.WikiNode fetchNodeByUuidAndGroupId(
351                    java.lang.String uuid, long groupId)
352                    throws com.liferay.portal.kernel.exception.SystemException;
353    
354            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
355            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getCompanyNodes(
356                    long companyId, int start, int end)
357                    throws com.liferay.portal.kernel.exception.SystemException;
358    
359            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
360            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getCompanyNodes(
361                    long companyId, int status, int start, int end)
362                    throws com.liferay.portal.kernel.exception.SystemException;
363    
364            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
365            public int getCompanyNodesCount(long companyId)
366                    throws com.liferay.portal.kernel.exception.SystemException;
367    
368            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
369            public int getCompanyNodesCount(long companyId, int status)
370                    throws com.liferay.portal.kernel.exception.SystemException;
371    
372            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
373            public com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
374                    throws com.liferay.portal.kernel.exception.PortalException,
375                            com.liferay.portal.kernel.exception.SystemException;
376    
377            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
378            public com.liferay.portlet.wiki.model.WikiNode getNode(long groupId,
379                    java.lang.String nodeName)
380                    throws com.liferay.portal.kernel.exception.PortalException,
381                            com.liferay.portal.kernel.exception.SystemException;
382    
383            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
384            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
385                    long groupId)
386                    throws com.liferay.portal.kernel.exception.PortalException,
387                            com.liferay.portal.kernel.exception.SystemException;
388    
389            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
390            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
391                    long groupId, int status)
392                    throws com.liferay.portal.kernel.exception.PortalException,
393                            com.liferay.portal.kernel.exception.SystemException;
394    
395            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
396            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
397                    long groupId, int start, int end)
398                    throws com.liferay.portal.kernel.exception.PortalException,
399                            com.liferay.portal.kernel.exception.SystemException;
400    
401            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
402            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
403                    long groupId, int status, int start, int end)
404                    throws com.liferay.portal.kernel.exception.PortalException,
405                            com.liferay.portal.kernel.exception.SystemException;
406    
407            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
408            public int getNodesCount(long groupId)
409                    throws com.liferay.portal.kernel.exception.SystemException;
410    
411            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
412            public int getNodesCount(long groupId, int status)
413                    throws com.liferay.portal.kernel.exception.SystemException;
414    
415            public void importPages(long userId, long nodeId,
416                    java.lang.String importer, java.io.InputStream[] inputStreams,
417                    java.util.Map<java.lang.String, java.lang.String[]> options)
418                    throws com.liferay.portal.kernel.exception.PortalException,
419                            com.liferay.portal.kernel.exception.SystemException;
420    
421            public com.liferay.portlet.wiki.model.WikiNode moveNodeToTrash(
422                    long userId, long nodeId)
423                    throws com.liferay.portal.kernel.exception.PortalException,
424                            com.liferay.portal.kernel.exception.SystemException;
425    
426            public com.liferay.portlet.wiki.model.WikiNode moveNodeToTrash(
427                    long userId, com.liferay.portlet.wiki.model.WikiNode node)
428                    throws com.liferay.portal.kernel.exception.PortalException,
429                            com.liferay.portal.kernel.exception.SystemException;
430    
431            public void restoreNodeFromTrash(long userId,
432                    com.liferay.portlet.wiki.model.WikiNode node)
433                    throws com.liferay.portal.kernel.exception.PortalException,
434                            com.liferay.portal.kernel.exception.SystemException;
435    
436            public void subscribeNode(long userId, long nodeId)
437                    throws com.liferay.portal.kernel.exception.PortalException,
438                            com.liferay.portal.kernel.exception.SystemException;
439    
440            public void unsubscribeNode(long userId, long nodeId)
441                    throws com.liferay.portal.kernel.exception.PortalException,
442                            com.liferay.portal.kernel.exception.SystemException;
443    
444            public com.liferay.portlet.wiki.model.WikiNode updateNode(long nodeId,
445                    java.lang.String name, java.lang.String description,
446                    com.liferay.portal.service.ServiceContext serviceContext)
447                    throws com.liferay.portal.kernel.exception.PortalException,
448                            com.liferay.portal.kernel.exception.SystemException;
449    
450            public com.liferay.portlet.wiki.model.WikiNode updateStatus(long userId,
451                    com.liferay.portlet.wiki.model.WikiNode node, int status,
452                    com.liferay.portal.service.ServiceContext serviceContext)
453                    throws com.liferay.portal.kernel.exception.PortalException,
454                            com.liferay.portal.kernel.exception.SystemException;
455    }