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 Address. This utility wraps
024     * {@link com.liferay.portal.service.impl.AddressServiceImpl} 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 AddressService
032     * @see com.liferay.portal.service.base.AddressServiceBaseImpl
033     * @see com.liferay.portal.service.impl.AddressServiceImpl
034     * @generated
035     */
036    @ProviderType
037    public class AddressServiceUtil {
038            /*
039             * NOTE FOR DEVELOPERS:
040             *
041             * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.AddressServiceImpl} and rerun ServiceBuilder to regenerate this class.
042             */
043    
044            /**
045            * @deprecated As of 6.2.0, replaced by {@link #addAddress(String, long,
046            String, String, String, String, String, long, long, int,
047            boolean, boolean, ServiceContext)}
048            */
049            @Deprecated
050            public static com.liferay.portal.model.Address addAddress(
051                    java.lang.String className, long classPK, java.lang.String street1,
052                    java.lang.String street2, java.lang.String street3,
053                    java.lang.String city, java.lang.String zip, long regionId,
054                    long countryId, long typeId, boolean mailing, boolean primary)
055                    throws com.liferay.portal.kernel.exception.PortalException {
056                    return getService()
057                                       .addAddress(className, classPK, street1, street2, street3,
058                            city, zip, regionId, countryId, typeId, mailing, primary);
059            }
060    
061            public static com.liferay.portal.model.Address addAddress(
062                    java.lang.String className, long classPK, java.lang.String street1,
063                    java.lang.String street2, java.lang.String street3,
064                    java.lang.String city, java.lang.String zip, long regionId,
065                    long countryId, long typeId, boolean mailing, boolean primary,
066                    com.liferay.portal.service.ServiceContext serviceContext)
067                    throws com.liferay.portal.kernel.exception.PortalException {
068                    return getService()
069                                       .addAddress(className, classPK, street1, street2, street3,
070                            city, zip, regionId, countryId, typeId, mailing, primary,
071                            serviceContext);
072            }
073    
074            public static void deleteAddress(long addressId)
075                    throws com.liferay.portal.kernel.exception.PortalException {
076                    getService().deleteAddress(addressId);
077            }
078    
079            public static com.liferay.portal.model.Address getAddress(long addressId)
080                    throws com.liferay.portal.kernel.exception.PortalException {
081                    return getService().getAddress(addressId);
082            }
083    
084            public static java.util.List<com.liferay.portal.model.Address> getAddresses(
085                    java.lang.String className, long classPK)
086                    throws com.liferay.portal.kernel.exception.PortalException {
087                    return getService().getAddresses(className, classPK);
088            }
089    
090            /**
091            * Returns the Spring bean ID for this bean.
092            *
093            * @return the Spring bean ID for this bean
094            */
095            public static java.lang.String getBeanIdentifier() {
096                    return getService().getBeanIdentifier();
097            }
098    
099            /**
100            * Sets the Spring bean ID for this bean.
101            *
102            * @param beanIdentifier the Spring bean ID for this bean
103            */
104            public static void setBeanIdentifier(java.lang.String beanIdentifier) {
105                    getService().setBeanIdentifier(beanIdentifier);
106            }
107    
108            public static com.liferay.portal.model.Address updateAddress(
109                    long addressId, java.lang.String street1, java.lang.String street2,
110                    java.lang.String street3, java.lang.String city, java.lang.String zip,
111                    long regionId, long countryId, long typeId, boolean mailing,
112                    boolean primary)
113                    throws com.liferay.portal.kernel.exception.PortalException {
114                    return getService()
115                                       .updateAddress(addressId, street1, street2, street3, city,
116                            zip, regionId, countryId, typeId, mailing, primary);
117            }
118    
119            public static AddressService getService() {
120                    if (_service == null) {
121                            _service = (AddressService)PortalBeanLocatorUtil.locate(AddressService.class.getName());
122    
123                            ReferenceRegistry.registerReference(AddressServiceUtil.class,
124                                    "_service");
125                    }
126    
127                    return _service;
128            }
129    
130            /**
131             * @deprecated As of 6.2.0
132             */
133            @Deprecated
134            public void setService(AddressService service) {
135            }
136    
137            private static AddressService _service;
138    }