robe-admin/src/main/java/io/robe/admin/resources/TriggerResource.java
@RobeService(group = "QuartzJob", description = "Update a HTriggerInfo resource with the matches given id.")
    @PUT
    @UnitOfWork
    @Path("{id}")
    public HTriggerInfo update(@RobeAuth Credentials credentials, @PathParam("id") String id, @Valid HTriggerInfo model) {
        HJobInfo job = jobDao.findById(model.getJobOid());
        if (job == null) {
            throw new WebApplicationException("Job not found", Response.Status.NOT_FOUND);
        }
        if (!job.getProvider().equals(HibernateJobInfoProvider.class)) {
            throw new WebApplicationException("Trigger is not provided by an editable source.", Response.Status.PRECONDITION_FAILED);
        }
        if (!id.equals(model.getOid())) {
            throw new WebApplicationException("URL trigger id is not same with the payload id", Response.Status.FORBIDDEN);
        }
        HTriggerInfo entity = triggerDao.findById(id);
        if (entity == null) {
            throw new WebApplicationException("Trigger not found", Response.Status.NOT_FOUND);
        }
        triggerDao.detach(entity);
        model =  triggerDao.update(model);
        return new TriggerInfoDTO(model);
    }
@RobeService(group = "QuartzJob", description = "Update a HTriggerInfo resource with the matches given id.")
    @PUT
    @UnitOfWork
    @Path("{id}")
    public HTriggerInfo update(@RobeAuth Credentials credentials, @PathParam("id") String id, @Valid HTriggerInfo model) {
        HJobInfo job = jobDao.findById(model.getJobOid());
        if (job == null) {
            throw new WebApplicationException("Job not found", Response.Status.NOT_FOUND);
        }
        if (!job.getProvider().equals(HibernateJobInfoProvider.class)) {
            throw new WebApplicationException("Trigger is not provided by an editable source.", Response.Status.PRECONDITION_FAILED);
        }
        if (!id.equals(model.getOid())) {
            throw new WebApplicationException("URL trigger id is not same with the payload id", Response.Status.FORBIDDEN);
        }
        HTriggerInfo entity = triggerDao.findById(id);
        if (entity == null) {
            throw new WebApplicationException("Trigger not found", Response.Status.NOT_FOUND);
        }
        triggerDao.detach(entity);
        model =  triggerDao.update(model);
        return new TriggerInfoDTO(model);
    }
Update a HTriggerInfo resource  with the matches given id.
<p>
Status Code:
Not Found  404
Not Matches 412

@param credentials auto fill by @{@link RobeAuth} annotation for authentication.
@param id          This is  the oid of {@link HTriggerInfo}
@param model       This is the one model of {@link HTriggerInfo}
@return Update a  {@link HTriggerInfo} resource with the matches given id.