1
14
15 package com.liferay.portal.service;
16
17 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
18 import com.liferay.portal.kernel.util.MethodCache;
19 import com.liferay.portal.kernel.util.ReferenceRegistry;
20
21
41 public class OrganizationServiceUtil {
42 public static void addGroupOrganizations(long groupId,
43 long[] organizationIds)
44 throws com.liferay.portal.PortalException,
45 com.liferay.portal.SystemException {
46 getService().addGroupOrganizations(groupId, organizationIds);
47 }
48
49 public static void addPasswordPolicyOrganizations(long passwordPolicyId,
50 long[] organizationIds)
51 throws com.liferay.portal.PortalException,
52 com.liferay.portal.SystemException {
53 getService()
54 .addPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
55 }
56
57 public static com.liferay.portal.model.Organization addOrganization(
58 long parentOrganizationId, java.lang.String name,
59 java.lang.String type, boolean recursable, long regionId,
60 long countryId, int statusId, java.lang.String comments,
61 com.liferay.portal.service.ServiceContext serviceContext)
62 throws com.liferay.portal.PortalException,
63 com.liferay.portal.SystemException {
64 return getService()
65 .addOrganization(parentOrganizationId, name, type,
66 recursable, regionId, countryId, statusId, comments, serviceContext);
67 }
68
69 public static com.liferay.portal.model.Organization addOrganization(
70 long parentOrganizationId, java.lang.String name,
71 java.lang.String type, boolean recursable, long regionId,
72 long countryId, int statusId, java.lang.String comments,
73 java.util.List<com.liferay.portal.model.Address> addresses,
74 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
75 java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
76 java.util.List<com.liferay.portal.model.Phone> phones,
77 java.util.List<com.liferay.portal.model.Website> websites,
78 com.liferay.portal.service.ServiceContext serviceContext)
79 throws com.liferay.portal.PortalException,
80 com.liferay.portal.SystemException {
81 return getService()
82 .addOrganization(parentOrganizationId, name, type,
83 recursable, regionId, countryId, statusId, comments, addresses,
84 emailAddresses, orgLabors, phones, websites, serviceContext);
85 }
86
87 public static void deleteLogo(long organizationId)
88 throws com.liferay.portal.PortalException,
89 com.liferay.portal.SystemException {
90 getService().deleteLogo(organizationId);
91 }
92
93 public static void deleteOrganization(long organizationId)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 getService().deleteOrganization(organizationId);
97 }
98
99 public static java.util.List<com.liferay.portal.model.Organization> getManageableOrganizations(
100 java.lang.String actionId, int max)
101 throws com.liferay.portal.PortalException,
102 com.liferay.portal.SystemException {
103 return getService().getManageableOrganizations(actionId, max);
104 }
105
106 public static com.liferay.portal.model.Organization getOrganization(
107 long organizationId)
108 throws com.liferay.portal.PortalException,
109 com.liferay.portal.SystemException {
110 return getService().getOrganization(organizationId);
111 }
112
113 public static long getOrganizationId(long companyId, java.lang.String name)
114 throws com.liferay.portal.SystemException {
115 return getService().getOrganizationId(companyId, name);
116 }
117
118 public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
119 long userId)
120 throws com.liferay.portal.PortalException,
121 com.liferay.portal.SystemException {
122 return getService().getUserOrganizations(userId);
123 }
124
125 public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
126 long userId, boolean inheritUserGroups)
127 throws com.liferay.portal.PortalException,
128 com.liferay.portal.SystemException {
129 return getService().getUserOrganizations(userId, inheritUserGroups);
130 }
131
132 public static void setGroupOrganizations(long groupId,
133 long[] organizationIds)
134 throws com.liferay.portal.PortalException,
135 com.liferay.portal.SystemException {
136 getService().setGroupOrganizations(groupId, organizationIds);
137 }
138
139 public static void unsetGroupOrganizations(long groupId,
140 long[] organizationIds)
141 throws com.liferay.portal.PortalException,
142 com.liferay.portal.SystemException {
143 getService().unsetGroupOrganizations(groupId, organizationIds);
144 }
145
146 public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
147 long[] organizationIds)
148 throws com.liferay.portal.PortalException,
149 com.liferay.portal.SystemException {
150 getService()
151 .unsetPasswordPolicyOrganizations(passwordPolicyId, organizationIds);
152 }
153
154 public static com.liferay.portal.model.Organization updateOrganization(
155 long organizationId, long parentOrganizationId, java.lang.String name,
156 java.lang.String type, boolean recursable, long regionId,
157 long countryId, int statusId, java.lang.String comments,
158 com.liferay.portal.service.ServiceContext serviceContext)
159 throws com.liferay.portal.PortalException,
160 com.liferay.portal.SystemException {
161 return getService()
162 .updateOrganization(organizationId, parentOrganizationId,
163 name, type, recursable, regionId, countryId, statusId, comments,
164 serviceContext);
165 }
166
167 public static com.liferay.portal.model.Organization updateOrganization(
168 long organizationId, long parentOrganizationId, java.lang.String name,
169 java.lang.String type, boolean recursable, long regionId,
170 long countryId, int statusId, java.lang.String comments,
171 java.util.List<com.liferay.portal.model.Address> addresses,
172 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
173 java.util.List<com.liferay.portal.model.OrgLabor> orgLabors,
174 java.util.List<com.liferay.portal.model.Phone> phones,
175 java.util.List<com.liferay.portal.model.Website> websites,
176 com.liferay.portal.service.ServiceContext serviceContext)
177 throws com.liferay.portal.PortalException,
178 com.liferay.portal.SystemException {
179 return getService()
180 .updateOrganization(organizationId, parentOrganizationId,
181 name, type, recursable, regionId, countryId, statusId, comments,
182 addresses, emailAddresses, orgLabors, phones, websites,
183 serviceContext);
184 }
185
186 public static OrganizationService getService() {
187 if (_service == null) {
188 _service = (OrganizationService)PortalBeanLocatorUtil.locate(OrganizationService.class.getName());
189
190 ReferenceRegistry.registerReference(OrganizationServiceUtil.class,
191 "_service");
192 MethodCache.remove(OrganizationService.class);
193 }
194
195 return _service;
196 }
197
198 public void setService(OrganizationService service) {
199 MethodCache.remove(OrganizationService.class);
200
201 _service = service;
202
203 ReferenceRegistry.registerReference(OrganizationServiceUtil.class,
204 "_service");
205 MethodCache.remove(OrganizationService.class);
206 }
207
208 private static OrganizationService _service;
209 }