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