1
19
20 package com.liferay.portal.service.http;
21
22 import com.liferay.portal.kernel.log.Log;
23 import com.liferay.portal.kernel.log.LogFactoryUtil;
24 import com.liferay.portal.service.OrganizationServiceUtil;
25
26 import java.rmi.RemoteException;
27
28
79 public class OrganizationServiceSoap {
80 public static void addGroupOrganizations(long groupId,
81 long[] organizationIds) throws RemoteException {
82 try {
83 OrganizationServiceUtil.addGroupOrganizations(groupId,
84 organizationIds);
85 }
86 catch (Exception e) {
87 _log.error(e, e);
88
89 throw new RemoteException(e.getMessage());
90 }
91 }
92
93 public static void addPasswordPolicyOrganizations(long passwordPolicyId,
94 long[] organizationIds) throws RemoteException {
95 try {
96 OrganizationServiceUtil.addPasswordPolicyOrganizations(passwordPolicyId,
97 organizationIds);
98 }
99 catch (Exception e) {
100 _log.error(e, e);
101
102 throw new RemoteException(e.getMessage());
103 }
104 }
105
106 public static com.liferay.portal.model.OrganizationSoap addOrganization(
107 long parentOrganizationId, java.lang.String name, int type,
108 boolean recursable, long regionId, long countryId, int statusId,
109 java.lang.String comments) throws RemoteException {
110 try {
111 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.addOrganization(parentOrganizationId,
112 name, type, recursable, regionId, countryId, statusId,
113 comments);
114
115 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue);
116 }
117 catch (Exception e) {
118 _log.error(e, e);
119
120 throw new RemoteException(e.getMessage());
121 }
122 }
123
124 public static void deleteOrganization(long organizationId)
125 throws RemoteException {
126 try {
127 OrganizationServiceUtil.deleteOrganization(organizationId);
128 }
129 catch (Exception e) {
130 _log.error(e, e);
131
132 throw new RemoteException(e.getMessage());
133 }
134 }
135
136 public static com.liferay.portal.model.OrganizationSoap getOrganization(
137 long organizationId) throws RemoteException {
138 try {
139 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.getOrganization(organizationId);
140
141 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue);
142 }
143 catch (Exception e) {
144 _log.error(e, e);
145
146 throw new RemoteException(e.getMessage());
147 }
148 }
149
150 public static long getOrganizationId(long companyId, java.lang.String name)
151 throws RemoteException {
152 try {
153 long returnValue = OrganizationServiceUtil.getOrganizationId(companyId,
154 name);
155
156 return returnValue;
157 }
158 catch (Exception e) {
159 _log.error(e, e);
160
161 throw new RemoteException(e.getMessage());
162 }
163 }
164
165 public static com.liferay.portal.model.OrganizationSoap[] getUserOrganizations(
166 long userId) throws RemoteException {
167 try {
168 java.util.List<com.liferay.portal.model.Organization> returnValue = OrganizationServiceUtil.getUserOrganizations(userId);
169
170 return com.liferay.portal.model.OrganizationSoap.toSoapModels(returnValue);
171 }
172 catch (Exception e) {
173 _log.error(e, e);
174
175 throw new RemoteException(e.getMessage());
176 }
177 }
178
179 public static void setGroupOrganizations(long groupId,
180 long[] organizationIds) throws RemoteException {
181 try {
182 OrganizationServiceUtil.setGroupOrganizations(groupId,
183 organizationIds);
184 }
185 catch (Exception e) {
186 _log.error(e, e);
187
188 throw new RemoteException(e.getMessage());
189 }
190 }
191
192 public static void unsetGroupOrganizations(long groupId,
193 long[] organizationIds) throws RemoteException {
194 try {
195 OrganizationServiceUtil.unsetGroupOrganizations(groupId,
196 organizationIds);
197 }
198 catch (Exception e) {
199 _log.error(e, e);
200
201 throw new RemoteException(e.getMessage());
202 }
203 }
204
205 public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
206 long[] organizationIds) throws RemoteException {
207 try {
208 OrganizationServiceUtil.unsetPasswordPolicyOrganizations(passwordPolicyId,
209 organizationIds);
210 }
211 catch (Exception e) {
212 _log.error(e, e);
213
214 throw new RemoteException(e.getMessage());
215 }
216 }
217
218 public static com.liferay.portal.model.OrganizationSoap updateOrganization(
219 long organizationId, long parentOrganizationId, java.lang.String name,
220 int type, boolean recursable, long regionId, long countryId,
221 int statusId, java.lang.String comments) throws RemoteException {
222 try {
223 com.liferay.portal.model.Organization returnValue = OrganizationServiceUtil.updateOrganization(organizationId,
224 parentOrganizationId, name, type, recursable, regionId,
225 countryId, statusId, comments);
226
227 return com.liferay.portal.model.OrganizationSoap.toSoapModel(returnValue);
228 }
229 catch (Exception e) {
230 _log.error(e, e);
231
232 throw new RemoteException(e.getMessage());
233 }
234 }
235
236 private static Log _log = LogFactoryUtil.getLog(OrganizationServiceSoap.class);
237 }