Package fr.gouv.vitam.functional.administration.core.format

# Class ReferentialFormatFileImpl

java.lang.Object
fr.gouv.vitam.functional.administration.core.format.ReferentialFormatFileImpl

All Implemented Interfaces:
  `VitamAutoCloseable`, `ReferentialFile<FileFormat>`, `AutoCloseable`

public class ReferentialFormatFileImpl extends Object implements ReferentialFile<FileFormat>, VitamAutoCloseable
ReferentialFormatFileImpl implementing the ReferentialFormatFile interface

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `FILE_FORMAT_REPORT`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ReferentialFormatFileImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `List<FileFormatModel>`
  `checkFile(InputStream xmlPronom)`
  check PRONOM File and return all format as arraynode
  `void`
  `close()`
  `FileFormat`
  `findDocumentById(String id)`
  find document based on a given Id
  `RequestResponseOK<FileFormat>`
  `findDocuments(com.fasterxml.jackson.databind.JsonNode select)`
  find document based on DSL query
  `void`
  `importFile(InputStream xmlPronom, String filename)`
  importFile : import reference file to database

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Field Details

  - ### FILE_FORMAT_REPORT

    public static final String FILE_FORMAT_REPORT
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### ReferentialFormatFileImpl

    public ReferentialFormatFileImpl(MongoDbAccessAdminImpl dbConfiguration, VitamCounterService vitamCounterService)
    Constructor
    Parameters:
      `dbConfiguration` - the mongo access for reference format configuration
      `vitamCounterService` -

- ## Method Details

  - ### importFile

    public void importFile(InputStream xmlPronom, String filename) throws VitamException
    Description copied from interface: `ReferentialFile`
    importFile : import reference file to database
    Specified by:
      `importFile` in interface `ReferentialFile<FileFormat>`
    Parameters:
      `xmlPronom` - as InputStream
      `filename` - file name
    Throws:
      `VitamException`

  - ### checkFile

    public List<FileFormatModel> checkFile(InputStream xmlPronom) throws ReferentialException
    check PRONOM File and return all format as arraynode
    Parameters:
      `xmlPronom` - format file stream
    Returns:
      arraynode of format
    Throws:
      `ReferentialException`

  - ### findDocumentById

    public FileFormat findDocumentById(String id)
    Description copied from interface: `ReferentialFile`
    find document based on a given Id
    Specified by:
      `findDocumentById` in interface `ReferentialFile<FileFormat>`
    Parameters:
      `id` - of vitam document
    Returns:
      vitam document

  - ### findDocuments

    public RequestResponseOK<FileFormat> findDocuments(com.fasterxml.jackson.databind.JsonNode select) throws ReferentialException
    Description copied from interface: `ReferentialFile`
    find document based on DSL query
    Specified by:
      `findDocuments` in interface `ReferentialFile<FileFormat>`
    Parameters:
      `select` - filter
    Returns:
      vitam document list
    Throws:
      `ReferentialException` - when error occurs

  - ### close

    public void close()
    Specified by:
      `close` in interface `AutoCloseable`
    Specified by:
      `close` in interface `VitamAutoCloseable`