1
14
15 package com.liferay.portal.service.http;
16
17 import com.liferay.portal.kernel.log.Log;
18 import com.liferay.portal.kernel.log.LogFactoryUtil;
19 import com.liferay.portal.service.RegionServiceUtil;
20
21 import java.rmi.RemoteException;
22
23
73 public class RegionServiceSoap {
74 public static com.liferay.portal.model.RegionSoap addRegion(
75 long countryId, java.lang.String regionCode, java.lang.String name,
76 boolean active) throws RemoteException {
77 try {
78 com.liferay.portal.model.Region returnValue = RegionServiceUtil.addRegion(countryId,
79 regionCode, name, active);
80
81 return com.liferay.portal.model.RegionSoap.toSoapModel(returnValue);
82 }
83 catch (Exception e) {
84 _log.error(e, e);
85
86 throw new RemoteException(e.getMessage());
87 }
88 }
89
90 public static com.liferay.portal.model.RegionSoap[] getRegions()
91 throws RemoteException {
92 try {
93 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions();
94
95 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
96 }
97 catch (Exception e) {
98 _log.error(e, e);
99
100 throw new RemoteException(e.getMessage());
101 }
102 }
103
104 public static com.liferay.portal.model.RegionSoap[] getRegions(
105 long countryId) throws RemoteException {
106 try {
107 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions(countryId);
108
109 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
110 }
111 catch (Exception e) {
112 _log.error(e, e);
113
114 throw new RemoteException(e.getMessage());
115 }
116 }
117
118 public static com.liferay.portal.model.RegionSoap[] getRegions(
119 boolean active) throws RemoteException {
120 try {
121 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions(active);
122
123 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
124 }
125 catch (Exception e) {
126 _log.error(e, e);
127
128 throw new RemoteException(e.getMessage());
129 }
130 }
131
132 public static com.liferay.portal.model.RegionSoap[] getRegions(
133 long countryId, boolean active) throws RemoteException {
134 try {
135 java.util.List<com.liferay.portal.model.Region> returnValue = RegionServiceUtil.getRegions(countryId,
136 active);
137
138 return com.liferay.portal.model.RegionSoap.toSoapModels(returnValue);
139 }
140 catch (Exception e) {
141 _log.error(e, e);
142
143 throw new RemoteException(e.getMessage());
144 }
145 }
146
147 public static com.liferay.portal.model.RegionSoap getRegion(long regionId)
148 throws RemoteException {
149 try {
150 com.liferay.portal.model.Region returnValue = RegionServiceUtil.getRegion(regionId);
151
152 return com.liferay.portal.model.RegionSoap.toSoapModel(returnValue);
153 }
154 catch (Exception e) {
155 _log.error(e, e);
156
157 throw new RemoteException(e.getMessage());
158 }
159 }
160
161 private static Log _log = LogFactoryUtil.getLog(RegionServiceSoap.class);
162 }