Class CustomerEndpoint
java.lang.Object
com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
com.broadleafcommerce.rest.api.endpoint.customer.CustomerEndpoint
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.ApplicationContextAware,org.springframework.context.MessageSourceAware
@FrameworkRestController
@FrameworkMapping(value="/customer",
produces={"application/json","application/xml"})
public class CustomerEndpoint
extends BaseEndpoint
This endpoint depends on JAX-RS. It should be extended by components that actually wish
to provide an endpoint. The annotations such as @Path, @Scope, @Context, @PathParam, @QueryParam,
- Author:
- Jay Aisenbrey (cja769)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.broadleafcommerce.core.web.controller.account.validator.ChangePasswordValidatorprotected org.broadleafcommerce.profile.core.service.CustomerAddressServiceprotected org.broadleafcommerce.profile.core.service.CustomerPaymentServiceprotected org.broadleafcommerce.profile.core.service.CustomerServiceFields inherited from class com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
context, messageSource -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAddress(jakarta.servlet.http.HttpServletRequest request, CustomerAddressWrapper wrapper) addAddress(jakarta.servlet.http.HttpServletRequest request, Long customerId, CustomerAddressWrapper wrapper) addAttribute(jakarta.servlet.http.HttpServletRequest request, CustomerAttributeWrapper wrapper) addAttribute(jakarta.servlet.http.HttpServletRequest request, Long customerId, CustomerAttributeWrapper wrapper) addCustomer(jakarta.servlet.http.HttpServletRequest request, CustomerWrapper wrapper) addCustomerPayment(jakarta.servlet.http.HttpServletRequest request, CustomerPaymentWrapper wrapper) addCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long customerId, CustomerPaymentWrapper wrapper) changePassword(jakarta.servlet.http.HttpServletRequest request, org.broadleafcommerce.core.web.controller.account.ChangePasswordForm changePasswordForm, org.springframework.validation.BindingResult result) findAddress(jakarta.servlet.http.HttpServletRequest request, Long customerId, String addressName) findAddress(jakarta.servlet.http.HttpServletRequest request, String addressName) findAllAddresses(jakarta.servlet.http.HttpServletRequest request) findAllAddresses(jakarta.servlet.http.HttpServletRequest request, Long customerId) findAllCustomerPayments(jakarta.servlet.http.HttpServletRequest request) findAllCustomerPayments(jakarta.servlet.http.HttpServletRequest request, Long customerId) findCustomer(jakarta.servlet.http.HttpServletRequest request, Long customerId) Returns the current customer viaCustomerStatefindCustomerByEmail(jakarta.servlet.http.HttpServletRequest request, String emailAddress) findCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long paymentId) findCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long customerId, Long paymentId) protected org.broadleafcommerce.profile.core.domain.CustomergetCustomer(Long customerId) removeAddress(jakarta.servlet.http.HttpServletRequest request, Long customerId, String addressName) removeAddress(jakarta.servlet.http.HttpServletRequest request, String addressName) removeAllAddresses(jakarta.servlet.http.HttpServletRequest request) removeAllAddresses(jakarta.servlet.http.HttpServletRequest request, Long customerId) removeAllAttributes(jakarta.servlet.http.HttpServletRequest request) removeAllAttributes(jakarta.servlet.http.HttpServletRequest request, Long customerId) removeAllCustomerPayments(jakarta.servlet.http.HttpServletRequest request) removeAllCustomerPayments(jakarta.servlet.http.HttpServletRequest request, Long customerId) removeAttribute(jakarta.servlet.http.HttpServletRequest request, Long customerId, String attributeName) removeAttribute(jakarta.servlet.http.HttpServletRequest request, String attributeName) removeCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long paymentId) removeCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long customerId, Long paymentId) updateAddress(jakarta.servlet.http.HttpServletRequest request, Long customerAddressId, CustomerAddressWrapper wrapper) updateAddress(jakarta.servlet.http.HttpServletRequest request, Long customerId, Long customerAddressId, CustomerAddressWrapper wrapper) updateCustomer(jakarta.servlet.http.HttpServletRequest request, CustomerWrapper wrapper) updateCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long paymentId, CustomerPaymentWrapper wrapper) updateCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long customerId, Long paymentId, CustomerPaymentWrapper wrapper) Methods inherited from class com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
getApplicationContext, getMessageSource, setApplicationContext, setMessageSource
-
Field Details
-
customerService
protected org.broadleafcommerce.profile.core.service.CustomerService customerService -
changePasswordValidator
protected org.broadleafcommerce.core.web.controller.account.validator.ChangePasswordValidator changePasswordValidator -
customerAddressService
protected org.broadleafcommerce.profile.core.service.CustomerAddressService customerAddressService -
customerPaymentService
protected org.broadleafcommerce.profile.core.service.CustomerPaymentService customerPaymentService
-
-
Constructor Details
-
CustomerEndpoint
public CustomerEndpoint()
-
-
Method Details
-
findCustomerByEmail
@FrameworkMapping(method=GET) public CustomerWrapper findCustomerByEmail(jakarta.servlet.http.HttpServletRequest request, @RequestParam(value="email",required=true) String emailAddress) -
findCustomer
public CustomerWrapper findCustomer(jakarta.servlet.http.HttpServletRequest request, Long customerId) Returns the current customer viaCustomerState- Parameters:
request-- Returns:
-
addCustomer
@FrameworkMapping(method=POST, consumes={"application/json","application/xml"}) public CustomerWrapper addCustomer(jakarta.servlet.http.HttpServletRequest request, @RequestBody CustomerWrapper wrapper) -
updateCustomer
@FrameworkMapping(method=PUT, consumes={"application/json","application/xml"}) public CustomerWrapper updateCustomer(jakarta.servlet.http.HttpServletRequest request, @RequestBody CustomerWrapper wrapper) -
changePassword
@FrameworkMapping(method=POST, value="/password", consumes={"application/json","application/xml"}) public CustomerWrapper changePassword(jakarta.servlet.http.HttpServletRequest request, @RequestBody org.broadleafcommerce.core.web.controller.account.ChangePasswordForm changePasswordForm, org.springframework.validation.BindingResult result) -
removeAllAttributes
@FrameworkMapping(value="/attributes", method=DELETE) public CustomerWrapper removeAllAttributes(jakarta.servlet.http.HttpServletRequest request) -
removeAllAttributes
public CustomerWrapper removeAllAttributes(jakarta.servlet.http.HttpServletRequest request, Long customerId) -
addAttribute
@FrameworkMapping(value="/attribute", method=PUT, consumes={"application/json","application/xml"}) public CustomerWrapper addAttribute(jakarta.servlet.http.HttpServletRequest request, @RequestBody CustomerAttributeWrapper wrapper) -
addAttribute
public CustomerWrapper addAttribute(jakarta.servlet.http.HttpServletRequest request, Long customerId, CustomerAttributeWrapper wrapper) -
removeAttribute
@FrameworkMapping(value="/attribute/{attributeName}", method=DELETE) public CustomerWrapper removeAttribute(jakarta.servlet.http.HttpServletRequest request, @PathVariable("attributeName") String attributeName) -
removeAttribute
public CustomerWrapper removeAttribute(jakarta.servlet.http.HttpServletRequest request, Long customerId, String attributeName) -
findAddress
@FrameworkMapping(value="/address", method=GET) public CustomerAddressWrapper findAddress(jakarta.servlet.http.HttpServletRequest request, @RequestParam("addressName") String addressName) -
findAddress
public CustomerAddressWrapper findAddress(jakarta.servlet.http.HttpServletRequest request, Long customerId, String addressName) -
findAllAddresses
@FrameworkMapping(value="/addresses", method=GET) public List<CustomerAddressWrapper> findAllAddresses(jakarta.servlet.http.HttpServletRequest request) -
findAllAddresses
public List<CustomerAddressWrapper> findAllAddresses(jakarta.servlet.http.HttpServletRequest request, Long customerId) -
addAddress
@FrameworkMapping(value="/address", method=PUT, consumes={"application/json","application/xml"}) public CustomerAddressWrapper addAddress(jakarta.servlet.http.HttpServletRequest request, @RequestBody CustomerAddressWrapper wrapper) -
addAddress
public CustomerAddressWrapper addAddress(jakarta.servlet.http.HttpServletRequest request, Long customerId, CustomerAddressWrapper wrapper) -
updateAddress
@FrameworkMapping(value="/address/{addressId}", method=PUT, consumes={"application/json","application/xml"}) public CustomerAddressWrapper updateAddress(jakarta.servlet.http.HttpServletRequest request, @PathVariable("addressId") Long customerAddressId, @RequestBody CustomerAddressWrapper wrapper) -
updateAddress
public CustomerAddressWrapper updateAddress(jakarta.servlet.http.HttpServletRequest request, Long customerId, Long customerAddressId, CustomerAddressWrapper wrapper) -
removeAllAddresses
@FrameworkMapping(value="/addresses", method=DELETE) public CustomerWrapper removeAllAddresses(jakarta.servlet.http.HttpServletRequest request) -
removeAllAddresses
public CustomerWrapper removeAllAddresses(jakarta.servlet.http.HttpServletRequest request, Long customerId) -
removeAddress
@FrameworkMapping(value="/address/{addressName}", method=DELETE) public List<CustomerAddressWrapper> removeAddress(jakarta.servlet.http.HttpServletRequest request, @PathVariable("addressName") String addressName) -
removeAddress
public List<CustomerAddressWrapper> removeAddress(jakarta.servlet.http.HttpServletRequest request, Long customerId, String addressName) -
findCustomerPayment
@FrameworkMapping(value="/payment", method=GET) public CustomerPaymentWrapper findCustomerPayment(jakarta.servlet.http.HttpServletRequest request, @RequestParam("paymentId") Long paymentId) -
findCustomerPayment
public CustomerPaymentWrapper findCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long customerId, Long paymentId) -
findAllCustomerPayments
@FrameworkMapping(value="/payments", method=GET) public List<CustomerPaymentWrapper> findAllCustomerPayments(jakarta.servlet.http.HttpServletRequest request) -
findAllCustomerPayments
public List<CustomerPaymentWrapper> findAllCustomerPayments(jakarta.servlet.http.HttpServletRequest request, Long customerId) -
addCustomerPayment
@FrameworkMapping(value="/payment", method=POST, consumes={"application/json","application/xml"}) public CustomerPaymentWrapper addCustomerPayment(jakarta.servlet.http.HttpServletRequest request, @RequestBody CustomerPaymentWrapper wrapper) -
addCustomerPayment
public CustomerPaymentWrapper addCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long customerId, CustomerPaymentWrapper wrapper) -
updateCustomerPayment
@FrameworkMapping(value="/payment/{paymentId}", method=PUT, consumes={"application/json","application/xml"}) public CustomerPaymentWrapper updateCustomerPayment(jakarta.servlet.http.HttpServletRequest request, @PathVariable Long paymentId, @RequestBody CustomerPaymentWrapper wrapper) -
updateCustomerPayment
public CustomerPaymentWrapper updateCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long customerId, Long paymentId, CustomerPaymentWrapper wrapper) -
removeAllCustomerPayments
@FrameworkMapping(value="/payments", method=DELETE) public CustomerWrapper removeAllCustomerPayments(jakarta.servlet.http.HttpServletRequest request) -
removeAllCustomerPayments
public CustomerWrapper removeAllCustomerPayments(jakarta.servlet.http.HttpServletRequest request, Long customerId) -
removeCustomerPayment
@FrameworkMapping(value="/payment/{paymentId}", method=DELETE) public List<CustomerPaymentWrapper> removeCustomerPayment(jakarta.servlet.http.HttpServletRequest request, @PathVariable("paymentId") Long paymentId) -
removeCustomerPayment
public List<CustomerPaymentWrapper> removeCustomerPayment(jakarta.servlet.http.HttpServletRequest request, Long customerId, Long paymentId) -
getCustomer
-