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.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            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
148            public com.liferay.portlet.wiki.model.WikiNode fetchWikiNode(long nodeId)
149                    throws com.liferay.portal.kernel.exception.SystemException;
150    
151            /**
152            * Returns the wiki node with the primary key.
153            *
154            * @param nodeId the primary key of the wiki node
155            * @return the wiki node
156            * @throws PortalException if a wiki node with the primary key could not be found
157            * @throws SystemException if a system exception occurred
158            */
159            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
160            public com.liferay.portlet.wiki.model.WikiNode getWikiNode(long nodeId)
161                    throws com.liferay.portal.kernel.exception.PortalException,
162                            com.liferay.portal.kernel.exception.SystemException;
163    
164            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
165            public com.liferay.portal.model.PersistedModel getPersistedModel(
166                    java.io.Serializable primaryKeyObj)
167                    throws com.liferay.portal.kernel.exception.PortalException,
168                            com.liferay.portal.kernel.exception.SystemException;
169    
170            /**
171            * Returns the wiki node with the UUID in the group.
172            *
173            * @param uuid the UUID of wiki node
174            * @param groupId the group id of the wiki node
175            * @return the wiki node
176            * @throws PortalException if a wiki node with the UUID in the group could not be found
177            * @throws SystemException if a system exception occurred
178            */
179            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
180            public com.liferay.portlet.wiki.model.WikiNode getWikiNodeByUuidAndGroupId(
181                    java.lang.String uuid, long groupId)
182                    throws com.liferay.portal.kernel.exception.PortalException,
183                            com.liferay.portal.kernel.exception.SystemException;
184    
185            /**
186            * Returns a range of all the wiki nodes.
187            *
188            * <p>
189            * 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.
190            * </p>
191            *
192            * @param start the lower bound of the range of wiki nodes
193            * @param end the upper bound of the range of wiki nodes (not inclusive)
194            * @return the range of wiki nodes
195            * @throws SystemException if a system exception occurred
196            */
197            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
198            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getWikiNodes(
199                    int start, int end)
200                    throws com.liferay.portal.kernel.exception.SystemException;
201    
202            /**
203            * Returns the number of wiki nodes.
204            *
205            * @return the number of wiki nodes
206            * @throws SystemException if a system exception occurred
207            */
208            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
209            public int getWikiNodesCount()
210                    throws com.liferay.portal.kernel.exception.SystemException;
211    
212            /**
213            * Updates the wiki node in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
214            *
215            * @param wikiNode the wiki node
216            * @return the wiki node that was updated
217            * @throws SystemException if a system exception occurred
218            */
219            public com.liferay.portlet.wiki.model.WikiNode updateWikiNode(
220                    com.liferay.portlet.wiki.model.WikiNode wikiNode)
221                    throws com.liferay.portal.kernel.exception.SystemException;
222    
223            /**
224            * Updates the wiki node in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
225            *
226            * @param wikiNode the wiki node
227            * @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.
228            * @return the wiki node that was updated
229            * @throws SystemException if a system exception occurred
230            */
231            public com.liferay.portlet.wiki.model.WikiNode updateWikiNode(
232                    com.liferay.portlet.wiki.model.WikiNode wikiNode, boolean merge)
233                    throws com.liferay.portal.kernel.exception.SystemException;
234    
235            /**
236            * Returns the Spring bean ID for this bean.
237            *
238            * @return the Spring bean ID for this bean
239            */
240            public java.lang.String getBeanIdentifier();
241    
242            /**
243            * Sets the Spring bean ID for this bean.
244            *
245            * @param beanIdentifier the Spring bean ID for this bean
246            */
247            public void setBeanIdentifier(java.lang.String beanIdentifier);
248    
249            public com.liferay.portlet.wiki.model.WikiNode addDefaultNode(long userId,
250                    com.liferay.portal.service.ServiceContext serviceContext)
251                    throws com.liferay.portal.kernel.exception.PortalException,
252                            com.liferay.portal.kernel.exception.SystemException;
253    
254            public com.liferay.portlet.wiki.model.WikiNode addNode(long userId,
255                    java.lang.String name, java.lang.String description,
256                    com.liferay.portal.service.ServiceContext serviceContext)
257                    throws com.liferay.portal.kernel.exception.PortalException,
258                            com.liferay.portal.kernel.exception.SystemException;
259    
260            public void addNodeResources(long nodeId, boolean addGroupPermissions,
261                    boolean addGuestPermissions)
262                    throws com.liferay.portal.kernel.exception.PortalException,
263                            com.liferay.portal.kernel.exception.SystemException;
264    
265            public void addNodeResources(long nodeId,
266                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
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                    boolean addGroupPermissions, boolean addGuestPermissions)
272                    throws com.liferay.portal.kernel.exception.PortalException,
273                            com.liferay.portal.kernel.exception.SystemException;
274    
275            public void addNodeResources(com.liferay.portlet.wiki.model.WikiNode node,
276                    java.lang.String[] groupPermissions, java.lang.String[] guestPermissions)
277                    throws com.liferay.portal.kernel.exception.PortalException,
278                            com.liferay.portal.kernel.exception.SystemException;
279    
280            public void deleteNode(long nodeId)
281                    throws com.liferay.portal.kernel.exception.PortalException,
282                            com.liferay.portal.kernel.exception.SystemException;
283    
284            public void deleteNode(com.liferay.portlet.wiki.model.WikiNode node)
285                    throws com.liferay.portal.kernel.exception.PortalException,
286                            com.liferay.portal.kernel.exception.SystemException;
287    
288            public void deleteNodes(long groupId)
289                    throws com.liferay.portal.kernel.exception.PortalException,
290                            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 int getCompanyNodesCount(long companyId)
299                    throws com.liferay.portal.kernel.exception.SystemException;
300    
301            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
302            public com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
303                    throws com.liferay.portal.kernel.exception.PortalException,
304                            com.liferay.portal.kernel.exception.SystemException;
305    
306            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
307            public com.liferay.portlet.wiki.model.WikiNode getNode(long groupId,
308                    java.lang.String nodeName)
309                    throws com.liferay.portal.kernel.exception.PortalException,
310                            com.liferay.portal.kernel.exception.SystemException;
311    
312            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
313            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
314                    long groupId)
315                    throws com.liferay.portal.kernel.exception.PortalException,
316                            com.liferay.portal.kernel.exception.SystemException;
317    
318            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
319            public java.util.List<com.liferay.portlet.wiki.model.WikiNode> getNodes(
320                    long groupId, int start, int end)
321                    throws com.liferay.portal.kernel.exception.PortalException,
322                            com.liferay.portal.kernel.exception.SystemException;
323    
324            @Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
325            public int getNodesCount(long groupId)
326                    throws com.liferay.portal.kernel.exception.SystemException;
327    
328            public void importPages(long userId, long nodeId,
329                    java.lang.String importer, java.io.InputStream[] inputStreams,
330                    java.util.Map<java.lang.String, java.lang.String[]> options)
331                    throws com.liferay.portal.kernel.exception.PortalException,
332                            com.liferay.portal.kernel.exception.SystemException;
333    
334            public void subscribeNode(long userId, long nodeId)
335                    throws com.liferay.portal.kernel.exception.PortalException,
336                            com.liferay.portal.kernel.exception.SystemException;
337    
338            public void unsubscribeNode(long userId, long nodeId)
339                    throws com.liferay.portal.kernel.exception.PortalException,
340                            com.liferay.portal.kernel.exception.SystemException;
341    
342            public com.liferay.portlet.wiki.model.WikiNode updateNode(long nodeId,
343                    java.lang.String name, java.lang.String description,
344                    com.liferay.portal.service.ServiceContext serviceContext)
345                    throws com.liferay.portal.kernel.exception.PortalException,
346                            com.liferay.portal.kernel.exception.SystemException;
347    }