agave-common/common-api/src/main/java/org/iplantc/service/common/quartz/util/QuartzUtility.java
/**
     * provides all scheduled jobs/triggers and scheduler data.
     *
     * @return all scheduled jobs/triggers and scheduler data represented as JSON.
     */
provides all scheduled jobs/triggers and scheduler data.
@return all scheduled jobs/triggers and scheduler data represented as JSON.
provides all scheduled jobs / triggers and scheduler data . @return all scheduled jobs / triggers and scheduler data represented as JSON .
public String schedulerDetails() {
        if (isAuthorized()) {
            try {
            	ObjectMapper mapper = new ObjectMapper();
                ObjectNode json = mapper.createObjectNode();
                json.set("jobs", mapper.valueToTree(listJobs()));
                json.set("details", mapper.createObjectNode()
                        .put("version", scheduler().getMetaData().getVersion())
                        .put("jobsExecuted", scheduler().getMetaData().getNumberOfJobsExecuted())
                        .put("runningSince", scheduler().getMetaData().getRunningSince().toString())
                        .put("summary", scheduler().getMetaData().getSummary().replaceAll("\n", "<br/>")));
                json.set("pausedJobs", mapper.valueToTree(pausedJobs));
                json.set("pausedTriggers", mapper.valueToTree(scheduler().getPausedTriggerGroups()));
            } catch (Throwable e) {
                log.error("failed to get quartz details : " + e.getMessage(),e);
                return toJSON(
                        new QuartzConfigResetResponse("render detaisl failed " + e,
                                QuartzConfigResetResponse.Type.ERROR)
                );
            }
        }
        throw new AuthorizationException();
    }
public String schedulerDetails ( ) { if ( isAuthorized ( ) ) { try { ObjectMapper mapper = new ObjectMapper ( ) ; ObjectNode json = mapper . createObjectNode ( ) ; json . set ( "jobs" , mapper . valueToTree ( listJobs ( ) ) ) ; json . set ( "details" , mapper . createObjectNode ( ) . put ( "version" , scheduler ( ) . getMetaData ( ) . getVersion ( ) ) . put ( "jobsExecuted" , scheduler ( ) . getMetaData ( ) . getNumberOfJobsExecuted ( ) ) . put ( "runningSince" , scheduler ( ) . getMetaData ( ) . getRunningSince ( ) . toString ( ) ) . put ( "summary" , scheduler ( ) . getMetaData ( ) . getSummary ( ) . replaceAll ( "\n" , "<br/>" ) ) ) ; json . set ( "pausedJobs" , mapper . valueToTree ( pausedJobs ) ) ; json . set ( "pausedTriggers" , mapper . valueToTree ( scheduler ( ) . getPausedTriggerGroups ( ) ) ) ; } catch ( Throwable e ) { log . error ( "failed to get quartz details : " + e . getMessage ( ) , e ) ; return toJSON ( new QuartzConfigResetResponse ( "render detaisl failed " + e , QuartzConfigResetResponse . Type . ERROR ) ) ; } } throw new AuthorizationException ( ) ; }
provides all scheduled jobs/triggers and scheduler data.
provides all scheduled jobs / triggers and scheduler data .