package com.workfusion.odf.impl.connector;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

import com.workfusion.odf.api.connector.TransactionSupplier;
import com.workfusion.odf.api.domain.Document;
import com.workfusion.odf.api.domain.Transaction;

public class TransactionSupplierExample implements TransactionSupplier {
    @Override
    public Collection<Transaction> get() {
        Document doc1 = new Document();
        doc1.setId("1");
        doc1.setOriginalDocumentLink("link1");

        Document doc2 = new Document();
        doc2.setId("2");
        doc2.setOriginalDocumentLink("link2");

        Transaction transaction = new Transaction();
        transaction.setId("tr1");
        List<Document> docs = new ArrayList<>();
        docs.add(doc1);
        docs.add(doc2);
        transaction.setDocs(docs);

        Document doc3 = new Document();
        doc3.setId("3");
        doc3.setOriginalDocumentLink("link1");

        Transaction transaction1 = new Transaction();
        transaction1.setId("tr2");
        docs = new ArrayList<>();
        docs.add(doc3);
        transaction1.setDocs(docs);

        List<Transaction> transactions = new ArrayList<>();
        transactions.add(transaction);
        transactions.add(transaction1);

        return transactions;
    }
}
