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 EmailAddress. This utility wraps
022     * {@link com.liferay.portal.service.impl.EmailAddressServiceImpl} 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 EmailAddressService
030     * @see com.liferay.portal.service.base.EmailAddressServiceBaseImpl
031     * @see com.liferay.portal.service.impl.EmailAddressServiceImpl
032     * @generated
033     */
034    public class EmailAddressServiceUtil {
035            /*
036             * NOTE FOR DEVELOPERS:
037             *
038             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.EmailAddressServiceImpl} 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 #addEmailAddress( String,
061            long, String, int, boolean, ServiceContext)}
062            */
063            public static com.liferay.portal.model.EmailAddress addEmailAddress(
064                    java.lang.String className, long classPK, java.lang.String address,
065                    int typeId, boolean primary)
066                    throws com.liferay.portal.kernel.exception.PortalException,
067                            com.liferay.portal.kernel.exception.SystemException {
068                    return getService()
069                                       .addEmailAddress(className, classPK, address, typeId, primary);
070            }
071    
072            public static com.liferay.portal.model.EmailAddress addEmailAddress(
073                    java.lang.String className, long classPK, java.lang.String address,
074                    int typeId, boolean primary,
075                    com.liferay.portal.service.ServiceContext serviceContext)
076                    throws com.liferay.portal.kernel.exception.PortalException,
077                            com.liferay.portal.kernel.exception.SystemException {
078                    return getService()
079                                       .addEmailAddress(className, classPK, address, typeId,
080                            primary, serviceContext);
081            }
082    
083            public static void deleteEmailAddress(long emailAddressId)
084                    throws com.liferay.portal.kernel.exception.PortalException,
085                            com.liferay.portal.kernel.exception.SystemException {
086                    getService().deleteEmailAddress(emailAddressId);
087            }
088    
089            public static com.liferay.portal.model.EmailAddress getEmailAddress(
090                    long emailAddressId)
091                    throws com.liferay.portal.kernel.exception.PortalException,
092                            com.liferay.portal.kernel.exception.SystemException {
093                    return getService().getEmailAddress(emailAddressId);
094            }
095    
096            public static java.util.List<com.liferay.portal.model.EmailAddress> getEmailAddresses(
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().getEmailAddresses(className, classPK);
101            }
102    
103            public static com.liferay.portal.model.EmailAddress updateEmailAddress(
104                    long emailAddressId, java.lang.String address, int typeId,
105                    boolean primary)
106                    throws com.liferay.portal.kernel.exception.PortalException,
107                            com.liferay.portal.kernel.exception.SystemException {
108                    return getService()
109                                       .updateEmailAddress(emailAddressId, address, typeId, primary);
110            }
111    
112            public static EmailAddressService getService() {
113                    if (_service == null) {
114                            _service = (EmailAddressService)PortalBeanLocatorUtil.locate(EmailAddressService.class.getName());
115    
116                            ReferenceRegistry.registerReference(EmailAddressServiceUtil.class,
117                                    "_service");
118                    }
119    
120                    return _service;
121            }
122    
123            /**
124             * @deprecated As of 6.2.0
125             */
126            public void setService(EmailAddressService service) {
127            }
128    
129            private static EmailAddressService _service;
130    }