robe-admin/src/main/java/io/robe/admin/resources/TriggerResource.java
@RobeService(group = "QuartzJob", description = "Create a HTriggerInfo resource.")
    @POST
    @UnitOfWork
    public HTriggerInfo create(@RobeAuth Credentials credentials, @Valid HTriggerInfo model) {
        //Save to the DB
        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);
        }
        HTriggerInfo record = triggerDao.create(model);
        return new TriggerInfoDTO(record);
    }
@RobeService(group = "QuartzJob", description = "Create a HTriggerInfo resource.")
    @POST
    @UnitOfWork
    public HTriggerInfo create(@RobeAuth Credentials credentials, @Valid HTriggerInfo model) {
        //Save to the DB
        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);
        }
        HTriggerInfo record = triggerDao.create(model);
        return new TriggerInfoDTO(record);
    }
@ RobeService ( group = "QuartzJob" , description = "Create a HTriggerInfo resource." ) @ POST @ UnitOfWork public HTriggerInfo create ( @ RobeAuth Credentials credentials , @ Valid HTriggerInfo model ) { //Save to the DB 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 ) ; } HTriggerInfo record = triggerDao . create ( model ) ; return new TriggerInfoDTO ( record ) ; }
Create a {@link HTriggerInfo} resource.

@param credentials auto fill by @{@link RobeAuth} annotation for authentication.
@param model       This is the one model of {@link HTriggerInfo}
@return create a {@link HTriggerInfo} resource.
Create a { @link HTriggerInfo } resource .