1
22
23 package com.liferay.portal.service.http;
24
25 import com.liferay.portal.kernel.json.JSONObject;
26 import com.liferay.portal.service.CompanyServiceUtil;
27
28
74 public class CompanyServiceJSON {
75 public static JSONObject addCompany(java.lang.String webId,
76 java.lang.String virtualHost, java.lang.String mx)
77 throws com.liferay.portal.PortalException,
78 com.liferay.portal.SystemException {
79 com.liferay.portal.model.Company returnValue = CompanyServiceUtil.addCompany(webId,
80 virtualHost, mx);
81
82 return CompanyJSONSerializer.toJSONObject(returnValue);
83 }
84
85 public static JSONObject getCompanyById(long companyId)
86 throws com.liferay.portal.PortalException,
87 com.liferay.portal.SystemException {
88 com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyById(companyId);
89
90 return CompanyJSONSerializer.toJSONObject(returnValue);
91 }
92
93 public static JSONObject getCompanyByLogoId(long logoId)
94 throws com.liferay.portal.PortalException,
95 com.liferay.portal.SystemException {
96 com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByLogoId(logoId);
97
98 return CompanyJSONSerializer.toJSONObject(returnValue);
99 }
100
101 public static JSONObject getCompanyByMx(java.lang.String mx)
102 throws com.liferay.portal.PortalException,
103 com.liferay.portal.SystemException {
104 com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByMx(mx);
105
106 return CompanyJSONSerializer.toJSONObject(returnValue);
107 }
108
109 public static JSONObject getCompanyByVirtualHost(
110 java.lang.String virtualHost)
111 throws com.liferay.portal.PortalException,
112 com.liferay.portal.SystemException {
113 com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByVirtualHost(virtualHost);
114
115 return CompanyJSONSerializer.toJSONObject(returnValue);
116 }
117
118 public static JSONObject getCompanyByWebId(java.lang.String webId)
119 throws com.liferay.portal.PortalException,
120 com.liferay.portal.SystemException {
121 com.liferay.portal.model.Company returnValue = CompanyServiceUtil.getCompanyByWebId(webId);
122
123 return CompanyJSONSerializer.toJSONObject(returnValue);
124 }
125
126 public static JSONObject updateCompany(long companyId,
127 java.lang.String virtualHost, java.lang.String mx)
128 throws com.liferay.portal.PortalException,
129 com.liferay.portal.SystemException {
130 com.liferay.portal.model.Company returnValue = CompanyServiceUtil.updateCompany(companyId,
131 virtualHost, mx);
132
133 return CompanyJSONSerializer.toJSONObject(returnValue);
134 }
135
136 public static JSONObject updateCompany(long companyId,
137 java.lang.String virtualHost, java.lang.String mx,
138 java.lang.String homeURL, java.lang.String name,
139 java.lang.String legalName, java.lang.String legalId,
140 java.lang.String legalType, java.lang.String sicCode,
141 java.lang.String tickerSymbol, java.lang.String industry,
142 java.lang.String type, java.lang.String size)
143 throws com.liferay.portal.PortalException,
144 com.liferay.portal.SystemException {
145 com.liferay.portal.model.Company returnValue = CompanyServiceUtil.updateCompany(companyId,
146 virtualHost, mx, homeURL, name, legalName, legalId, legalType,
147 sicCode, tickerSymbol, industry, type, size);
148
149 return CompanyJSONSerializer.toJSONObject(returnValue);
150 }
151
152 public static JSONObject updateCompany(long companyId,
153 java.lang.String virtualHost, java.lang.String mx,
154 java.lang.String homeURL, java.lang.String name,
155 java.lang.String legalName, java.lang.String legalId,
156 java.lang.String legalType, java.lang.String sicCode,
157 java.lang.String tickerSymbol, java.lang.String industry,
158 java.lang.String type, java.lang.String size,
159 java.lang.String languageId, java.lang.String timeZoneId,
160 java.util.List<com.liferay.portal.model.Address> addresses,
161 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
162 java.util.List<com.liferay.portal.model.Phone> phones,
163 java.util.List<com.liferay.portal.model.Website> websites,
164 com.liferay.portal.kernel.util.UnicodeProperties properties)
165 throws com.liferay.portal.PortalException,
166 com.liferay.portal.SystemException {
167 com.liferay.portal.model.Company returnValue = CompanyServiceUtil.updateCompany(companyId,
168 virtualHost, mx, homeURL, name, legalName, legalId, legalType,
169 sicCode, tickerSymbol, industry, type, size, languageId,
170 timeZoneId, addresses, emailAddresses, phones, websites,
171 properties);
172
173 return CompanyJSONSerializer.toJSONObject(returnValue);
174 }
175
176 public static void updateDisplay(long companyId,
177 java.lang.String languageId, java.lang.String timeZoneId)
178 throws com.liferay.portal.PortalException,
179 com.liferay.portal.SystemException {
180 CompanyServiceUtil.updateDisplay(companyId, languageId, timeZoneId);
181 }
182
183 public static void updatePreferences(long companyId,
184 com.liferay.portal.kernel.util.UnicodeProperties properties)
185 throws com.liferay.portal.PortalException,
186 com.liferay.portal.SystemException {
187 CompanyServiceUtil.updatePreferences(companyId, properties);
188 }
189
190 public static void updateSecurity(long companyId,
191 java.lang.String authType, boolean autoLogin, boolean sendPassword,
192 boolean strangers, boolean strangersWithMx, boolean strangersVerify,
193 boolean communityLogo)
194 throws com.liferay.portal.PortalException,
195 com.liferay.portal.SystemException {
196 CompanyServiceUtil.updateSecurity(companyId, authType, autoLogin,
197 sendPassword, strangers, strangersWithMx, strangersVerify,
198 communityLogo);
199 }
200 }