1
22
23 package com.liferay.portal.service;
24
25
26
53 public class OrganizationServiceUtil {
54 public static void addGroupOrganizations(long groupId,
55 long[] organizationIds)
56 throws com.liferay.portal.PortalException,
57 com.liferay.portal.SystemException, java.rmi.RemoteException {
58 OrganizationService organizationService = OrganizationServiceFactory.getService();
59
60 organizationService.addGroupOrganizations(groupId, organizationIds);
61 }
62
63 public static void addPasswordPolicyOrganizations(long passwordPolicyId,
64 long[] organizationIds)
65 throws com.liferay.portal.PortalException,
66 com.liferay.portal.SystemException, java.rmi.RemoteException {
67 OrganizationService organizationService = OrganizationServiceFactory.getService();
68
69 organizationService.addPasswordPolicyOrganizations(passwordPolicyId,
70 organizationIds);
71 }
72
73 public static com.liferay.portal.model.Organization addOrganization(
74 long parentOrganizationId, java.lang.String name, int type,
75 boolean recursable, long regionId, long countryId, int statusId,
76 java.lang.String comments)
77 throws com.liferay.portal.PortalException,
78 com.liferay.portal.SystemException, java.rmi.RemoteException {
79 OrganizationService organizationService = OrganizationServiceFactory.getService();
80
81 return organizationService.addOrganization(parentOrganizationId, name,
82 type, recursable, regionId, countryId, statusId, comments);
83 }
84
85 public static void deleteOrganization(long organizationId)
86 throws com.liferay.portal.PortalException,
87 com.liferay.portal.SystemException, java.rmi.RemoteException {
88 OrganizationService organizationService = OrganizationServiceFactory.getService();
89
90 organizationService.deleteOrganization(organizationId);
91 }
92
93 public static com.liferay.portal.model.Organization getOrganization(
94 long organizationId)
95 throws com.liferay.portal.PortalException,
96 com.liferay.portal.SystemException, java.rmi.RemoteException {
97 OrganizationService organizationService = OrganizationServiceFactory.getService();
98
99 return organizationService.getOrganization(organizationId);
100 }
101
102 public static long getOrganizationId(long companyId, java.lang.String name)
103 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
104 OrganizationService organizationService = OrganizationServiceFactory.getService();
105
106 return organizationService.getOrganizationId(companyId, name);
107 }
108
109 public static java.util.List<com.liferay.portal.model.Organization> getUserOrganizations(
110 long userId)
111 throws com.liferay.portal.SystemException, java.rmi.RemoteException {
112 OrganizationService organizationService = OrganizationServiceFactory.getService();
113
114 return organizationService.getUserOrganizations(userId);
115 }
116
117 public static void setGroupOrganizations(long groupId,
118 long[] organizationIds)
119 throws com.liferay.portal.PortalException,
120 com.liferay.portal.SystemException, java.rmi.RemoteException {
121 OrganizationService organizationService = OrganizationServiceFactory.getService();
122
123 organizationService.setGroupOrganizations(groupId, organizationIds);
124 }
125
126 public static void unsetGroupOrganizations(long groupId,
127 long[] organizationIds)
128 throws com.liferay.portal.PortalException,
129 com.liferay.portal.SystemException, java.rmi.RemoteException {
130 OrganizationService organizationService = OrganizationServiceFactory.getService();
131
132 organizationService.unsetGroupOrganizations(groupId, organizationIds);
133 }
134
135 public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
136 long[] organizationIds)
137 throws com.liferay.portal.PortalException,
138 com.liferay.portal.SystemException, java.rmi.RemoteException {
139 OrganizationService organizationService = OrganizationServiceFactory.getService();
140
141 organizationService.unsetPasswordPolicyOrganizations(passwordPolicyId,
142 organizationIds);
143 }
144
145 public static com.liferay.portal.model.Organization updateOrganization(
146 long organizationId, long parentOrganizationId, java.lang.String name,
147 int type, boolean recursable, long regionId, long countryId,
148 int statusId, java.lang.String comments)
149 throws com.liferay.portal.PortalException,
150 com.liferay.portal.SystemException, java.rmi.RemoteException {
151 OrganizationService organizationService = OrganizationServiceFactory.getService();
152
153 return organizationService.updateOrganization(organizationId,
154 parentOrganizationId, name, type, recursable, regionId, countryId,
155 statusId, comments);
156 }
157 }