package com.iqser.red.service.persistence.service.v1.api.internal.resources;

import java.util.List;

import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseStatus;

import com.iqser.red.service.persistence.service.v1.api.shared.model.redactionlog.RedactionLog;

@ResponseStatus(value = HttpStatus.OK)
public interface RedactionLogResource {

    String REDACTION_LOG_PATH = "/redactionLog";

    String FILE_ID = "fileId";
    String FILE_ID_PATH_VARIABLE = "/{" + FILE_ID + "}";

    String DOSSIER_ID_PARAM = "dossierId";
    String DOSSIER_ID_PATH_PARAM = "/{" + DOSSIER_ID_PARAM + "}";


    @GetMapping(value = InternalApi.BASE_PATH + REDACTION_LOG_PATH + DOSSIER_ID_PATH_PARAM + FILE_ID_PATH_VARIABLE, produces = MediaType.APPLICATION_JSON_VALUE)
    RedactionLog getRedactionLog(@PathVariable(DOSSIER_ID_PARAM) String dossierId,
                                 @PathVariable(FILE_ID) String fileId,
                                 @RequestParam(value = "excludedType", required = false) List<String> excludedTypes,
                                 @RequestParam(value = "withManualRedactions", required = false, defaultValue = "true") boolean withManualRedactions,
                                 @RequestParam(value = "includeFalsePositives", required = false, defaultValue = "false") boolean includeFalsePositives);

}
