001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * This library is free software; you can redistribute it and/or modify it under
005     * the terms of the GNU Lesser General Public License as published by the Free
006     * Software Foundation; either version 2.1 of the License, or (at your option)
007     * any later version.
008     *
009     * This library is distributed in the hope that it will be useful, but WITHOUT
010     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
011     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
012     * details.
013     */
014    
015    package com.liferay.portlet.wiki.service;
016    
017    import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    
019    /**
020     * <p>
021     * This class provides static methods for the
022     * {@link WikiNodeService} bean. The static methods of
023     * this class calls the same methods of the bean instance. It's convenient to be
024     * able to just write one line to call a method on a bean instead of writing a
025     * lookup call and a method call.
026     * </p>
027     *
028     * @author    Brian Wing Shun Chan
029     * @see       WikiNodeService
030     * @generated
031     */
032    public class WikiNodeServiceUtil {
033            public static com.liferay.portlet.wiki.model.WikiNode addNode(
034                    java.lang.String name, java.lang.String description,
035                    com.liferay.portal.service.ServiceContext serviceContext)
036                    throws com.liferay.portal.kernel.exception.PortalException,
037                            com.liferay.portal.kernel.exception.SystemException {
038                    return getService().addNode(name, description, serviceContext);
039            }
040    
041            public static void deleteNode(long nodeId)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    getService().deleteNode(nodeId);
045            }
046    
047            public static com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
048                    throws com.liferay.portal.kernel.exception.PortalException,
049                            com.liferay.portal.kernel.exception.SystemException {
050                    return getService().getNode(nodeId);
051            }
052    
053            public static com.liferay.portlet.wiki.model.WikiNode getNode(
054                    long groupId, java.lang.String name)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    return getService().getNode(groupId, name);
058            }
059    
060            public static void importPages(long nodeId, java.lang.String importer,
061                    java.io.File[] files,
062                    java.util.Map<java.lang.String, java.lang.String[]> options)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    getService().importPages(nodeId, importer, files, options);
066            }
067    
068            public static void subscribeNode(long nodeId)
069                    throws com.liferay.portal.kernel.exception.PortalException,
070                            com.liferay.portal.kernel.exception.SystemException {
071                    getService().subscribeNode(nodeId);
072            }
073    
074            public static void unsubscribeNode(long nodeId)
075                    throws com.liferay.portal.kernel.exception.PortalException,
076                            com.liferay.portal.kernel.exception.SystemException {
077                    getService().unsubscribeNode(nodeId);
078            }
079    
080            public static com.liferay.portlet.wiki.model.WikiNode updateNode(
081                    long nodeId, java.lang.String name, java.lang.String description,
082                    com.liferay.portal.service.ServiceContext serviceContext)
083                    throws com.liferay.portal.kernel.exception.PortalException,
084                            com.liferay.portal.kernel.exception.SystemException {
085                    return getService().updateNode(nodeId, name, description, serviceContext);
086            }
087    
088            public static WikiNodeService getService() {
089                    if (_service == null) {
090                            _service = (WikiNodeService)PortalBeanLocatorUtil.locate(WikiNodeService.class.getName());
091                    }
092    
093                    return _service;
094            }
095    
096            public void setService(WikiNodeService service) {
097                    _service = service;
098            }
099    
100            private static WikiNodeService _service;
101    }