1
22
23 package com.liferay.portal.service.http;
24
25 import com.liferay.portal.kernel.log.Log;
26 import com.liferay.portal.kernel.log.LogFactoryUtil;
27 import com.liferay.portal.service.RegionServiceUtil;
28
29 import java.rmi.RemoteException;
30
31
81 public class RegionServiceSoap {
82 public static com.liferay.portal.model.RegionSoap addRegion(
83 long countryId, java.lang.String regionCode, java.lang.String name,
84 boolean active) throws RemoteException {
85 try {
86 com.liferay.portal.model.Region returnValue = RegionServiceUtil.addRegion(countryId,
87 regionCode, name, active);
88
89 return com.liferay.portal.model.RegionSoap.toSoapModel(returnValue);
90 }
91 catch (Exception e) {
92 _log.error(e, e);
93
94 throw new RemoteException(e.getMessage());
95 }
96 }
97
98 public static com.liferay.portal.model.RegionSoap[] getRegions()
99 throws RemoteException {
100 try {
101 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions();
102
103 return com.liferay.portal.model.RegionSoap.toSoapModels(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[] getRegions(
113 long countryId) throws RemoteException {
114 try {
115 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions(countryId);
116
117 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
118 }
119 catch (Exception e) {
120 _log.error(e, e);
121
122 throw new RemoteException(e.getMessage());
123 }
124 }
125
126 public static com.liferay.portal.model.RegionSoap[] getRegions(
127 boolean active) throws RemoteException {
128 try {
129 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions(active);
130
131 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
132 }
133 catch (Exception e) {
134 _log.error(e, e);
135
136 throw new RemoteException(e.getMessage());
137 }
138 }
139
140 public static com.liferay.portal.model.RegionSoap[] getRegions(
141 long countryId, boolean active) throws RemoteException {
142 try {
143 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions(countryId,
144 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 getRegion(long regionId)
156 throws RemoteException {
157 try {
158 com.liferay.portal.model.Region returnValue = RegionServiceUtil.getRegion(regionId);
159
160 return com.liferay.portal.model.RegionSoap.toSoapModel(returnValue);
161 }
162 catch (Exception e) {
163 _log.error(e, e);
164
165 throw new RemoteException(e.getMessage());
166 }
167 }
168
169 private static Log _log = LogFactoryUtil.getLog(RegionServiceSoap.class);
170 }