service/transportation-service/src/main/java/org/bananaforscale/transportation/rest/resource/AirplaneResource.java
@PUT
    @Path("{id}")
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    public Response update(@PathParam("id") Integer id, SimpleAirplaneBinding airplane) {
        Boolean success = apm.update(id, airplane);
        if (success) {
            return Response.ok(JsonUtil.createSuccessMessage("The airplane was successfully updated")).build();
        } else {
            return Response.ok(JsonUtil.createErrorMessage("An error occurred while updating the airplane"))
                    .status(Response.Status.INTERNAL_SERVER_ERROR).build();
        }
    }
/**
     * Update the airplane by it's identifier. If the airplane doesn't exist by
     * the given identifier an error will be thrown.
     *
     * @param id id of the airplane to update.
     * @param airplane the updated airplane.
     * @return response object containing status and data
     */
Update the airplane by it's identifier. If the airplane doesn't exist by
the given identifier an error will be thrown.

@param id id of the airplane to update.
@param airplane the updated airplane.
@return response object containing status and data
Update the airplane by it ' s identifier . If the airplane doesn ' t exist by the given identifier an error will be thrown . @param id id of the airplane to update . @param airplane the updated airplane . @return response object containing status and data
@PUT
    @Path("{id}")
    @Consumes(MediaType.APPLICATION_JSON)
    @Produces(MediaType.APPLICATION_JSON)
    public Response update(@PathParam("id") Integer id, SimpleAirplaneBinding airplane) {
        Boolean success = apm.update(id, airplane);
        if (success) {
            return Response.ok(JsonUtil.createSuccessMessage("The airplane was successfully updated")).build();
        } else {
            return Response.ok(JsonUtil.createErrorMessage("An error occurred while updating the airplane"))
                    .status(Response.Status.INTERNAL_SERVER_ERROR).build();
        }
    }
@ PUT @ Path ( "{id}" ) @ Consumes ( MediaType . APPLICATION_JSON ) @ Produces ( MediaType . APPLICATION_JSON ) public Response update ( @ PathParam ( "id" ) Integer id , SimpleAirplaneBinding airplane ) { Boolean success = apm . update ( id , airplane ) ; if ( success ) { return Response . ok ( JsonUtil . createSuccessMessage ( "The airplane was successfully updated" ) ) . build ( ) ; } else { return Response . ok ( JsonUtil . createErrorMessage ( "An error occurred while updating the airplane" ) ) . status ( Response . Status . INTERNAL_SERVER_ERROR ) . build ( ) ; } }
Update the airplane by it's identifier.
Update the airplane by it ' s identifier .