class CargoAdminController {

    private final BookingServiceFacade bookingServiceFacade;

    public CargoAdminController(BookingServiceFacade bookingServiceFacade) {
        this.bookingServiceFacade = bookingServiceFacade;
    }

    @InitBinder
    protected void initBinder(HttpServletRequest request, ServletRequestDataBinder binder) throws Exception {
        binder.registerCustomEditor(Instant.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd HH:mm"), false));
    }

    @RequestMapping("/registration")
    public String registration(HttpServletRequest request, HttpServletResponse response, Map<String, Object> model) throws Exception {
        List<LocationDTO> dtoList = bookingServiceFacade.listShippingLocations();

        List<String> unLocodeStrings = new ArrayList<String>();

        for (LocationDTO dto : dtoList) {
            unLocodeStrings.add(dto.getUnLocode());
        }

        model.put("unlocodes", unLocodeStrings);
        model.put("locations", dtoList);
        return "admin/registrationForm";
    }

    @RequestMapping(value = "/register", method = RequestMethod.POST)
    public void register(HttpServletRequest request, HttpServletResponse response,
                         RegistrationCommand command) throws Exception {

        LocalDate arrivalDeadline = LocalDate.parse(command.getArrivalDeadline(), DateTimeFormatter.ofPattern("dd/MM/yyyy"));
        String trackingId = bookingServiceFacade.bookNewCargo(
                command.getOriginUnlocode(), command.getDestinationUnlocode(), arrivalDeadline.atStartOfDay().toInstant(ZoneOffset.UTC)
        );
        response.sendRedirect("show?trackingId=" + trackingId);
    }

    @RequestMapping("/list")
    public String list(HttpServletRequest request, HttpServletResponse response, Map<String, Object> model) throws Exception {
        List<CargoRoutingDTO> cargoList = bookingServiceFacade.listAllCargos();

        model.put("cargoList", cargoList);
        return "admin/list";
    }

    @RequestMapping("/show")
    public String show(HttpServletRequest request, HttpServletResponse response, Map<String, Object> model) throws Exception {
        String trackingId = request.getParameter("trackingId");
        CargoRoutingDTO dto = bookingServiceFacade.loadCargoForRouting(trackingId);
        model.put("cargo", dto);
        return "admin/show";
    }

    @RequestMapping("/selectItinerary")
    public String selectItinerary(HttpServletRequest request, HttpServletResponse response, Map<String, Object> model) throws Exception {
        String trackingId = request.getParameter("trackingId");

        List<RouteCandidateDTO> routeCandidates = bookingServiceFacade.requestPossibleRoutesForCargo(trackingId);
        model.put("routeCandidates", routeCandidates);

        CargoRoutingDTO cargoDTO = bookingServiceFacade.loadCargoForRouting(trackingId);
        model.put("cargo", cargoDTO);

        return "admin/selectItinerary";
    }

    @RequestMapping(value = "/assignItinerary", method = RequestMethod.POST)
    public void assignItinerary(HttpServletRequest request, HttpServletResponse response, RouteAssignmentCommand command) throws Exception {
        List<LegDTO> legDTOs = new ArrayList<LegDTO>(command.getLegs().size());
        for (RouteAssignmentCommand.LegCommand leg : command.getLegs()) {
            legDTOs.add(new LegDTO(
                            leg.getVoyageNumber(),
                            leg.getFromUnLocode(),
                            leg.getToUnLocode(),
                            leg.getFromDate(),
                            leg.getToDate())
            );
        }

        RouteCandidateDTO selectedRoute = new RouteCandidateDTO(legDTOs);

        bookingServiceFacade.assignCargoToRoute(command.getTrackingId(), selectedRoute);

        response.sendRedirect("show?trackingId=" + command.getTrackingId());
    }

    @RequestMapping(value = "/pickNewDestination")
    public String pickNewDestination(HttpServletRequest request, HttpServletResponse response, Map<String, Object> model) throws Exception {
        List<LocationDTO> locations = bookingServiceFacade.listShippingLocations();
        model.put("locations", locations);

        String trackingId = request.getParameter("trackingId");
        CargoRoutingDTO cargo = bookingServiceFacade.loadCargoForRouting(trackingId);
        model.put("cargo", cargo);

        return "admin/pickNewDestination";
    }

    @RequestMapping(value = "/changeDestination", method = RequestMethod.POST)
    public void changeDestination(HttpServletRequest request, HttpServletResponse response) throws Exception {<FILL_FUNCTION_BODY>}
}

        String trackingId = request.getParameter("trackingId");
        String unLocode = request.getParameter("unlocode");
        bookingServiceFacade.changeDestination(trackingId, unLocode);
        response.sendRedirect("show?trackingId=" + trackingId);
    
<no_super_class>