use of com.opentext.ia.sdk.dto.JobInstanceFilter in project infoarchive-sip-sdk by Enterprise-Content-Management.
the class InfoArchiveRestClient method search.
@Override
public JobInstance search(String jobName, String applicationName, String tenantName) throws IOException {
Services services = restClient.get(resourceCache.getServicesUri(), Services.class);
JobDefinitions jobDefinitions = restClient.followNonPaged(services, InfoArchiveLinkRelations.LINK_JOB_DEFINITIONS, JobDefinitions.class);
JobDefinition jobDefinition = jobDefinitions.byName(jobName);
String runLink = jobDefinition.getUri(InfoArchiveLinkRelations.LINK_JOB_INSTANCES);
JobInstanceFilter jobSettings = new JobInstanceFilter();
jobSettings.setNow(true);
if (applicationName != null) {
jobSettings.setApplication(applicationName);
}
if (tenantName != null) {
jobSettings.setTenant(applicationName);
}
return restClient.post(runLink, JobInstance.class, jobSettings);
}
Aggregations