Package org.hoteia.qalingo.core.pojo.customer

Examples of org.hoteia.qalingo.core.pojo.customer.WishlistPojoResponse


   
    @GET
    @Path("wishlist")
    @Produces(MediaType.APPLICATION_JSON)
    public WishlistPojoResponse getWishlist(final WishlistPojoRequest wishlistPojoRequest) {
        WishlistPojoResponse wishlistPojoResponse = new WishlistPojoResponse();
       
        Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
        if (!(authentication instanceof AnonymousAuthenticationToken)) {
            String currentCustomerName = authentication.getName();
           
            if(StringUtils.isNotEmpty(currentCustomerName)){
                if(StringUtils.isNotEmpty(wishlistPojoRequest.getMarketAreaCode())){
                    Customer customer = customerService.getCustomerByLoginOrEmail(currentCustomerName);
                    MarketArea marketArea = marketService.getMarketAreaByCode(wishlistPojoRequest.getMarketAreaCode());
                    List<CustomerWishlistPojo> wishlists = customerPojoService.getWishlist(customer, marketArea);
                    wishlistPojoResponse.setWishlists(wishlists);
                    return wishlistPojoResponse;
                   
                } else {
                    // SEND ERREUR
                }
View Full Code Here

TOP

Related Classes of org.hoteia.qalingo.core.pojo.customer.WishlistPojoResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.