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