summaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/main/java/org/onap/vid/job/JobAdapter.java
blob: 1701092b397db5b37f624f84e95029043ea71ada (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package org.onap.vid.job;

import org.onap.vid.model.JobBulk;
import org.onap.vid.model.JobModel;

import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
 * kind of factory for creating jobs and converting them to Job Model
 */
public interface JobAdapter {
    JobModel toModel(Job job);

    JobBulk toModelBulk(List<Job> jobList);

    List<Job> createBulkOfJobs(Map<String, Object> bulkRequest);

    Job createJob(JobType jobType, AsyncJobRequest request, UUID templateId, String userId, Integer indexInBulk);

    // Marks types that are an AsyncJob payload
    public interface AsyncJobRequest {
    }

}