001    /**
002     * Copyright (c) 2000-2010 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.annotation.Isolation;
018    import com.liferay.portal.kernel.annotation.Propagation;
019    import com.liferay.portal.kernel.annotation.Transactional;
020    import com.liferay.portal.kernel.exception.PortalException;
021    import com.liferay.portal.kernel.exception.SystemException;
022    
023    /**
024     * The interface for the wiki node local service.
025     *
026     * <p>
027     * 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.
028     * </p>
029     *
030     * <p>
031     * 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.
032     * </p>
033     *
034     * @author Brian Wing Shun Chan
035     * @see WikiNodeLocalServiceUtil
036     * @see com.liferay.portlet.wiki.service.base.WikiNodeLocalServiceBaseImpl
037     * @see com.liferay.portlet.wiki.service.impl.WikiNodeLocalServiceImpl
038     * @generated
039     */
040    @Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
041            PortalException.class, SystemException.class})
042    public interface WikiNodeLocalService {
043            /**
044            * Adds the wiki node to the database. Also notifies the appropriate model listeners.
045            *
046            * @param wikiNode the wiki node to add
047            * @return the wiki node that was added
048            * @throws SystemException if a system exception occurred
049            */
050            public com.liferay.portlet.wiki.model.WikiNode addWikiNode(
051                    com.liferay.portlet.wiki.model.WikiNode wikiNode)
052                    throws com.liferay.portal.kernel.exception.SystemException;
053    
054            /**
055            * Creates a new wiki node with the primary key. Does not add the wiki node to the database.
056            *
057            * @param nodeId the primary key for the new wiki node
058            * @return the new wiki node
059            */
060            public com.liferay.portlet.wiki.model.WikiNode createWikiNode(long nodeId);
061    
062            /**
063            * Deletes the wiki node with the primary key from the database. Also notifies the appropriate model listeners.
064            *
065            * @param nodeId the primary key of the wiki node to delete
066            * @throws PortalException if a wiki node with the primary key could not be found
067            * @throws SystemException if a system exception occurred
068            */
069            public void deleteWikiNode(long nodeId)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException;
072    
073            /**
074            * Deletes the wiki node from the database. Also notifies the appropriate model listeners.
075            *
076            * @param wikiNode the wiki node to delete
077            * @throws SystemException if a system exception occurred
078            */
079            public void deleteWikiNode(com.liferay.portlet.wiki.model.WikiNode wikiNode)
080                    throws com.liferay.portal.kernel.exception.SystemException;
081    
082            /**
083            * Performs a dynamic query on the database and returns the matching rows.
084            *
085            * @param dynamicQuery the dynamic query to search with
086            * @return the matching rows
087            * @throws SystemException if a system exception occurred
088            */
089            @SuppressWarnings("rawtypes")
090            public java.util.List dynamicQuery(
091                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
092                    throws com.liferay.portal.kernel.exception.SystemException;
093    
094            /**
095            * Performs a dynamic query on the database and returns a range of the matching rows.
096            *
097            * <p>
098            * 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.
099            * </p>
100            *
101            * @param dynamicQuery the dynamic query to search with
102            * @param start the lower bound of the range of model instances to return
103            * @param end the upper bound of the range of model instances to return (not inclusive)
104            * @return the range of matching rows
105            * @throws SystemException if a system exception occurred
106            */
107            @SuppressWarnings("rawtypes")
108            public java.util.List dynamicQuery(
109                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
110                    int end) throws com.liferay.portal.kernel.exception.SystemException;
111    
112            /**
113            * Performs a dynamic query on the database and returns an ordered range of the matching rows.
114            *
115            * <p>
116            * 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.
117            * </p>
118            *
119            * @param dynamicQuery the dynamic query to search with
120            * @param start the lower bound of the range of model instances to return
121            * @param end the upper bound of the range of model instances to return (not inclusive)
122            * @param orderByComparator the comparator to order the results by
123            * @return the ordered range of matching rows
124            * @throws SystemException if a system exception occurred
125            */
126            @SuppressWarnings("rawtypes")
127            public java.util.List dynamicQuery(
128                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery, int start,
129                    int end,
130                    com.liferay.portal.kernel.util.OrderByComparator orderByComparator)
131                    throws com.liferay.portal.kernel.exception.SystemException;
132    
133            /**
134            * Counts the number of rows that match the dynamic query.
135            *
136            * @param dynamicQuery the dynamic query to search with
137            * @return the number of rows that match the dynamic query
138            * @throws SystemException if a system exception occurred
139            */
140            public long dynamicQueryCount(
141                    com.liferay.portal.kernel.dao.orm.DynamicQuery dynamicQuery)
142                    throws com.liferay.portal.kernel.exception.SystemException;
143    
144            /**
145            * Gets the wiki node with the primary key.
146            *
147            * @param nodeId the primary key of the wiki node to get
148            * @return the wiki node
149            * @throws PortalException if a wiki node with the primary key could not be found
150            * @throws SystemException if a system exception occurred
151            */
152            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
153            public com.liferay.portlet.wiki.model.WikiNode getWikiNode(long nodeId)
154                    throws com.liferay.portal.kernel.exception.PortalException,
155                            com.liferay.portal.kernel.exception.SystemException;
156    
157            /**
158            * Gets the wiki node with the UUID and group id.
159            *
160            * @param uuid the UUID of wiki node to get
161            * @param groupId the group id of the wiki node to get
162            * @return the wiki node
163            * @throws PortalException if a wiki node with the UUID and group id 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 getWikiNodeByUuidAndGroupId(
168                    java.lang.String uuid, long groupId)
169                    throws com.liferay.portal.kernel.exception.PortalException,
170                            com.liferay.portal.kernel.exception.SystemException;
171    
172            /**
173            * Gets a range of all the wiki nodes.
174            *
175            * <p>
176            * 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.
177            * </p>
178            *
179            * @param start the lower bound of the range of wiki nodes to return
180            * @param end the upper bound of the range of wiki nodes to return (not inclusive)
181            * @return the range of wiki nodes
182            * @throws SystemException if a system exception occurred
183            */
184            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
185            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getWikiNodes(
186                    int start, int end)
187                    throws com.liferay.portal.kernel.exception.SystemException;
188    
189            /**
190            * Gets the number of wiki nodes.
191            *
192            * @return the number of wiki nodes
193            * @throws SystemException if a system exception occurred
194            */
195            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
196            public int getWikiNodesCount()
197                    throws com.liferay.portal.kernel.exception.SystemException;
198    
199            /**
200            * Updates the wiki node in the database. Also notifies the appropriate model listeners.
201            *
202            * @param wikiNode the wiki node to update
203            * @return the wiki node that was updated
204            * @throws SystemException if a system exception occurred
205            */
206            public com.liferay.portlet.wiki.model.WikiNode updateWikiNode(
207                    com.liferay.portlet.wiki.model.WikiNode wikiNode)
208                    throws com.liferay.portal.kernel.exception.SystemException;
209    
210            /**
211            * Updates the wiki node in the database. Also notifies the appropriate model listeners.
212            *
213            * @param wikiNode the wiki node to update
214            * @param merge whether to merge the wiki node with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)} for an explanation.
215            * @return the wiki node that was updated
216            * @throws SystemException if a system exception occurred
217            */
218            public com.liferay.portlet.wiki.model.WikiNode updateWikiNode(
219                    com.liferay.portlet.wiki.model.WikiNode wikiNode, boolean merge)
220                    throws com.liferay.portal.kernel.exception.SystemException;
221    
222            public com.liferay.portlet.wiki.model.WikiNode addDefaultNode(long userId,
223                    com.liferay.portal.service.ServiceContext serviceContext)
224                    throws com.liferay.portal.kernel.exception.PortalException,
225                            com.liferay.portal.kernel.exception.SystemException;
226    
227            public com.liferay.portlet.wiki.model.WikiNode addNode(long userId,
228                    java.lang.String name, java.lang.String description,
229                    com.liferay.portal.service.ServiceContext serviceContext)
230                    throws com.liferay.portal.kernel.exception.PortalException,
231                            com.liferay.portal.kernel.exception.SystemException;
232    
233            public void addNodeResources(long nodeId, boolean addCommunityPermissions,
234                    boolean addGuestPermissions)
235                    throws com.liferay.portal.kernel.exception.PortalException,
236                            com.liferay.portal.kernel.exception.SystemException;
237    
238            public void addNodeResources(com.liferay.portlet.wiki.model.WikiNode node,
239                    boolean addCommunityPermissions, boolean addGuestPermissions)
240                    throws com.liferay.portal.kernel.exception.PortalException,
241                            com.liferay.portal.kernel.exception.SystemException;
242    
243            public void addNodeResources(long nodeId,
244                    java.lang.String[] communityPermissions,
245                    java.lang.String[] guestPermissions)
246                    throws com.liferay.portal.kernel.exception.PortalException,
247                            com.liferay.portal.kernel.exception.SystemException;
248    
249            public void addNodeResources(com.liferay.portlet.wiki.model.WikiNode node,
250                    java.lang.String[] communityPermissions,
251                    java.lang.String[] guestPermissions)
252                    throws com.liferay.portal.kernel.exception.PortalException,
253                            com.liferay.portal.kernel.exception.SystemException;
254    
255            public void deleteNode(long nodeId)
256                    throws com.liferay.portal.kernel.exception.PortalException,
257                            com.liferay.portal.kernel.exception.SystemException;
258    
259            public void deleteNode(com.liferay.portlet.wiki.model.WikiNode node)
260                    throws com.liferay.portal.kernel.exception.PortalException,
261                            com.liferay.portal.kernel.exception.SystemException;
262    
263            public void deleteNodes(long groupId)
264                    throws com.liferay.portal.kernel.exception.PortalException,
265                            com.liferay.portal.kernel.exception.SystemException;
266    
267            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
268            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getCompanyNodes(
269                    long companyId, int start, int end)
270                    throws com.liferay.portal.kernel.exception.SystemException;
271    
272            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
273            public int getCompanyNodesCount(long companyId)
274                    throws com.liferay.portal.kernel.exception.SystemException;
275    
276            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
277            public com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
278                    throws com.liferay.portal.kernel.exception.PortalException,
279                            com.liferay.portal.kernel.exception.SystemException;
280    
281            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
282            public com.liferay.portlet.wiki.model.WikiNode getNode(long groupId,
283                    java.lang.String nodeName)
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 java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
289                    long groupId)
290                    throws com.liferay.portal.kernel.exception.PortalException,
291                            com.liferay.portal.kernel.exception.SystemException;
292    
293            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
294            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
295                    long groupId, int start, int end)
296                    throws com.liferay.portal.kernel.exception.PortalException,
297                            com.liferay.portal.kernel.exception.SystemException;
298    
299            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
300            public int getNodesCount(long groupId)
301                    throws com.liferay.portal.kernel.exception.SystemException;
302    
303            public void importPages(long userId, long nodeId,
304                    java.lang.String importer, java.io.File[] files,
305                    java.util.Map<java.lang.String, java.lang.String[]> options)
306                    throws com.liferay.portal.kernel.exception.PortalException,
307                            com.liferay.portal.kernel.exception.SystemException;
308    
309            public void subscribeNode(long userId, long nodeId)
310                    throws com.liferay.portal.kernel.exception.PortalException,
311                            com.liferay.portal.kernel.exception.SystemException;
312    
313            public void unsubscribeNode(long userId, long nodeId)
314                    throws com.liferay.portal.kernel.exception.PortalException,
315                            com.liferay.portal.kernel.exception.SystemException;
316    
317            public com.liferay.portlet.wiki.model.WikiNode updateNode(long nodeId,
318                    java.lang.String name, java.lang.String description,
319                    com.liferay.portal.service.ServiceContext serviceContext)
320                    throws com.liferay.portal.kernel.exception.PortalException,
321                            com.liferay.portal.kernel.exception.SystemException;
322    }