@Test public void test_EdmObj_ValidUrl_DefaultOption() throws ExecutionException { final List<ProcessingJobTuple> jobs = ProcessingJobBuilder.edmObjectUrlJobs("http: falseOption); assertEquals(1, jobs.size()); assertEquals(1, jobs.get(0).getProcessingJob().getTasks().size()); validateTasks(jobs, DocumentReferenceTaskType.CONDITIONAL_DOWNLOAD, 1, 0, 2, ProcessingJobSubTaskType.META_EXTRACTION, ProcessingJobSubTaskType.COLOR_EXTRACTION, ProcessingJobSubTaskType.GENERATE_THUMBNAIL); }
public static final List<ProcessingJobTuple> edmObjectUrlJobs(final String url, final ReferenceOwner owner, final Integer priority, final ProcessingJobCreationOptions options) throws ExecutionException { if (null == options) { throw new IllegalArgumentException("options must not be null"); } final SourceDocumentReference sourceDocumentReference = new SourceDocumentReference(owner, url, null, null, null, null, true); final List<ProcessingJobSubTask> subTasks = getSubTasks(sourceDocumentReference.getUrl()); final ProcessingJob processingJob = new ProcessingJob(priority, new Date(), owner, Arrays.asList( new ProcessingJobTaskDocumentReference(documentReferenceTaskTypeFromOptions(options), sourceDocumentReference.getId(), subTasks) ), JobState.READY, URLSourceType.OBJECT, JobCreator.URL_RESOLVER.resolveIpOfUrlAndReturnLoopbackOnFail(url), true); final List<SourceDocumentReferenceProcessingProfile> sourceDocumentReferenceProcessingProfiles = Arrays.asList( SourceDocumentReferenceProcessingProfileBuilder.edmObjectUrl(sourceDocumentReference.getId(), owner, priority ) ); return Arrays.asList( new ProcessingJobTuple(processingJob, sourceDocumentReference,sourceDocumentReferenceProcessingProfiles)); }
ProcessingJobBuilder { public static final List<ProcessingJobTuple> edmObjectUrlJobs(final String url, final ReferenceOwner owner, final Integer priority, final ProcessingJobCreationOptions options) throws ExecutionException { if (null == options) { throw new IllegalArgumentException("options must not be null"); } final SourceDocumentReference sourceDocumentReference = new SourceDocumentReference(owner, url, null, null, null, null, true); final List<ProcessingJobSubTask> subTasks = getSubTasks(sourceDocumentReference.getUrl()); final ProcessingJob processingJob = new ProcessingJob(priority, new Date(), owner, Arrays.asList( new ProcessingJobTaskDocumentReference(documentReferenceTaskTypeFromOptions(options), sourceDocumentReference.getId(), subTasks) ), JobState.READY, URLSourceType.OBJECT, JobCreator.URL_RESOLVER.resolveIpOfUrlAndReturnLoopbackOnFail(url), true); final List<SourceDocumentReferenceProcessingProfile> sourceDocumentReferenceProcessingProfiles = Arrays.asList( SourceDocumentReferenceProcessingProfileBuilder.edmObjectUrl(sourceDocumentReference.getId(), owner, priority ) ); return Arrays.asList( new ProcessingJobTuple(processingJob, sourceDocumentReference,sourceDocumentReferenceProcessingProfiles)); } }
ProcessingJobBuilder { public static final List<ProcessingJobTuple> edmObjectUrlJobs(final String url, final ReferenceOwner owner, final Integer priority, final ProcessingJobCreationOptions options) throws ExecutionException { if (null == options) { throw new IllegalArgumentException("options must not be null"); } final SourceDocumentReference sourceDocumentReference = new SourceDocumentReference(owner, url, null, null, null, null, true); final List<ProcessingJobSubTask> subTasks = getSubTasks(sourceDocumentReference.getUrl()); final ProcessingJob processingJob = new ProcessingJob(priority, new Date(), owner, Arrays.asList( new ProcessingJobTaskDocumentReference(documentReferenceTaskTypeFromOptions(options), sourceDocumentReference.getId(), subTasks) ), JobState.READY, URLSourceType.OBJECT, JobCreator.URL_RESOLVER.resolveIpOfUrlAndReturnLoopbackOnFail(url), true); final List<SourceDocumentReferenceProcessingProfile> sourceDocumentReferenceProcessingProfiles = Arrays.asList( SourceDocumentReferenceProcessingProfileBuilder.edmObjectUrl(sourceDocumentReference.getId(), owner, priority ) ); return Arrays.asList( new ProcessingJobTuple(processingJob, sourceDocumentReference,sourceDocumentReferenceProcessingProfiles)); }  }
ProcessingJobBuilder { public static final List<ProcessingJobTuple> edmObjectUrlJobs(final String url, final ReferenceOwner owner, final Integer priority, final ProcessingJobCreationOptions options) throws ExecutionException { if (null == options) { throw new IllegalArgumentException("options must not be null"); } final SourceDocumentReference sourceDocumentReference = new SourceDocumentReference(owner, url, null, null, null, null, true); final List<ProcessingJobSubTask> subTasks = getSubTasks(sourceDocumentReference.getUrl()); final ProcessingJob processingJob = new ProcessingJob(priority, new Date(), owner, Arrays.asList( new ProcessingJobTaskDocumentReference(documentReferenceTaskTypeFromOptions(options), sourceDocumentReference.getId(), subTasks) ), JobState.READY, URLSourceType.OBJECT, JobCreator.URL_RESOLVER.resolveIpOfUrlAndReturnLoopbackOnFail(url), true); final List<SourceDocumentReferenceProcessingProfile> sourceDocumentReferenceProcessingProfiles = Arrays.asList( SourceDocumentReferenceProcessingProfileBuilder.edmObjectUrl(sourceDocumentReference.getId(), owner, priority ) ); return Arrays.asList( new ProcessingJobTuple(processingJob, sourceDocumentReference,sourceDocumentReferenceProcessingProfiles)); }  static final List<ProcessingJobTuple> edmObjectUrlJobs(final String url, final ReferenceOwner owner, final Integer priority,
                                                                  final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmHasViewUrlsJobs(final List<String> urls, final ReferenceOwner owner, final Integer priority,
                                                                    final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmIsShownByUrlJobs(final String url, final ReferenceOwner owner, final Integer priority,
                                                                     final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmIsShownAtUrlJobs(final String url, final ReferenceOwner owner, final Integer priority,
                                                                     final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmObjectUrlJobs(final String url, final ReferenceOwner owner, final Integer priority,
                                                                  final SourceDocumentReference sourceDocumentReference,
                                                                  final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmHasViewUrlsJobs(final List<String> urls,
                                                                    final ReferenceOwner owner,
                                                                    final Integer priority,
                                                                    final SourceDocumentReference sourceDocumentReference,
                                                                    final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmIsShownByUrlJobs(final String url,
                                                                     final ReferenceOwner owner,
                                                                     final Integer priority,
                                                                     final SourceDocumentReference sourceDocumentReference,
                                                                     final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmIsShownAtUrlJobs(final String url,
                                                                     final ReferenceOwner owner,
                                                                     final Integer priority,
                                                                     final SourceDocumentReference sourceDocumentReference,
                                                                     final ProcessingJobCreationOptions options); }
ProcessingJobBuilder { public static final List<ProcessingJobTuple> edmObjectUrlJobs(final String url, final ReferenceOwner owner, final Integer priority, final ProcessingJobCreationOptions options) throws ExecutionException { if (null == options) { throw new IllegalArgumentException("options must not be null"); } final SourceDocumentReference sourceDocumentReference = new SourceDocumentReference(owner, url, null, null, null, null, true); final List<ProcessingJobSubTask> subTasks = getSubTasks(sourceDocumentReference.getUrl()); final ProcessingJob processingJob = new ProcessingJob(priority, new Date(), owner, Arrays.asList( new ProcessingJobTaskDocumentReference(documentReferenceTaskTypeFromOptions(options), sourceDocumentReference.getId(), subTasks) ), JobState.READY, URLSourceType.OBJECT, JobCreator.URL_RESOLVER.resolveIpOfUrlAndReturnLoopbackOnFail(url), true); final List<SourceDocumentReferenceProcessingProfile> sourceDocumentReferenceProcessingProfiles = Arrays.asList( SourceDocumentReferenceProcessingProfileBuilder.edmObjectUrl(sourceDocumentReference.getId(), owner, priority ) ); return Arrays.asList( new ProcessingJobTuple(processingJob, sourceDocumentReference,sourceDocumentReferenceProcessingProfiles)); }  static final List<ProcessingJobTuple> edmObjectUrlJobs(final String url, final ReferenceOwner owner, final Integer priority,
                                                                  final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmHasViewUrlsJobs(final List<String> urls, final ReferenceOwner owner, final Integer priority,
                                                                    final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmIsShownByUrlJobs(final String url, final ReferenceOwner owner, final Integer priority,
                                                                     final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmIsShownAtUrlJobs(final String url, final ReferenceOwner owner, final Integer priority,
                                                                     final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmObjectUrlJobs(final String url, final ReferenceOwner owner, final Integer priority,
                                                                  final SourceDocumentReference sourceDocumentReference,
                                                                  final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmHasViewUrlsJobs(final List<String> urls,
                                                                    final ReferenceOwner owner,
                                                                    final Integer priority,
                                                                    final SourceDocumentReference sourceDocumentReference,
                                                                    final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmIsShownByUrlJobs(final String url,
                                                                     final ReferenceOwner owner,
                                                                     final Integer priority,
                                                                     final SourceDocumentReference sourceDocumentReference,
                                                                     final ProcessingJobCreationOptions options); static final List<ProcessingJobTuple> edmIsShownAtUrlJobs(final String url,
                                                                     final ReferenceOwner owner,
                                                                     final Integer priority,
                                                                     final SourceDocumentReference sourceDocumentReference,
                                                                     final ProcessingJobCreationOptions options);  }