com.liferay.account.internal.search.AccountRoleModelSearchConfigurator Maven / Gradle / Ivy
/**
* SPDX-FileCopyrightText: (c) 2023 Liferay, Inc. https://liferay.com
* SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
*/
package com.liferay.account.internal.search;
import com.liferay.account.internal.search.spi.model.index.contributor.AccountRoleModelIndexerWriterContributor;
import com.liferay.account.model.AccountRole;
import com.liferay.account.service.AccountRoleLocalService;
import com.liferay.portal.kernel.search.Field;
import com.liferay.portal.search.batch.DynamicQueryBatchIndexingActionableFactory;
import com.liferay.portal.search.spi.model.index.contributor.ModelIndexerWriterContributor;
import com.liferay.portal.search.spi.model.registrar.ModelSearchConfigurator;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
/**
* @author Drew Brokke
*/
@Component(service = ModelSearchConfigurator.class)
public class AccountRoleModelSearchConfigurator
implements ModelSearchConfigurator {
@Override
public String getClassName() {
return AccountRole.class.getName();
}
@Override
public String[] getDefaultSelectedFieldNames() {
return new String[] {
Field.COMPANY_ID, Field.ENTRY_CLASS_NAME, Field.ENTRY_CLASS_PK,
Field.UID
};
}
@Override
public ModelIndexerWriterContributor
getModelIndexerWriterContributor() {
return _modelIndexWriterContributor;
}
@Override
public boolean isSearchResultPermissionFilterSuppressed() {
return true;
}
@Activate
protected void activate() {
_modelIndexWriterContributor =
new AccountRoleModelIndexerWriterContributor(
_accountRoleLocalService,
_dynamicQueryBatchIndexingActionableFactory);
}
@Reference
private AccountRoleLocalService _accountRoleLocalService;
@Reference
private DynamicQueryBatchIndexingActionableFactory
_dynamicQueryBatchIndexingActionableFactory;
private ModelIndexerWriterContributor
_modelIndexWriterContributor;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy