001
014
015 package com.liferay.portal.service;
016
017 import com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
018 import com.liferay.portal.kernel.util.MethodCache;
019 import com.liferay.portal.kernel.util.ReferenceRegistry;
020
021
034 public class CompanyServiceUtil {
035
040 public static com.liferay.portal.model.Company addCompany(
041 java.lang.String webId, java.lang.String virtualHost,
042 java.lang.String mx, java.lang.String shardName, boolean system,
043 int maxUsers)
044 throws com.liferay.portal.kernel.exception.PortalException,
045 com.liferay.portal.kernel.exception.SystemException {
046 return getService()
047 .addCompany(webId, virtualHost, mx, shardName, system,
048 maxUsers);
049 }
050
051 public static void deleteLogo(long companyId)
052 throws com.liferay.portal.kernel.exception.PortalException,
053 com.liferay.portal.kernel.exception.SystemException {
054 getService().deleteLogo(companyId);
055 }
056
057 public static com.liferay.portal.model.Company getCompanyById(
058 long companyId)
059 throws com.liferay.portal.kernel.exception.PortalException,
060 com.liferay.portal.kernel.exception.SystemException {
061 return getService().getCompanyById(companyId);
062 }
063
064 public static com.liferay.portal.model.Company getCompanyByLogoId(
065 long logoId)
066 throws com.liferay.portal.kernel.exception.PortalException,
067 com.liferay.portal.kernel.exception.SystemException {
068 return getService().getCompanyByLogoId(logoId);
069 }
070
071 public static com.liferay.portal.model.Company getCompanyByMx(
072 java.lang.String mx)
073 throws com.liferay.portal.kernel.exception.PortalException,
074 com.liferay.portal.kernel.exception.SystemException {
075 return getService().getCompanyByMx(mx);
076 }
077
078 public static com.liferay.portal.model.Company getCompanyByVirtualHost(
079 java.lang.String virtualHost)
080 throws com.liferay.portal.kernel.exception.PortalException,
081 com.liferay.portal.kernel.exception.SystemException {
082 return getService().getCompanyByVirtualHost(virtualHost);
083 }
084
085 public static com.liferay.portal.model.Company getCompanyByWebId(
086 java.lang.String webId)
087 throws com.liferay.portal.kernel.exception.PortalException,
088 com.liferay.portal.kernel.exception.SystemException {
089 return getService().getCompanyByWebId(webId);
090 }
091
092 public static void removePreferences(long companyId, java.lang.String[] keys)
093 throws com.liferay.portal.kernel.exception.PortalException,
094 com.liferay.portal.kernel.exception.SystemException {
095 getService().removePreferences(companyId, keys);
096 }
097
098 public static com.liferay.portal.model.Company updateCompany(
099 long companyId, java.lang.String virtualHost, java.lang.String mx,
100 int maxUsers)
101 throws com.liferay.portal.kernel.exception.PortalException,
102 com.liferay.portal.kernel.exception.SystemException {
103 return getService().updateCompany(companyId, virtualHost, mx, maxUsers);
104 }
105
106 public static com.liferay.portal.model.Company updateCompany(
107 long companyId, java.lang.String virtualHost, java.lang.String mx,
108 java.lang.String homeURL, java.lang.String name,
109 java.lang.String legalName, java.lang.String legalId,
110 java.lang.String legalType, java.lang.String sicCode,
111 java.lang.String tickerSymbol, java.lang.String industry,
112 java.lang.String type, java.lang.String size)
113 throws com.liferay.portal.kernel.exception.PortalException,
114 com.liferay.portal.kernel.exception.SystemException {
115 return getService()
116 .updateCompany(companyId, virtualHost, mx, homeURL, name,
117 legalName, legalId, legalType, sicCode, tickerSymbol, industry,
118 type, size);
119 }
120
121 public static com.liferay.portal.model.Company updateCompany(
122 long companyId, java.lang.String virtualHost, java.lang.String mx,
123 java.lang.String homeURL, java.lang.String name,
124 java.lang.String legalName, java.lang.String legalId,
125 java.lang.String legalType, java.lang.String sicCode,
126 java.lang.String tickerSymbol, java.lang.String industry,
127 java.lang.String type, java.lang.String size,
128 java.lang.String languageId, java.lang.String timeZoneId,
129 java.util.List<com.liferay.portal.model.Address> addresses,
130 java.util.List<com.liferay.portal.model.EmailAddress> emailAddresses,
131 java.util.List<com.liferay.portal.model.Phone> phones,
132 java.util.List<com.liferay.portal.model.Website> websites,
133 com.liferay.portal.kernel.util.UnicodeProperties properties)
134 throws com.liferay.portal.kernel.exception.PortalException,
135 com.liferay.portal.kernel.exception.SystemException {
136 return getService()
137 .updateCompany(companyId, virtualHost, mx, homeURL, name,
138 legalName, legalId, legalType, sicCode, tickerSymbol, industry,
139 type, size, languageId, timeZoneId, addresses, emailAddresses,
140 phones, websites, properties);
141 }
142
143 public static void updateDisplay(long companyId,
144 java.lang.String languageId, java.lang.String timeZoneId)
145 throws com.liferay.portal.kernel.exception.PortalException,
146 com.liferay.portal.kernel.exception.SystemException {
147 getService().updateDisplay(companyId, languageId, timeZoneId);
148 }
149
150 public static void updateLogo(long companyId, java.io.File file)
151 throws com.liferay.portal.kernel.exception.PortalException,
152 com.liferay.portal.kernel.exception.SystemException {
153 getService().updateLogo(companyId, file);
154 }
155
156 public static void updatePreferences(long companyId,
157 com.liferay.portal.kernel.util.UnicodeProperties properties)
158 throws com.liferay.portal.kernel.exception.PortalException,
159 com.liferay.portal.kernel.exception.SystemException {
160 getService().updatePreferences(companyId, properties);
161 }
162
163 public static void updateSecurity(long companyId,
164 java.lang.String authType, boolean autoLogin, boolean sendPassword,
165 boolean strangers, boolean strangersWithMx, boolean strangersVerify,
166 boolean communityLogo)
167 throws com.liferay.portal.kernel.exception.PortalException,
168 com.liferay.portal.kernel.exception.SystemException {
169 getService()
170 .updateSecurity(companyId, authType, autoLogin, sendPassword,
171 strangers, strangersWithMx, strangersVerify, communityLogo);
172 }
173
174 public static CompanyService getService() {
175 if (_service == null) {
176 _service = (CompanyService)PortalBeanLocatorUtil.locate(CompanyService.class.getName());
177
178 ReferenceRegistry.registerReference(CompanyServiceUtil.class,
179 "_service");
180 MethodCache.remove(CompanyService.class);
181 }
182
183 return _service;
184 }
185
186 public void setService(CompanyService service) {
187 MethodCache.remove(CompanyService.class);
188
189 _service = service;
190
191 ReferenceRegistry.registerReference(CompanyServiceUtil.class, "_service");
192 MethodCache.remove(CompanyService.class);
193 }
194
195 private static CompanyService _service;
196 }