/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String or Integer. */ public int getIntValue(String key) { Object obj = get(key); if(obj instanceof String) { return getIntFromString(key); } else { return getInt(key); } }
/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String or Integer. */ public int getIntValue(String key) { Object obj = get(key); if(obj instanceof String) { return getIntFromString(key); } else { return getInt(key); } }
private int getResourceId(JobDetail jobDetail) { JobDataMap jobDataMap = jobDetail.getJobDataMap(); return jobDataMap.getIntFromString(DATAMAP_INT_RESOURCE_ID); }
/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String or Integer. */ public int getIntValue(String key) { Object obj = get(key); if(obj instanceof String) { return getIntFromString(key); } else { return getInt(key); } }
/** * <p> * Retrieve the identified <code>int</code> value from the <code>JobDataMap</code>. * </p> * * @throws ClassCastException * if the identified object is not a String or Integer. */ public int getIntValue(String key) { Object obj = get(key); if(obj instanceof String) { return getIntFromString(key); } else { return getInt(key); } }
public void execute(JobExecutionContext jobContext) throws JobExecutionException { JobDetail jobDetail = jobContext.getJobDetail(); JobDataMap jobDataMap = jobDetail.getJobDataMap(); Integer configurationGroupUpdateId = jobDataMap.getIntFromString(DATAMAP_INT_CONFIG_GROUP_UPDATE_ID); Integer subjectId = jobDataMap.getIntFromString(DATAMAP_INT_SUBJECT_ID); Subject subject = LookupUtil.getSubjectManager().getSubjectById(subjectId); processGroupConfigurationUpdate(configurationGroupUpdateId, subject); }
String operationName = jobDataMap.getString(OperationJob.DATAMAP_STRING_OPERATION_NAME); String displayName = jobDataMap.getString(OperationJob.DATAMAP_STRING_OPERATION_DISPLAY_NAME); int subjectId = jobDataMap.getIntFromString(OperationJob.DATAMAP_INT_SUBJECT_ID); Configuration parameters = null; int configId = jobDataMap.getIntFromString(OperationJob.DATAMAP_INT_PARAMETERS_ID); parameters = entityManager.find(Configuration.class, configId); int groupId = jobDataMap.getIntFromString(GroupOperationJob.DATAMAP_INT_GROUP_ID); ResourceGroup group = getCompatibleGroupIfAuthorized(subject, groupId);
String operationName = jobDataMap.getString(OperationJob.DATAMAP_STRING_OPERATION_NAME); String displayName = jobDataMap.getString(OperationJob.DATAMAP_STRING_OPERATION_DISPLAY_NAME); int subjectId = jobDataMap.getIntFromString(OperationJob.DATAMAP_INT_SUBJECT_ID); Configuration parameters = null; int configId = jobDataMap.getIntFromString(OperationJob.DATAMAP_INT_PARAMETERS_ID); parameters = entityManager.find(Configuration.class, configId); int resourceId = jobDataMap.getIntFromString(ResourceOperationJob.DATAMAP_INT_RESOURCE_ID); Resource resource = getResourceIfAuthorized(whoami, resourceId);