001
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
036 @ProviderType
037 public class AddressServiceUtil {
038
043
044
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
095 public static java.lang.String getOSGiServiceIdentifier() {
096 return getService().getOSGiServiceIdentifier();
097 }
098
099 public static com.liferay.portal.model.Address updateAddress(
100 long addressId, java.lang.String street1, java.lang.String street2,
101 java.lang.String street3, java.lang.String city, java.lang.String zip,
102 long regionId, long countryId, long typeId, boolean mailing,
103 boolean primary)
104 throws com.liferay.portal.kernel.exception.PortalException {
105 return getService()
106 .updateAddress(addressId, street1, street2, street3, city,
107 zip, regionId, countryId, typeId, mailing, primary);
108 }
109
110 public static AddressService getService() {
111 if (_service == null) {
112 _service = (AddressService)PortalBeanLocatorUtil.locate(AddressService.class.getName());
113
114 ReferenceRegistry.registerReference(AddressServiceUtil.class,
115 "_service");
116 }
117
118 return _service;
119 }
120
121
124 @Deprecated
125 public void setService(AddressService service) {
126 }
127
128 private static AddressService _service;
129 }