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