public EntityType getJobExecutionType() { return getEntity(JOB_EXECUTION_TYPE, EntityType.class); }
public String getName() { return getString(NAME); }
public void setJobExecutionType(EntityType jobExecutionType) { set(JOB_EXECUTION_TYPE, jobExecutionType); }
@Bean @Lazy public ScheduledJobType bucketIngest() { ScheduledJobType result = scheduledJobTypeFactory.create("BucketIngest"); result.setLabel("Bucket ingest"); result.setDescription("This job downloads a file from a URL and imports it into MOLGENIS."); result.setSchema( "{'title': 'Bucket Ingest Job','type': 'object','properties': { 'bucket': {'type': 'string', 'description': 'The name of the bucket.'}," + "'key': {'type': 'string', 'description': 'Expression to match the file key'}, 'accessKey': { 'type': 'string', " + "'description': 'the access key to be used to login to the amazon bucket'},'secretKey': {'type': 'string', " + "'description': 'the secretkey to be used to login to the amazon bucket'},'expression': {'type': 'boolean', " + "'description': 'Is the key an expression or an exact match'},'extension': {'type': 'string', " + "'description': 'Optional extension of the file, is not part of the key in the bucket'},'region': {'type': 'string', " + "'description': 'The region where the amazon bucket is located'},'targetEntityId': {'type': 'string', " + "'description': 'Target EntityType ID'}}," + "'required': ['bucket','key','accessKey','secretKey','expression','region']}"); result.setJobExecutionType(amazonBucketJobExecutionMetaData); return result; } }
private void validateJobParameters(ScheduledJob scheduledJob) { jsonValidator.validate(scheduledJob.getParameters(), scheduledJob.getType().getSchema()); }
private JobExecution createJobExecution(ScheduledJob scheduledJob) { JobExecution jobExecution = (JobExecution) entityManager.create(scheduledJob.getType().getJobExecutionType(), POPULATE); writePropertyValues(jobExecution, getPropertyValues(scheduledJob.getParameters())); jobExecution.setFailureEmail(scheduledJob.getFailureEmail()); jobExecution.setSuccessEmail(scheduledJob.getSuccessEmail()); jobExecution.setUser(scheduledJob.getUser()); jobExecution.setScheduledJobId(scheduledJob.getId()); return jobExecution; }
public ScheduledJobType fileIngestJobType() { ScheduledJobType result = scheduledJobTypeFactory.create("fileIngest"); result.setLabel("File ingest"); result.setDescription("This job downloads a file from a URL and imports it into MOLGENIS."); result.setSchema( gson.toJson( of( "required", ImmutableList.of("url", "loader", "targetEntityId")))); result.setJobExecutionType(fileIngestJobExecutionMetaData); return result;
ScheduledJobType result = scheduledJobTypeFactory.create(MappingJobExecutionMetadata.MAPPING_JOB_TYPE); result.setLabel("Mapping"); result.setDescription("This job runs a Mapping Project."); result.setSchema( gson.toJson( of( ImmutableList.of("mappingProjectId", "targetEntityTypeId")))); result.setJobExecutionType(mappingJobExecutionMetadata); return result;
public void setLabel(String label) { set(LABEL, label); }
@Nullable String getDescription() { return getString(DESCRIPTION); }
public void setDescription(String description) { set(DESCRIPTION, description); }
@Nullable public String getSchema() { return getString(SCHEMA); }
public void setSchema(String schema) { set(SCHEMA, schema); } }
@Nullable String getLabel() { return getString(LABEL); }
public void setName(String name) { set(NAME, name); }