com.liferay.segments.web.internal.portlet.action.DeleteSegmentsCompanyConfigurationMVCActionCommand Maven / Gradle / Ivy
The newest version!
/**
* SPDX-FileCopyrightText: (c) 2000 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.segments.web.internal.portlet.action;
import com.liferay.configuration.admin.constants.ConfigurationAdminPortletKeys;
import com.liferay.portal.kernel.portlet.bridges.mvc.BaseMVCActionCommand;
import com.liferay.portal.kernel.portlet.bridges.mvc.MVCActionCommand;
import com.liferay.portal.kernel.util.Portal;
import com.liferay.segments.configuration.provider.SegmentsConfigurationProvider;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
/**
* @author Cristina González
*/
@Component(
property = {
"javax.portlet.name=" + ConfigurationAdminPortletKeys.INSTANCE_SETTINGS,
"mvc.command.name=/instance_settings/delete_segments_company_configuration"
},
service = MVCActionCommand.class
)
public class DeleteSegmentsCompanyConfigurationMVCActionCommand
extends BaseMVCActionCommand {
@Override
protected void doProcessAction(
ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
_segmentsConfigurationProvider.resetSegmentsCompanyConfiguration(
_portal.getCompanyId(actionRequest));
}
@Reference
private Portal _portal;
@Reference
private SegmentsConfigurationProvider _segmentsConfigurationProvider;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy