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