Package com.denimgroup.threadfix.data.entities

Examples of com.denimgroup.threadfix.data.entities.ScheduledDefectTrackerUpdate


        log.info("Start deleting scheduled defect tracker update");
        if (!PermissionUtils.isAuthorized(Permission.CAN_MANAGE_DEFECT_TRACKERS, null, null)){
            return RestResponse.failure("You are not authorized to delete this scheduled defect tracker update.");
        }
        ScheduledDefectTrackerUpdate scheduledDefectTrackerUpdate = scheduledDefectTrackerUpdateService.loadById(scheduledDefectTrackerUpdateId);
        if (scheduledDefectTrackerUpdate == null) {
            return RestResponse.failure("That scheduled defect tracker update was not found.");
        }

        //Remove job from scheduler
        if (scheduledDefectTrackerUpdater.removeScheduledDefectTrackerUpdate(scheduledDefectTrackerUpdate)) {
            String ret = scheduledDefectTrackerUpdateService.delete(scheduledDefectTrackerUpdate);
            if (ret != null) {
                log.warn(ret);
                return RestResponse.failure(ret);
            } else {
                log.info("Successfully deleted scheduled defect tracker update from scheduler");
                return RestResponse.success(scheduledDefectTrackerUpdate.getFrequency() + " Scheduled Defect Tracker Update successfully deleted.");
            }
        } else {
            String message = "Failed to delete " + scheduledDefectTrackerUpdate.getFrequency() + " Defect Tracker Update from scheduler";
            log.warn(message);
            return RestResponse.failure(message);
        }
    }
View Full Code Here

TOP

Related Classes of com.denimgroup.threadfix.data.entities.ScheduledDefectTrackerUpdate

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.