001    /**
002     * Copyright (c) 2000-2013 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018    import com.liferay.portal.kernel.util.ReferenceRegistry;
019    
020    /**
021     * Provides the remote service utility for Phone. This utility wraps
022     * {@link com.liferay.portal.service.impl.PhoneServiceImpl} and is the
023     * primary access point for service operations in application layer code running
024     * on a remote server. Methods of this service are expected to have security
025     * checks based on the propagated JAAS credentials because this service can be
026     * accessed remotely.
027     *
028     * @author Brian Wing Shun Chan
029     * @see PhoneService
030     * @see com.liferay.portal.service.base.PhoneServiceBaseImpl
031     * @see com.liferay.portal.service.impl.PhoneServiceImpl
032     * @generated
033     */
034    public class PhoneServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.PhoneServiceImpl} and rerun ServiceBuilder to regenerate this class.
039             */
040    
041            /**
042            * Returns the Spring bean ID for this bean.
043            *
044            * @return the Spring bean ID for this bean
045            */
046            public static java.lang.String getBeanIdentifier() {
047                    return getService().getBeanIdentifier();
048            }
049    
050            /**
051            * Sets the Spring bean ID for this bean.
052            *
053            * @param beanIdentifier the Spring bean ID for this bean
054            */
055            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
056                    getService().setBeanIdentifier(beanIdentifier);
057            }
058    
059            /**
060            * @deprecated As of 6.2.0, replaced by {@link #addPhone( String, long,
061            String, String, int, boolean, ServiceContext)}
062            */
063            public static com.liferay.portal.model.Phone addPhone(
064                    java.lang.String className, long classPK, java.lang.String number,
065                    java.lang.String extension, int typeId, boolean primary)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    return getService()
069                                       .addPhone(className, classPK, number, extension, typeId,
070                            primary);
071            }
072    
073            public static com.liferay.portal.model.Phone addPhone(
074                    java.lang.String className, long classPK, java.lang.String number,
075                    java.lang.String extension, int typeId, boolean primary,
076                    com.liferay.portal.service.ServiceContext serviceContext)
077                    throws com.liferay.portal.kernel.exception.PortalException,
078                            com.liferay.portal.kernel.exception.SystemException {
079                    return getService()
080                                       .addPhone(className, classPK, number, extension, typeId,
081                            primary, serviceContext);
082            }
083    
084            public static void deletePhone(long phoneId)
085                    throws com.liferay.portal.kernel.exception.PortalException,
086                            com.liferay.portal.kernel.exception.SystemException {
087                    getService().deletePhone(phoneId);
088            }
089    
090            public static com.liferay.portal.model.Phone getPhone(long phoneId)
091                    throws com.liferay.portal.kernel.exception.PortalException,
092                            com.liferay.portal.kernel.exception.SystemException {
093                    return getService().getPhone(phoneId);
094            }
095    
096            public static java.util.List<com.liferay.portal.model.Phone> getPhones(
097                    java.lang.String className, long classPK)
098                    throws com.liferay.portal.kernel.exception.PortalException,
099                            com.liferay.portal.kernel.exception.SystemException {
100                    return getService().getPhones(className, classPK);
101            }
102    
103            public static com.liferay.portal.model.Phone updatePhone(long phoneId,
104                    java.lang.String number, java.lang.String extension, int typeId,
105                    boolean primary)
106                    throws com.liferay.portal.kernel.exception.PortalException,
107                            com.liferay.portal.kernel.exception.SystemException {
108                    return getService()
109                                       .updatePhone(phoneId, number, extension, typeId, primary);
110            }
111    
112            public static PhoneService getService() {
113                    if (_service == null) {
114                            _service = (PhoneService)PortalBeanLocatorUtil.locate(PhoneService.class.getName());
115    
116                            ReferenceRegistry.registerReference(PhoneServiceUtil.class,
117                                    "_service");
118                    }
119    
120                    return _service;
121            }
122    
123            /**
124             * @deprecated As of 6.2.0
125             */
126            public void setService(PhoneService service) {
127            }
128    
129            private static PhoneService _service;
130    }