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