Package com.captechconsulting.core.domain

Examples of com.captechconsulting.core.domain.Ticket


    }

    @RequestMapping(method = RequestMethod.POST)
    @ResponseStatus(HttpStatus.CREATED)
    public TicketVO create(@Valid @RequestBody TicketVO ticket) {
        Ticket mappedTicket = mappingService.map(ticket, Ticket.class);
        Ticket persisted = ticketService.store(mappedTicket);
        return mappingService.map(persisted, TicketVO.class);
    }
View Full Code Here


        return mappingService.map(persisted, TicketVO.class);
    }

    @RequestMapping(value = "/{ticketId}", method = RequestMethod.PATCH)
    public TicketVO update(@PathVariable long ticketId, @Valid @RequestBody TicketVO ticket) {
        Ticket previouslyPersisted = ticketService.get(ticketId);
        mappingService.map(ticket, previouslyPersisted);
        Ticket persisted = ticketService.store(previouslyPersisted);
        return mappingService.map(persisted, TicketVO.class);
    }
View Full Code Here

        return mappingService.map(persisted, TicketVO.class);
    }

    @RequestMapping(value = "/{ticketId}", method = RequestMethod.PUT)
    public TicketVO replace(@PathVariable long ticketId, @Valid @RequestBody TicketVO ticket) {
        Ticket previouslyPersisted = ticketService.get(ticketId);
        Ticket newTicket = mappingService.map(ticket, Ticket.class);
        newTicket.setId(previouslyPersisted.getId());
        Ticket persisted = ticketService.store(newTicket);
        return mappingService.map(persisted, TicketVO.class);
    }
View Full Code Here

    }

    @RequestMapping(value = "/{ticketId}", method = RequestMethod.DELETE)
    @ResponseStatus(HttpStatus.NO_CONTENT)
    public void remove(@PathVariable long ticketId) {
        Ticket ticket = ticketService.get(ticketId);
        ticketService.delete(ticket);
    }
View Full Code Here

        return mappingService.map(location, LocationVO.class);
    }

    @RequestMapping(value = "/ticket/{ticketId}/locations", method = RequestMethod.GET)
    public List<LocationScanVO> getAllLocations(@PathVariable long ticketId) {
        Ticket ticket = ticketService.get(ticketId);
        List<LocationScan> locations = ticket.getLocationScans();
        return mappingService.map(locations, LocationScanVO.class);
    }
View Full Code Here

    }

    @RequestMapping(value = "/ticket/{ticketId}/scan/{locationId}", method = RequestMethod.POST)
    @ResponseStatus(HttpStatus.CREATED)
    public LocationVO addLocationScan(@PathVariable long ticketId, @PathVariable long locationId) {
        Ticket ticket = ticketService.get(ticketId);
        Location location = ticketService.addLocationScan(ticket, locationId);
        return mappingService.map(location, LocationVO.class);
    }
View Full Code Here

    }

    @RequestMapping(value = "/ticket/{ticketId}/scan/{locationId}", method = RequestMethod.DELETE)
    @ResponseStatus(HttpStatus.NO_CONTENT)
    public void removeLocationScan(@PathVariable long ticketId, @PathVariable long locationId) {
        Ticket ticket = ticketService.get(ticketId);
        ticketService.deleteLocationScan(ticket, locationId);
    }
View Full Code Here

TOP

Related Classes of com.captechconsulting.core.domain.Ticket

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.