/** * Returns the portal instance ID. * * <p> * Company is Liferay's technical name for a portal instance. * <p> * * @return the portal instance ID */ public long getCompanyId() { return _company.getCompanyId(); }
/** * Returns the company ID of this company. * * @return the company ID of this company */ @Override public long getCompanyId() { return _company.getCompanyId(); }
@Override public Long get(Company company) { return company.getCompanyId(); }
public Group getControlPanelGroup() { if (_controlPanelGroup == null) { try { _controlPanelGroup = GroupLocalServiceUtil.getGroup( _company.getCompanyId(), GroupConstants.CONTROL_PANEL); } catch (PortalException pe) { ReflectionUtil.throwException(pe); } } return _controlPanelGroup; }
public static CompanySoap toSoapModel(Company model) { CompanySoap soapModel = new CompanySoap(); soapModel.setMvccVersion(model.getMvccVersion()); soapModel.setCompanyId(model.getCompanyId()); soapModel.setAccountId(model.getAccountId()); soapModel.setWebId(model.getWebId()); soapModel.setKey(model.getKey()); soapModel.setMx(model.getMx()); soapModel.setHomeURL(model.getHomeURL()); soapModel.setLogoId(model.getLogoId()); soapModel.setSystem(model.isSystem()); soapModel.setMaxUsers(model.getMaxUsers()); soapModel.setActive(model.isActive()); return soapModel; }
@Override public void portalInstanceRegistered(Company company) throws Exception { JournalServiceConfiguration journalServiceConfiguration = _configurationProvider.getCompanyConfiguration( JournalServiceConfiguration.class, company.getCompanyId()); if (!journalServiceConfiguration.syncContentSearchOnStartup()) { return; } _journalContentSearchLocalService.checkContentSearches( company.getCompanyId()); }
@Override public void portalInstanceRegistered(Company company) throws Exception { try { _searchEngineHelper.initialize(company.getCompanyId()); } catch (Exception e) { _log.error( "Unable to initialize search engine for company " + company, e); } }
@Override public void portalInstanceUnregistered(Company company) throws Exception { try { _searchEngineHelper.removeCompany(company.getCompanyId()); } catch (Exception e) { _log.error( "Unable to remove search engine for company " + company, e); } }
setContextAttribute("[$COMPANY_ID$]", company.getCompanyId()); setContextAttribute("[$COMPANY_MX$]", company.getMx()); setContextAttribute("[$COMPANY_NAME$]", company.getName());
protected void updateDefaultDraftArticleAssets() throws Exception { try (LoggingTimer loggingTimer = new LoggingTimer()) { List<Company> companies = _companyLocalService.getCompanies(); for (Company company : companies) { updateDefaultDraftArticleAssets(company.getCompanyId()); } } }
protected void updateJournalArticles() throws Exception { try (LoggingTimer loggingTimer = new LoggingTimer()) { List<Company> companies = _companyLocalService.getCompanies(); for (Company company : companies) { updateJournalArticles(company.getCompanyId()); } } }
@Override public void portalInstanceRegistered(Company company) throws Exception { if (!GetterUtil.getBoolean(_props.get(PropsKeys.INDEX_ON_STARTUP))) { return; } try { _indexWriterHelper.reindex( UserConstants.USER_ID_DEFAULT, "reindexOnActivate#" + _className, new long[] {company.getCompanyId()}, _className, null); } catch (SearchException se) { _log.error("Unable to reindex on activation", se); } }
@Override public void portalInstanceRegistered(Company company) throws Exception { if (!_journalServiceConfiguration.addDefaultStructures()) { return; } ServiceContext serviceContext = new ServiceContext(); serviceContext.setAddGuestPermissions(true); serviceContext.setAddGroupPermissions(true); Group group = _groupLocalService.getCompanyGroup( company.getCompanyId()); serviceContext.setScopeGroupId(group.getGroupId()); long defaultUserId = _userLocalService.getDefaultUserId( company.getCompanyId()); serviceContext.setUserId(defaultUserId); Class<?> clazz = getClass(); _defaultDDMStructureHelper.addDDMStructures( defaultUserId, group.getGroupId(), _portal.getClassNameId(JournalArticle.class), clazz.getClassLoader(), "com/liferay/journal/internal/upgrade/v1_0_0/dependencies" + "/basic-web-content-structure.xml", serviceContext); }
company.getCompanyId())); company.getGroupId(), company.getCompanyId(), "type", nameMap, new HashMap<Locale, String>()); company.getGroupId(), company.getCompanyId(), type, assetVocabulary.getVocabularyId()); company.getCompanyId(), journalArticleTypesToAssetCategoryIds);
company.getCompanyId()); company.getCompanyId());
protected void registerCompany( PortalInstanceLifecycleListener portalInstanceLifecycleListener, Company company) { if (!(portalInstanceLifecycleListener instanceof Clusterable) && !clusterMasterExecutor.isMaster()) { if (_log.isDebugEnabled()) { _log.debug("Skipping " + portalInstanceLifecycleListener); } return; } Long companyId = CompanyThreadLocal.getCompanyId(); Locale siteDefaultLocale = LocaleThreadLocal.getSiteDefaultLocale(); try { CompanyThreadLocal.setCompanyId(company.getCompanyId()); LocaleThreadLocal.setSiteDefaultLocale(null); portalInstanceLifecycleListener.portalInstanceRegistered(company); } catch (Exception e) { if (_log.isWarnEnabled()) { _log.warn("Unable to register portal instance " + company, e); } } finally { CompanyThreadLocal.setCompanyId(companyId); LocaleThreadLocal.setSiteDefaultLocale(siteDefaultLocale); } }
subscriptionSender.setCompanyId(company.getCompanyId()); subscriptionSender.setContextAttributes( "[$ARTICLE_ID$]", article.getArticleId(), "[$ARTICLE_TITLE$]",