Package org.axonframework.sample.app.api

Examples of org.axonframework.sample.app.api.RemoveAddressCommand



    @RequestMapping(value = "{identifier}/address/delete/{addressType}", method = RequestMethod.POST)
    public String formDeleteAddressSubmit(@ModelAttribute("address") AddressEntry address, BindingResult bindingResult) {
        if (!bindingResult.hasErrors()) {
            RemoveAddressCommand command = new RemoveAddressCommand();
            command.setContactId(address.getIdentifier());
            command.setAddressType(address.getAddressType());
            commandBus.dispatch(new GenericCommandMessage<Object>(command));

            return "redirect:/contacts/" + address.getIdentifier();
        }
        return "contacts/removeAddress";
View Full Code Here


            throw new MissingServletRequestParameterException("identifier", "String");
        }
        if (null == address.getAddressType()) {
            throw new MissingServletRequestParameterException("addressType", "PRIVATE,WORK,VACATION");
        }
        RemoveAddressCommand command = new RemoveAddressCommand();
        command.setContactId(address.getIdentifier());
        command.setAddressType(address.getAddressType());
        commandBus.dispatch(new GenericCommandMessage<Object>(command));

    }
View Full Code Here

TOP

Related Classes of org.axonframework.sample.app.api.RemoveAddressCommand

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.