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