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 void updateDisplay(long companyId,
153 java.lang.String languageId, java.lang.String timeZoneId)
154 throws com.liferay.portal.PortalException,
155 com.liferay.portal.SystemException {
156 CompanyServiceUtil.updateDisplay(companyId, languageId, timeZoneId);
157 }
158
159 public static void updateSecurity(long companyId,
160 java.lang.String authType, boolean autoLogin, boolean sendPassword,
161 boolean strangers, boolean strangersWithMx, boolean strangersVerify,
162 boolean communityLogo)
163 throws com.liferay.portal.PortalException,
164 com.liferay.portal.SystemException {
165 CompanyServiceUtil.updateSecurity(companyId, authType, autoLogin,
166 sendPassword, strangers, strangersWithMx, strangersVerify,
167 communityLogo);
168 }
169 }