package com.salpa.subject.domain.generator;

import com.salpa.subject.domain.data.DatabaseDocumentResponse;
import lombok.Builder;
import lombok.Getter;
import lombok.NonNull;
import org.springframework.stereotype.Component;

import java.io.OutputStream;

@Component
public interface DocumentFileGenerator {

    boolean support(DocumentFileType type);

    void generate(DocumentFileGenerateContext context, OutputStream outputStream);

    @Getter
    @Builder
    class DocumentFileGenerateContext {

        @NonNull
        private DocumentFileType documentFileType;

        @NonNull
        private DatabaseDocumentResponse databaseDocument;

    }
}
