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