com.liferay.commerce.checkout.web.internal.util.OrderConfirmationCommerceCheckoutStep Maven / Gradle / Ivy
/**
* 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.commerce.checkout.web.internal.util;
import com.liferay.commerce.checkout.web.internal.display.context.OrderConfirmationCheckoutStepDisplayContext;
import com.liferay.commerce.constants.CommerceCheckoutWebKeys;
import com.liferay.commerce.order.CommerceOrderHttpHelper;
import com.liferay.commerce.product.service.CommerceChannelLocalService;
import com.liferay.commerce.service.CommerceOrderPaymentLocalService;
import com.liferay.commerce.service.CommerceOrderService;
import com.liferay.commerce.util.BaseCommerceCheckoutStep;
import com.liferay.commerce.util.CommerceCheckoutStep;
import com.liferay.frontend.taglib.servlet.taglib.util.JSPRenderer;
import com.liferay.portal.kernel.util.Portal;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
/**
* @author Marco Leo
* @author Andrea Di Giorgi
*/
@Component(
property = {
"commerce.checkout.step.name=" + OrderConfirmationCommerceCheckoutStep.NAME,
"commerce.checkout.step.order:Integer=" + Integer.MAX_VALUE
},
service = CommerceCheckoutStep.class
)
public class OrderConfirmationCommerceCheckoutStep
extends BaseCommerceCheckoutStep {
public static final String NAME = "order-confirmation";
@Override
public String getName() {
return NAME;
}
@Override
public boolean isOrder() {
return true;
}
@Override
public boolean isSennaDisabled() {
return true;
}
@Override
public void processAction(
ActionRequest actionRequest, ActionResponse actionResponse)
throws Exception {
}
@Override
public void render(
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse)
throws Exception {
OrderConfirmationCheckoutStepDisplayContext
orderConfirmationCheckoutStepDisplayContext =
new OrderConfirmationCheckoutStepDisplayContext(
_commerceChannelLocalService, _commerceOrderHttpHelper,
_commerceOrderPaymentLocalService, _commerceOrderService,
httpServletRequest, _portal);
httpServletRequest.setAttribute(
CommerceCheckoutWebKeys.COMMERCE_CHECKOUT_STEP_DISPLAY_CONTEXT,
orderConfirmationCheckoutStepDisplayContext);
_jspRenderer.renderJSP(
httpServletRequest, httpServletResponse,
"/checkout_step/order_confirmation.jsp");
}
@Override
public boolean showControls(
HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) {
return false;
}
@Reference
private CommerceChannelLocalService _commerceChannelLocalService;
@Reference
private CommerceOrderHttpHelper _commerceOrderHttpHelper;
@Reference
private CommerceOrderPaymentLocalService _commerceOrderPaymentLocalService;
@Reference
private CommerceOrderService _commerceOrderService;
@Reference
private JSPRenderer _jspRenderer;
@Reference
private Portal _portal;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy