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