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.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.MethodCache;
019    import com.liferay.portal.kernel.util.ReferenceRegistry;
020    
021    /**
022     * The utility for the wiki node remote service. This utility wraps {@link com.liferay.portlet.wiki.service.impl.WikiNodeServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
023     *
024     * <p>
025     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
026     * </p>
027     *
028     * @author Brian Wing Shun Chan
029     * @see WikiNodeService
030     * @see com.liferay.portlet.wiki.service.base.WikiNodeServiceBaseImpl
031     * @see com.liferay.portlet.wiki.service.impl.WikiNodeServiceImpl
032     * @generated
033     */
034    public class WikiNodeServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.wiki.service.impl.WikiNodeServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040            public static com.liferay.portlet.wiki.model.WikiNode addNode(
041                    java.lang.String name, java.lang.String description,
042                    com.liferay.portal.service.ServiceContext serviceContext)
043                    throws com.liferay.portal.kernel.exception.PortalException,
044                            com.liferay.portal.kernel.exception.SystemException {
045                    return getService().addNode(name, description, serviceContext);
046            }
047    
048            public static void deleteNode(long nodeId)
049                    throws com.liferay.portal.kernel.exception.PortalException,
050                            com.liferay.portal.kernel.exception.SystemException {
051                    getService().deleteNode(nodeId);
052            }
053    
054            public static com.liferay.portlet.wiki.model.WikiNode getNode(long nodeId)
055                    throws com.liferay.portal.kernel.exception.PortalException,
056                            com.liferay.portal.kernel.exception.SystemException {
057                    return getService().getNode(nodeId);
058            }
059    
060            public static com.liferay.portlet.wiki.model.WikiNode getNode(
061                    long groupId, java.lang.String name)
062                    throws com.liferay.portal.kernel.exception.PortalException,
063                            com.liferay.portal.kernel.exception.SystemException {
064                    return getService().getNode(groupId, name);
065            }
066    
067            public static void importPages(long nodeId, java.lang.String importer,
068                    java.io.InputStream[] inputStreams,
069                    java.util.Map<java.lang.String, java.lang.String[]> options)
070                    throws com.liferay.portal.kernel.exception.PortalException,
071                            com.liferay.portal.kernel.exception.SystemException {
072                    getService().importPages(nodeId, importer, inputStreams, options);
073            }
074    
075            public static void subscribeNode(long nodeId)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    getService().subscribeNode(nodeId);
079            }
080    
081            public static void unsubscribeNode(long nodeId)
082                    throws com.liferay.portal.kernel.exception.PortalException,
083                            com.liferay.portal.kernel.exception.SystemException {
084                    getService().unsubscribeNode(nodeId);
085            }
086    
087            public static com.liferay.portlet.wiki.model.WikiNode updateNode(
088                    long nodeId, java.lang.String name, java.lang.String description,
089                    com.liferay.portal.service.ServiceContext serviceContext)
090                    throws com.liferay.portal.kernel.exception.PortalException,
091                            com.liferay.portal.kernel.exception.SystemException {
092                    return getService().updateNode(nodeId, name, description, serviceContext);
093            }
094    
095            public static WikiNodeService getService() {
096                    if (_service == null) {
097                            _service = (WikiNodeService)PortalBeanLocatorUtil.locate(WikiNodeService.class.getName());
098    
099                            ReferenceRegistry.registerReference(WikiNodeServiceUtil.class,
100                                    "_service");
101                            MethodCache.remove(WikiNodeService.class);
102                    }
103    
104                    return _service;
105            }
106    
107            public void setService(WikiNodeService service) {
108                    MethodCache.remove(WikiNodeService.class);
109    
110                    _service = service;
111    
112                    ReferenceRegistry.registerReference(WikiNodeServiceUtil.class,
113                            "_service");
114                    MethodCache.remove(WikiNodeService.class);
115            }
116    
117            private static WikiNodeService _service;
118    }