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