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