Package org.broadleafcommerce.profile.core.domain

Examples of org.broadleafcommerce.profile.core.domain.State


            billingAddress.setAddressLine1(billToDTO.getAddressLine1());
            billingAddress.setAddressLine2(billToDTO.getAddressLine2());
            billingAddress.setCity(billToDTO.getAddressCityLocality());

            //TODO: what happens if State and Country cannot be found?
            State state = null;
            if(billToDTO.getAddressStateRegion() != null) {
                state = stateService.findStateByAbbreviation(billToDTO.getAddressStateRegion());
            }
            if (state == null) {
                LOG.warn("The given state from the response: " + billToDTO.getAddressStateRegion() + " could not be found"
View Full Code Here


            shippingAddress.setLastName(shipToDTO.getAddressLastName());
            shippingAddress.setAddressLine1(shipToDTO.getAddressLine1());
            shippingAddress.setAddressLine2(shipToDTO.getAddressLine2());
            shippingAddress.setCity(shipToDTO.getAddressCityLocality());
           
            State state = null;
            if(shipToDTO.getAddressStateRegion() != null) {
                state = stateService.findStateByAbbreviation(shipToDTO.getAddressStateRegion());
            }
            if (state == null) {
                LOG.warn("The given state from the response: " + shipToDTO.getAddressStateRegion() + " could not be found"
View Full Code Here

        country.setAbbreviation("US");
        country.setName("United States");

        country = countryService.save(country);

        State state = new StateImpl();
        state.setAbbreviation("TX");
        state.setName("Texas");
        state.setCountry(country);

        state = stateService.save(state);
       
        Address address = new AddressImpl();
        address.setAddressLine1("123 Test Rd");
View Full Code Here

        country.setAbbreviation("US");
        country.setName("United States");

        country = countryService.save(country);

        State state = new StateImpl();
        state.setAbbreviation("TX");
        state.setName("Texas");
        state.setCountry(country);

        state = stateService.save(state);
       
        Address address = new AddressImpl();
        address.setAddressLine1("123 Test Rd");
View Full Code Here

        address.setCity("Dallas");
        address.setFirstName("Jeff");
        address.setLastName("Fischer");
        address.setPostalCode("75240");
        address.setPrimaryPhone("972-978-9067");
        State state = new StateImpl();
        state.setAbbreviation("ALL");
        state.setName("ALL");
        address.setState(state);
        Country country = new CountryImpl();
        country.setAbbreviation("US");
        country.setName("United States");
        state.setCountry(country);
        address.setCountry(country);
        return address;
    }
View Full Code Here

        country.setName("United States");
        countryService.save(country);
    }
   
    public void createState() {
        State state = new StateImpl();
        state.setAbbreviation("KY");
        state.setName("Kentucky");
        state.setCountry(countryService.findCountryByAbbreviation("US"));
        stateService.save(state);
    }
View Full Code Here

    /**
     * Saves a customerAddress with state KY and country US.  Requires that createCountry() and createState() have been called
     * @param customerAddress
     */
    public CustomerAddress saveCustomerAddress(CustomerAddress customerAddress) {
        State state = stateService.findStateByAbbreviation("KY");
        customerAddress.getAddress().setState(state);
        Country country = countryService.findCountryByAbbreviation("US");
        customerAddress.getAddress().setCountry(country);
        return customerAddressService.saveCustomerAddress(customerAddress);
    }
View Full Code Here

    @DataProvider(name = "setupAddress")
    public static Object[][] createAddress() {
        Address address1 = new AddressImpl();
        address1.setAddressLine1("1234 Merit Drive");
        address1.setCity("Dallas");
        State state = new StateImpl();
        state.setAbbreviation("TX");
        address1.setState(state);
        address1.setPostalCode("75251");

        Address address2 = new AddressImpl();
        address2.setAddressLine1("12 Testing Drive");
        address2.setCity("San Jose");
        state = new StateImpl();
        state.setAbbreviation("CA");
        address2.setState(state);
        address2.setPostalCode("75251");

        return new Object[][] { new Object[] { address1 }, new Object[] { address2 } };
    }
View Full Code Here

        country.setName("United States");
        countryService.save(country);
    }
   
    public void createState() {
        State state = new StateImpl();
        state.setAbbreviation("KY");
        state.setName("Kentucky");
        state.setCountry(countryService.findCountryByAbbreviation("US"));
        stateService.save(state);
    }
View Full Code Here

    /**
     * Saves a customerAddress with state KY and country US.  Requires that createCountry() and createState() have been called
     * @param customerAddress
     */
    public CustomerAddress saveCustomerAddress(CustomerAddress customerAddress) {
        State state = stateService.findStateByAbbreviation("KY");
        customerAddress.getAddress().setState(state);
        Country country = countryService.findCountryByAbbreviation("US");
        customerAddress.getAddress().setCountry(country);
        return customerAddressService.saveCustomerAddress(customerAddress);
    }
View Full Code Here

TOP

Related Classes of org.broadleafcommerce.profile.core.domain.State

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.