Search in sources :

Example 6 with TestItemBuilder

use of com.epam.ta.reportportal.ws.converter.builders.TestItemBuilder in project service-api by reportportal.

the class RerunHandlerImpl method updateRootItem.

private ItemCreatedRS updateRootItem(StartTestItemRQ request, TestItem foundItem) {
    foundItem = new TestItemBuilder(foundItem).addDescription(request.getDescription()).overwriteAttributes(request.getAttributes()).addStatus(StatusEnum.IN_PROGRESS).get();
    ofNullable(request.getUuid()).ifPresent(foundItem::setUuid);
    return new ItemCreatedRS(foundItem.getUuid(), foundItem.getUniqueId());
}
Also used : TestItemBuilder(com.epam.ta.reportportal.ws.converter.builders.TestItemBuilder) ItemCreatedRS(com.epam.ta.reportportal.ws.model.item.ItemCreatedRS)

Aggregations

TestItemBuilder (com.epam.ta.reportportal.ws.converter.builders.TestItemBuilder)6 TestItem (com.epam.ta.reportportal.entity.item.TestItem)5 ReportPortalException (com.epam.ta.reportportal.exception.ReportPortalException)5 Launch (com.epam.ta.reportportal.entity.launch.Launch)3 Preconditions (com.epam.ta.reportportal.commons.Preconditions)2 Predicates.equalTo (com.epam.ta.reportportal.commons.Predicates.equalTo)2 ReportPortalUser (com.epam.ta.reportportal.commons.ReportPortalUser)2 BusinessRule.expect (com.epam.ta.reportportal.commons.validation.BusinessRule.expect)2 TestItemStatusChangedEvent (com.epam.ta.reportportal.core.events.activity.TestItemStatusChangedEvent)2 RetryHandler (com.epam.ta.reportportal.core.item.impl.retry.RetryHandler)2 RetrySearcher (com.epam.ta.reportportal.core.item.impl.retry.RetrySearcher)2 StatusChangingStrategy (com.epam.ta.reportportal.core.item.impl.status.StatusChangingStrategy)2 LaunchRepository (com.epam.ta.reportportal.dao.LaunchRepository)2 TestItemRepository (com.epam.ta.reportportal.dao.TestItemRepository)2 StatusEnum (com.epam.ta.reportportal.entity.enums.StatusEnum)2 UserRole (com.epam.ta.reportportal.entity.user.UserRole)2 TestItemActivityResource (com.epam.ta.reportportal.ws.model.activity.TestItemActivityResource)2 ItemCreatedRS (com.epam.ta.reportportal.ws.model.item.ItemCreatedRS)2 TO_LOCAL_DATE_TIME (com.epam.ta.reportportal.commons.EntityUtils.TO_LOCAL_DATE_TIME)1 Filter (com.epam.ta.reportportal.commons.querygen.Filter)1