pbs-middleware-server/src/main/java/com/pbs/middleware/server/features/filetransfer/upload/factory/UploadFactory.java
/**
     * Loads a upload for given id and applies all stored events on it.
     */
Loads a upload for given id and applies all stored events on it.
Loads a upload for given id and applies all stored events on it .
public Optional<Upload> find(UUID id) {
        List<UploadEvent> events = repository.findAllByDomainId(id);
        if (events.isEmpty()) {
            return empty();
        }
        Upload upload = new Upload(id, publisher);
        events.forEach(upload::apply);
        return of(upload);
    }
public Optional < Upload > find ( UUID id ) { List < UploadEvent > events = repository . findAllByDomainId ( id ) ; if ( events . isEmpty ( ) ) { return empty ( ) ; } Upload upload = new Upload ( id , publisher ) ; events . forEach ( upload :: apply ) ; return of ( upload ) ; }
Loads a upload for given id and applies all stored events on it.
Loads a upload for given id and applies all stored events on it .