001
014
015 package com.liferay.portal.service.http;
016
017 import aQute.bnd.annotation.ProviderType;
018
019 import com.liferay.portal.kernel.log.Log;
020 import com.liferay.portal.kernel.log.LogFactoryUtil;
021 import com.liferay.portal.service.RegionServiceUtil;
022
023 import java.rmi.RemoteException;
024
025
065 @ProviderType
066 public class RegionServiceSoap {
067 public static com.liferay.portal.model.RegionSoap addRegion(
068 long countryId, java.lang.String regionCode, java.lang.String name,
069 boolean active) throws RemoteException {
070 try {
071 com.liferay.portal.model.Region returnValue = RegionServiceUtil.addRegion(countryId,
072 regionCode, name, active);
073
074 return com.liferay.portal.model.RegionSoap.toSoapModel(returnValue);
075 }
076 catch (Exception e) {
077 _log.error(e, e);
078
079 throw new RemoteException(e.getMessage());
080 }
081 }
082
083 public static com.liferay.portal.model.RegionSoap fetchRegion(
084 long countryId, java.lang.String regionCode) throws RemoteException {
085 try {
086 com.liferay.portal.model.Region returnValue = RegionServiceUtil.fetchRegion(countryId,
087 regionCode);
088
089 return com.liferay.portal.model.RegionSoap.toSoapModel(returnValue);
090 }
091 catch (Exception e) {
092 _log.error(e, e);
093
094 throw new RemoteException(e.getMessage());
095 }
096 }
097
098 public static com.liferay.portal.model.RegionSoap getRegion(long regionId)
099 throws RemoteException {
100 try {
101 com.liferay.portal.model.Region returnValue = RegionServiceUtil.getRegion(regionId);
102
103 return com.liferay.portal.model.RegionSoap.toSoapModel(returnValue);
104 }
105 catch (Exception e) {
106 _log.error(e, e);
107
108 throw new RemoteException(e.getMessage());
109 }
110 }
111
112 public static com.liferay.portal.model.RegionSoap getRegion(
113 long countryId, java.lang.String regionCode) throws RemoteException {
114 try {
115 com.liferay.portal.model.Region returnValue = RegionServiceUtil.getRegion(countryId,
116 regionCode);
117
118 return com.liferay.portal.model.RegionSoap.toSoapModel(returnValue);
119 }
120 catch (Exception e) {
121 _log.error(e, e);
122
123 throw new RemoteException(e.getMessage());
124 }
125 }
126
127 public static com.liferay.portal.model.RegionSoap[] getRegions()
128 throws RemoteException {
129 try {
130 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions();
131
132 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
133 }
134 catch (Exception e) {
135 _log.error(e, e);
136
137 throw new RemoteException(e.getMessage());
138 }
139 }
140
141 public static com.liferay.portal.model.RegionSoap[] getRegions(
142 boolean active) throws RemoteException {
143 try {
144 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions(active);
145
146 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
147 }
148 catch (Exception e) {
149 _log.error(e, e);
150
151 throw new RemoteException(e.getMessage());
152 }
153 }
154
155 public static com.liferay.portal.model.RegionSoap[] getRegions(
156 long countryId) throws RemoteException {
157 try {
158 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions(countryId);
159
160 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
161 }
162 catch (Exception e) {
163 _log.error(e, e);
164
165 throw new RemoteException(e.getMessage());
166 }
167 }
168
169 public static com.liferay.portal.model.RegionSoap[] getRegions(
170 long countryId, boolean active) throws RemoteException {
171 try {
172 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions(countryId,
173 active);
174
175 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
176 }
177 catch (Exception e) {
178 _log.error(e, e);
179
180 throw new RemoteException(e.getMessage());
181 }
182 }
183
184 private static Log _log = LogFactoryUtil.getLog(RegionServiceSoap.class);
185 }