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