1
22
23 package com.liferay.portal.service;
24
25
26
53 public class OrganizationLocalServiceUtil {
54 public static com.liferay.portal.model.Organization addOrganization(
55 com.liferay.portal.model.Organization organization)
56 throws com.liferay.portal.SystemException {
57 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
58
59 return organizationLocalService.addOrganization(organization);
60 }
61
62 public static void deleteOrganization(long organizationId)
63 throws com.liferay.portal.PortalException,
64 com.liferay.portal.SystemException {
65 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
66
67 organizationLocalService.deleteOrganization(organizationId);
68 }
69
70 public static void deleteOrganization(
71 com.liferay.portal.model.Organization organization)
72 throws com.liferay.portal.PortalException,
73 com.liferay.portal.SystemException {
74 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
75
76 organizationLocalService.deleteOrganization(organization);
77 }
78
79 public static java.util.List<com.liferay.portal.model.Organization> dynamicQuery(
80 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer)
81 throws com.liferay.portal.SystemException {
82 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
83
84 return organizationLocalService.dynamicQuery(queryInitializer);
85 }
86
87 public static java.util.List<com.liferay.portal.model.Organization> dynamicQuery(
88 com.liferay.portal.kernel.dao.DynamicQueryInitializer queryInitializer,
89 int begin, int end) throws com.liferay.portal.SystemException {
90 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
91
92 return organizationLocalService.dynamicQuery(queryInitializer, begin,
93 end);
94 }
95
96 public static com.liferay.portal.model.Organization updateOrganization(
97 com.liferay.portal.model.Organization organization)
98 throws com.liferay.portal.SystemException {
99 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
100
101 return organizationLocalService.updateOrganization(organization);
102 }
103
104 public static void addGroupOrganizations(long groupId,
105 long[] organizationIds)
106 throws com.liferay.portal.PortalException,
107 com.liferay.portal.SystemException {
108 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
109
110 organizationLocalService.addGroupOrganizations(groupId, organizationIds);
111 }
112
113 public static com.liferay.portal.model.Organization addOrganization(
114 long userId, long parentOrganizationId, java.lang.String name,
115 int type, boolean recursable, long regionId, long countryId,
116 int statusId, java.lang.String comments)
117 throws com.liferay.portal.PortalException,
118 com.liferay.portal.SystemException {
119 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
120
121 return organizationLocalService.addOrganization(userId,
122 parentOrganizationId, name, type, recursable, regionId, countryId,
123 statusId, comments);
124 }
125
126 public static void addOrganizationResources(long userId,
127 com.liferay.portal.model.Organization organization)
128 throws com.liferay.portal.PortalException,
129 com.liferay.portal.SystemException {
130 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
131
132 organizationLocalService.addOrganizationResources(userId, organization);
133 }
134
135 public static void addPasswordPolicyOrganizations(long passwordPolicyId,
136 long[] organizationIds)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException {
139 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
140
141 organizationLocalService.addPasswordPolicyOrganizations(passwordPolicyId,
142 organizationIds);
143 }
144
145 public static java.util.List<com.liferay.portal.model.Organization> getGroupOrganizations(
146 long groupId)
147 throws com.liferay.portal.PortalException,
148 com.liferay.portal.SystemException {
149 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
150
151 return organizationLocalService.getGroupOrganizations(groupId);
152 }
153
154 public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
155 long userId)
156 throws com.liferay.portal.PortalException,
157 com.liferay.portal.SystemException {
158 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
159
160 return organizationLocalService.getManageableOrganizations(userId);
161 }
162
163 public static com.liferay.portal.model.Organization getOrganization(
164 long organizationId)
165 throws com.liferay.portal.PortalException,
166 com.liferay.portal.SystemException {
167 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
168
169 return organizationLocalService.getOrganization(organizationId);
170 }
171
172 public static com.liferay.portal.model.Organization getOrganization(
173 long companyId, java.lang.String name)
174 throws com.liferay.portal.PortalException,
175 com.liferay.portal.SystemException {
176 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
177
178 return organizationLocalService.getOrganization(companyId, name);
179 }
180
181 public static long getOrganizationId(long companyId, java.lang.String name)
182 throws com.liferay.portal.PortalException,
183 com.liferay.portal.SystemException {
184 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
185
186 return organizationLocalService.getOrganizationId(companyId, name);
187 }
188
189 public static java.util.List<com.liferay.portal.model.Organization> getOrganizations(
190 long[] organizationIds)
191 throws com.liferay.portal.PortalException,
192 com.liferay.portal.SystemException {
193 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
194
195 return organizationLocalService.getOrganizations(organizationIds);
196 }
197
198 public static java.util.List<com.liferay.portal.model.Organization> getParentOrganizations(
199 long organizationId)
200 throws com.liferay.portal.PortalException,
201 com.liferay.portal.SystemException {
202 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
203
204 return organizationLocalService.getParentOrganizations(organizationId);
205 }
206
207 public static java.util.List<com.liferay.portal.model.Organization> getSuborganizations(
208 java.util.List<com.liferay.portal.model.Organization> organizations)
209 throws com.liferay.portal.SystemException {
210 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
211
212 return organizationLocalService.getSuborganizations(organizations);
213 }
214
215 public static java.util.List<com.liferay.portal.model.Organization> getSubsetOrganizations(
216 java.util.List<com.liferay.portal.model.Organization> allOrganizations,
217 java.util.List<com.liferay.portal.model.Organization> availableOrganizations)
218 throws com.liferay.portal.PortalException,
219 com.liferay.portal.SystemException {
220 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
221
222 return organizationLocalService.getSubsetOrganizations(allOrganizations,
223 availableOrganizations);
224 }
225
226 public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
227 long userId)
228 throws com.liferay.portal.PortalException,
229 com.liferay.portal.SystemException {
230 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
231
232 return organizationLocalService.getUserOrganizations(userId);
233 }
234
235 public static int getUserOrganizationsCount(long userId)
236 throws com.liferay.portal.PortalException,
237 com.liferay.portal.SystemException {
238 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
239
240 return organizationLocalService.getUserOrganizationsCount(userId);
241 }
242
243 public static boolean hasGroupOrganization(long groupId, long organizationId)
244 throws com.liferay.portal.PortalException,
245 com.liferay.portal.SystemException {
246 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
247
248 return organizationLocalService.hasGroupOrganization(groupId,
249 organizationId);
250 }
251
252 public static boolean hasUserOrganization(long userId, long organizationId)
253 throws com.liferay.portal.PortalException,
254 com.liferay.portal.SystemException {
255 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
256
257 return organizationLocalService.hasUserOrganization(userId,
258 organizationId);
259 }
260
261 public static boolean hasPasswordPolicyOrganization(long passwordPolicyId,
262 long organizationId)
263 throws com.liferay.portal.PortalException,
264 com.liferay.portal.SystemException {
265 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
266
267 return organizationLocalService.hasPasswordPolicyOrganization(passwordPolicyId,
268 organizationId);
269 }
270
271 public static java.util.List<com.liferay.portal.model.Organization> search(
272 long companyId, long parentOrganizationId, java.lang.String keywords,
273 int type, java.lang.Long regionId, java.lang.Long countryId,
274 java.util.LinkedHashMap<String, Object> params, int begin, int end)
275 throws com.liferay.portal.PortalException,
276 com.liferay.portal.SystemException {
277 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
278
279 return organizationLocalService.search(companyId, parentOrganizationId,
280 keywords, type, regionId, countryId, params, begin, end);
281 }
282
283 public static java.util.List<com.liferay.portal.model.Organization> search(
284 long companyId, long parentOrganizationId, java.lang.String keywords,
285 int type, java.lang.Long regionId, java.lang.Long countryId,
286 java.util.LinkedHashMap<String, Object> params, int begin, int end,
287 com.liferay.portal.kernel.util.OrderByComparator obc)
288 throws com.liferay.portal.PortalException,
289 com.liferay.portal.SystemException {
290 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
291
292 return organizationLocalService.search(companyId, parentOrganizationId,
293 keywords, type, regionId, countryId, params, begin, end, obc);
294 }
295
296 public static java.util.List<com.liferay.portal.model.Organization> search(
297 long companyId, long parentOrganizationId, java.lang.String name,
298 int type, java.lang.String street, java.lang.String city,
299 java.lang.String zip, java.lang.Long regionId,
300 java.lang.Long countryId,
301 java.util.LinkedHashMap<String, Object> params, boolean andOperator,
302 int begin, int end)
303 throws com.liferay.portal.PortalException,
304 com.liferay.portal.SystemException {
305 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
306
307 return organizationLocalService.search(companyId, parentOrganizationId,
308 name, type, street, city, zip, regionId, countryId, params,
309 andOperator, begin, end);
310 }
311
312 public static java.util.List<com.liferay.portal.model.Organization> search(
313 long companyId, long parentOrganizationId, java.lang.String name,
314 int type, java.lang.String street, java.lang.String city,
315 java.lang.String zip, java.lang.Long regionId,
316 java.lang.Long countryId,
317 java.util.LinkedHashMap<String, Object> params, boolean andOperator,
318 int begin, int end, com.liferay.portal.kernel.util.OrderByComparator obc)
319 throws com.liferay.portal.PortalException,
320 com.liferay.portal.SystemException {
321 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
322
323 return organizationLocalService.search(companyId, parentOrganizationId,
324 name, type, street, city, zip, regionId, countryId, params,
325 andOperator, begin, end, obc);
326 }
327
328 public static int searchCount(long companyId, long parentOrganizationId,
329 java.lang.String keywords, int type, java.lang.Long regionId,
330 java.lang.Long countryId, java.util.LinkedHashMap<String, Object> params)
331 throws com.liferay.portal.PortalException,
332 com.liferay.portal.SystemException {
333 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
334
335 return organizationLocalService.searchCount(companyId,
336 parentOrganizationId, keywords, type, regionId, countryId, params);
337 }
338
339 public static int searchCount(long companyId, long parentOrganizationId,
340 java.lang.String name, int type, java.lang.String street,
341 java.lang.String city, java.lang.String zip, java.lang.Long regionId,
342 java.lang.Long countryId,
343 java.util.LinkedHashMap<String, Object> params, boolean andOperator)
344 throws com.liferay.portal.PortalException,
345 com.liferay.portal.SystemException {
346 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
347
348 return organizationLocalService.searchCount(companyId,
349 parentOrganizationId, name, type, street, city, zip, regionId,
350 countryId, params, andOperator);
351 }
352
353 public static void setGroupOrganizations(long groupId,
354 long[] organizationIds)
355 throws com.liferay.portal.PortalException,
356 com.liferay.portal.SystemException {
357 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
358
359 organizationLocalService.setGroupOrganizations(groupId, organizationIds);
360 }
361
362 public static void unsetGroupOrganizations(long groupId,
363 long[] organizationIds)
364 throws com.liferay.portal.PortalException,
365 com.liferay.portal.SystemException {
366 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
367
368 organizationLocalService.unsetGroupOrganizations(groupId,
369 organizationIds);
370 }
371
372 public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
373 long[] organizationIds)
374 throws com.liferay.portal.PortalException,
375 com.liferay.portal.SystemException {
376 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
377
378 organizationLocalService.unsetPasswordPolicyOrganizations(passwordPolicyId,
379 organizationIds);
380 }
381
382 public static com.liferay.portal.model.Organization updateOrganization(
383 long companyId, long organizationId, long parentOrganizationId,
384 java.lang.String name, int type, boolean recursable, long regionId,
385 long countryId, int statusId, java.lang.String comments)
386 throws com.liferay.portal.PortalException,
387 com.liferay.portal.SystemException {
388 OrganizationLocalService organizationLocalService = OrganizationLocalServiceFactory.getService();
389
390 return organizationLocalService.updateOrganization(companyId,
391 organizationId, parentOrganizationId, name, type, recursable,
392 regionId, countryId, statusId, comments);
393 }
394 }