/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public Integer getIntegerFromString(String key) { Object obj = get(key); return new Integer((String) obj); }
/** * <p> * Retrieve the identified <code>float</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public float getFloatValueFromString(String key) { Object obj = get(key); return new Float((String) obj); }
/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public Integer getIntegerFromString(String key) { Object obj = get(key); return new Integer((String) obj); }
/** * <p> * Retrieve the identified <code>Boolean</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public Boolean getBooleanFromString(String key) { Object obj = get(key); return Boolean.valueOf((String) obj); }
/** * <p> * Retrieve the identified <code>double</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public double getDoubleValueFromString(String key) { Object obj = get(key); return Double.valueOf((String) obj); }
/** * <p> * Retrieve the identified <code>Float</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public Float getFloatFromString(String key) { Object obj = get(key); return new Float((String) obj); }
/** * <p> * Retrieve the identified <code>long</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public long getLongValueFromString(String key) { Object obj = get(key); return new Long((String) obj); }
/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public int getIntFromString(String key) { Object obj = get(key); return new Integer((String) obj); }
/** * <p> * Retrieve the identified <code>char</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public char getCharFromString(String key) { Object obj = get(key); return ((String) obj).charAt(0); }
/** * <p> * Retrieve the identified <code>double</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public double getDoubleValueFromString(String key) { Object obj = get(key); return Double.valueOf((String) obj); }
/** * <p> * Retrieve the identified <code>long</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public long getLongValueFromString(String key) { Object obj = get(key); return new Long((String) obj); }
/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public int getIntFromString(String key) { Object obj = get(key); return new Integer((String) obj); }
/** * <p> * Retrieve the identified <code>boolean</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public boolean getBooleanValueFromString(String key) { Object obj = get(key); return Boolean.valueOf((String) obj); }
/** * <p> * Retrieve the identified <code>float</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public float getFloatValueFromString(String key) { Object obj = get(key); return new Float((String) obj); }
/** * <p> * Retrieve the identified <code>boolean</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public boolean getBooleanValueFromString(String key) { Object obj = get(key); return Boolean.valueOf((String) obj); }
/** * <p> * Retrieve the identified <code>Character</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public Character getCharacterFromString(String key) { Object obj = get(key); return ((String) obj).charAt(0); }
/** * <p> * Retrieve the identified <code>Float</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public Float getFloatFromString(String key) { Object obj = get(key); return new Float((String) obj); }
/** * <p> * Retrieve the identified <code>Character</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String. */ public Character getCharacterFromString(String key) { Object obj = get(key); return ((String) obj).charAt(0); }
@Override public void execute(JobExecutionContext context) { JobDataMap jobDataMap = context.getJobDetail().getJobDataMap(); LOG.info("Performing timer based backup"); BackupScheduler backupScheduler = (BackupScheduler) jobDataMap.get(BACKUP_SCHEDULER_KEY); backupScheduler.performBackup(); } }
public void execute(JobExecutionContext context) { JobDataMap jobDataMap = context.getJobDetail().getJobDataMap(); BuildCauseProducerService buildCauseProducerService = (BuildCauseProducerService) jobDataMap.get(BUILD_CAUSE_PRODUCER_SERVICE); MaintenanceModeService maintenanceModeService = (MaintenanceModeService) jobDataMap.get(MAINTENANCE_MODE_SERVICE); PipelineConfig pipelineConfig = (PipelineConfig) jobDataMap.get(PIPELINE_CONFIG); if (maintenanceModeService.isMaintenanceMode()) { LOG.debug("[Maintenance Mode] GoCD server is in 'maintenance' mode, skipping scheduling of timer triggered pipeline: '{}'.", pipelineConfig.getName()); return; } buildCauseProducerService.timerSchedulePipeline(pipelineConfig, new ServerHealthStateOperationResult()); } }