Package de.fhdw.ify208.ticketmaster.webapp.model

Examples of de.fhdw.ify208.ticketmaster.webapp.model.UserProfile


        if ((orders != null) &&
                (orders.getReturncode() == 0)) {

            for (OrderDTO o : orders.getOrder())
                result.add(new OrderDetail(o));
        }

        return result;
    }
View Full Code Here


        orderDTO.setEvent(eventDetail.getEventData());
        orderDTO.setBillingAddress(userProfile.getBillingAddress());
        orderDTO.setShippingAddress(userProfile.getShippingAddress());
        orderDTO.setOrderDate(xCal);

        _newOrder = new OrderDetail(orderDTO);

        SystemController.redirectUrl(ctx, "checkout");
    }
View Full Code Here

        boolean bIsRegistered = false;

        try {

            UserProfile profile = getNewUser();

            if (!profile.getChangePin().getNewPin().equals(profile.getChangePin().getRetryPin())) {

                bIsRegistered = false;

                msg = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Password mismatch",
                        "Please make sure that your re-type your pin correctly!");
            } else {

                profile.getProfileData().setPassword(profile.getChangePin().getNewPin());

                CustomerDTO _customerDTO = _customerWebService.getCustomerServiceImplPort().registerCustomer(
                        profile.getProfileData());

                if (_customerDTO.getReturncode() == 0) {

                    bIsRegistered = true;

                    AddressDTO defaultAdr =_customerWebService.getCustomerServiceImplPort().maintainAddress(_customerDTO, profile.getBillingAddress());

                    if (defaultAdr.getReturncode() != 0) {
                   
                        msg = new FacesMessage(FacesMessage.SEVERITY_WARN, "Profile Data missing",
                                        "Could not store your billing address. Please check the data!");
                       
                        SystemController.redirectUrl(ctx, "userprofile");
                    }
                   
                    defaultAdr = _customerWebService.getCustomerServiceImplPort().maintainAddress(_customerDTO, profile.getShippingAddress());

                    if (defaultAdr.getReturncode() != 0) {

                        msg = new FacesMessage(FacesMessage.SEVERITY_WARN, "Profile Data missing",
                                "Could not store your shipping address. Please check the data!");
View Full Code Here

     * @param customerDTO the customer which profile is to be returned
     * @return  the user profile for this customer
     */
    private UserProfile getUserProfile(CustomerDTO customerDTO) {

        UserProfile result = new UserProfile(customerDTO);
        result.setCustomerTypes(_customerTypes);
        result.setAddressTypes(_addressTypes);
        result.setCountries(_countries);

        if (customerDTO.getId() != 0) {

            AddressListDTO addresses = _customerWebService.getCustomerServiceImplPort().getCustomerAddresses(customerDTO);

            if ((addresses != null) &&
                    (addresses.getReturncode() == 0)) {

                result.setAddresses(addresses.getAddress());
            }
        } else {

            result.setAddresses(new ArrayList<AddressDTO>());
        }

        return result;
    }
View Full Code Here

     *
     * @return the rating of the event for the current order and customer (if available)
     */
    private RatingDTO findRating() {

        RatingDTO result = null;

        for (RatingDTO r : getEventDetail().getEventData().getRatings().getRating()) {

            if (r.getUserName().equals(_order.getCustomer().getUserName())) {

View Full Code Here

     *
     * @return TRUE/FALSE
     */
    public boolean isVoidable() {

        TypeCodeDTO status = _order.getOrderStatus();

        return (status != null &&
                !status.getName().equals("Voided") &&
                !status.getName().equals("Completed"));
    }
View Full Code Here

     * @return TRUE/FALSE
     */
    public boolean isRatingAllowed() {

        EventDetail evt = getEventDetail();
        TypeCodeDTO orderStatus = _order.getOrderStatus();

        Date today = new Date();
        Date evtDate = evt.getEventData().getStartDate().toGregorianCalendar().getTime();

        return (evtDate.before(today) &&
                orderStatus.getName().equals("Completed"));
    }
View Full Code Here

TOP

Related Classes of de.fhdw.ify208.ticketmaster.webapp.model.UserProfile

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.