001    /**
002     * Copyright (c) 2000-2010 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    
019    /**
020     * The utility for the address remote service. This utility wraps {@link com.liferay.portal.service.impl.AddressServiceImpl} and is the primary access point for service operations in application layer code running on a remote server.
021     *
022     * <p>
023     * Never modify this class directly. Add custom service methods to {@link com.liferay.portal.service.impl.AddressServiceImpl} and rerun ServiceBuilder to regenerate this class.
024     * </p>
025     *
026     * <p>
027     * This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.
028     * </p>
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    public class AddressServiceUtil {
037            public static com.liferay.portal.model.Address addAddress(
038                    java.lang.String className, long classPK, java.lang.String street1,
039                    java.lang.String street2, java.lang.String street3,
040                    java.lang.String city, java.lang.String zip, long regionId,
041                    long countryId, int typeId, boolean mailing, boolean primary)
042                    throws com.liferay.portal.kernel.exception.PortalException,
043                            com.liferay.portal.kernel.exception.SystemException {
044                    return getService()
045                                       .addAddress(className, classPK, street1, street2, street3,
046                            city, zip, regionId, countryId, typeId, mailing, primary);
047            }
048    
049            public static void deleteAddress(long addressId)
050                    throws com.liferay.portal.kernel.exception.PortalException,
051                            com.liferay.portal.kernel.exception.SystemException {
052                    getService().deleteAddress(addressId);
053            }
054    
055            public static com.liferay.portal.model.Address getAddress(long addressId)
056                    throws com.liferay.portal.kernel.exception.PortalException,
057                            com.liferay.portal.kernel.exception.SystemException {
058                    return getService().getAddress(addressId);
059            }
060    
061            public static java.util.List<com.liferay.portal.model.Address> getAddresses(
062                    java.lang.String className, long classPK)
063                    throws com.liferay.portal.kernel.exception.PortalException,
064                            com.liferay.portal.kernel.exception.SystemException {
065                    return getService().getAddresses(className, classPK);
066            }
067    
068            public static com.liferay.portal.model.Address updateAddress(
069                    long addressId, java.lang.String street1, java.lang.String street2,
070                    java.lang.String street3, java.lang.String city, java.lang.String zip,
071                    long regionId, long countryId, int typeId, boolean mailing,
072                    boolean primary)
073                    throws com.liferay.portal.kernel.exception.PortalException,
074                            com.liferay.portal.kernel.exception.SystemException {
075                    return getService()
076                                       .updateAddress(addressId, street1, street2, street3, city,
077                            zip, regionId, countryId, typeId, mailing, primary);
078            }
079    
080            public static AddressService getService() {
081                    if (_service == null) {
082                            _service = (AddressService)PortalBeanLocatorUtil.locate(AddressService.class.getName());
083                    }
084    
085                    return _service;
086            }
087    
088            public void setService(AddressService service) {
089                    _service = service;
090            }
091    
092            private static AddressService _service;
093    }