001
014
015 package com.liferay.portal.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 WebsiteServiceUtil {
035
040 public static com.liferay.portal.model.Website addWebsite(
041 java.lang.String className, long classPK, java.lang.String url,
042 int typeId, boolean primary)
043 throws com.liferay.portal.kernel.exception.PortalException,
044 com.liferay.portal.kernel.exception.SystemException {
045 return getService().addWebsite(className, classPK, url, typeId, primary);
046 }
047
048 public static void deleteWebsite(long websiteId)
049 throws com.liferay.portal.kernel.exception.PortalException,
050 com.liferay.portal.kernel.exception.SystemException {
051 getService().deleteWebsite(websiteId);
052 }
053
054 public static com.liferay.portal.model.Website getWebsite(long websiteId)
055 throws com.liferay.portal.kernel.exception.PortalException,
056 com.liferay.portal.kernel.exception.SystemException {
057 return getService().getWebsite(websiteId);
058 }
059
060 public static java.util.List<com.liferay.portal.model.Website> getWebsites(
061 java.lang.String className, long classPK)
062 throws com.liferay.portal.kernel.exception.PortalException,
063 com.liferay.portal.kernel.exception.SystemException {
064 return getService().getWebsites(className, classPK);
065 }
066
067 public static com.liferay.portal.model.Website updateWebsite(
068 long websiteId, java.lang.String url, int typeId, boolean primary)
069 throws com.liferay.portal.kernel.exception.PortalException,
070 com.liferay.portal.kernel.exception.SystemException {
071 return getService().updateWebsite(websiteId, url, typeId, primary);
072 }
073
074 public static WebsiteService getService() {
075 if (_service == null) {
076 _service = (WebsiteService)PortalBeanLocatorUtil.locate(WebsiteService.class.getName());
077
078 ReferenceRegistry.registerReference(WebsiteServiceUtil.class,
079 "_service");
080 MethodCache.remove(WebsiteService.class);
081 }
082
083 return _service;
084 }
085
086 public void setService(WebsiteService service) {
087 MethodCache.remove(WebsiteService.class);
088
089 _service = service;
090
091 ReferenceRegistry.registerReference(WebsiteServiceUtil.class, "_service");
092 MethodCache.remove(WebsiteService.class);
093 }
094
095 private static WebsiteService _service;
096 }