Search in sources :

Example 1 with GetLaunchResourceCollectionEvent

use of com.epam.reportportal.extension.event.GetLaunchResourceCollectionEvent in project service-api by reportportal.

the class GetLaunchHandlerImpl method getLaunchResources.

private Iterable<LaunchResource> getLaunchResources(Page<Launch> launches) {
    final com.epam.ta.reportportal.ws.model.Page<LaunchResource> launchResourcePage = PagedResourcesAssembler.pageConverter(launchConverter.TO_RESOURCE).apply(launches);
    applicationEventPublisher.publishEvent(new GetLaunchResourceCollectionEvent(launchResourcePage.getContent()));
    return launchResourcePage;
}
Also used : GetLaunchResourceCollectionEvent(com.epam.reportportal.extension.event.GetLaunchResourceCollectionEvent) LaunchResource(com.epam.ta.reportportal.ws.model.launch.LaunchResource)

Example 2 with GetLaunchResourceCollectionEvent

use of com.epam.reportportal.extension.event.GetLaunchResourceCollectionEvent in project service-api by reportportal.

the class GetLaunchHandlerImpl method getLaunchResource.

private LaunchResource getLaunchResource(Launch launch) {
    final LaunchResource launchResource = launchConverter.TO_RESOURCE.apply(launch);
    applicationEventPublisher.publishEvent(new GetLaunchResourceCollectionEvent(Collections.singletonList(launchResource)));
    return launchResource;
}
Also used : GetLaunchResourceCollectionEvent(com.epam.reportportal.extension.event.GetLaunchResourceCollectionEvent) LaunchResource(com.epam.ta.reportportal.ws.model.launch.LaunchResource)

Aggregations

GetLaunchResourceCollectionEvent (com.epam.reportportal.extension.event.GetLaunchResourceCollectionEvent)2 LaunchResource (com.epam.ta.reportportal.ws.model.launch.LaunchResource)2