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 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 via CustomerState
      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

      protected org.broadleafcommerce.profile.core.domain.Customer getCustomer(Long customerId)