001
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
034 public class WikiNodeServiceUtil {
035
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 }