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.portal.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 remote service utility for Website. This utility wraps
024     * {@link com.liferay.portal.service.impl.WebsiteServiceImpl} and is the
025     * primary access point for service operations in application layer code running
026     * on a remote server. Methods of this service are expected to have security
027     * checks based on the propagated JAAS credentials because this service can be
028     * accessed remotely.
029     *
030     * @author Brian Wing Shun Chan
031     * @see WebsiteService
032     * @see com.liferay.portal.service.base.WebsiteServiceBaseImpl
033     * @see com.liferay.portal.service.impl.WebsiteServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class WebsiteServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.WebsiteServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * @deprecated As of 6.2.0, replaced by {@link #addWebsite(String, long,
046            String, int, boolean, ServiceContext)}
047            */
048            @Deprecated
049            public static com.liferay.portal.model.Website addWebsite(
050                    java.lang.String className, long classPK, java.lang.String url,
051                    long typeId, boolean primary)
052                    throws com.liferay.portal.kernel.exception.PortalException {
053                    return getService().addWebsite(className, classPK, url, typeId, primary);
054            }
055    
056            public static com.liferay.portal.model.Website addWebsite(
057                    java.lang.String className, long classPK, java.lang.String url,
058                    long typeId, boolean primary,
059                    com.liferay.portal.service.ServiceContext serviceContext)
060                    throws com.liferay.portal.kernel.exception.PortalException {
061                    return getService()
062                                       .addWebsite(className, classPK, url, typeId, primary,
063                            serviceContext);
064            }
065    
066            public static void deleteWebsite(long websiteId)
067                    throws com.liferay.portal.kernel.exception.PortalException {
068                    getService().deleteWebsite(websiteId);
069            }
070    
071            /**
072            * Returns the OSGi service identifier.
073            *
074            * @return the OSGi service identifier
075            */
076            public static java.lang.String getOSGiServiceIdentifier() {
077                    return getService().getOSGiServiceIdentifier();
078            }
079    
080            public static com.liferay.portal.model.Website getWebsite(long websiteId)
081                    throws com.liferay.portal.kernel.exception.PortalException {
082                    return getService().getWebsite(websiteId);
083            }
084    
085            public static java.util.List<com.liferay.portal.model.Website> getWebsites(
086                    java.lang.String className, long classPK)
087                    throws com.liferay.portal.kernel.exception.PortalException {
088                    return getService().getWebsites(className, classPK);
089            }
090    
091            public static com.liferay.portal.model.Website updateWebsite(
092                    long websiteId, java.lang.String url, long typeId, boolean primary)
093                    throws com.liferay.portal.kernel.exception.PortalException {
094                    return getService().updateWebsite(websiteId, url, typeId, primary);
095            }
096    
097            public static WebsiteService getService() {
098                    if (_service == null) {
099                            _service = (WebsiteService)PortalBeanLocatorUtil.locate(WebsiteService.class.getName());
100    
101                            ReferenceRegistry.registerReference(WebsiteServiceUtil.class,
102                                    "_service");
103                    }
104    
105                    return _service;
106            }
107    
108            private static WebsiteService _service;
109    }