Package fr.gouv.vitam.collect.internal.core.service

# Class CollectService

java.lang.Object
fr.gouv.vitam.collect.internal.core.service.CollectService

public class CollectService extends Object

- ## Field Summary

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

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CollectService(MetadataRepository metadataRepository, WorkspaceClientFactory workspaceCollectClientFactory, WorkspaceClientFactory workspaceClientFactory, FormatIdentifierFactory formatIdentifierFactory, ProcessingManagementClientFactory processingManagementClientFactory, LogbookOperationsClientFactory logbookOperationsClientFactory)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addBinaryInfoToQualifier(DbObjectGroupModel dbObjectGroupModel, DataObjectVersionType usage, int version, InputStream uploadedInputStream)`
  `Optional<FormatIdentifierResponse>`
  `detectFileFormat(File fileToDetect)`
  `CollectUnitModel`
  `getArchiveUnitModel(String unitId)`
  `jakarta.ws.rs.core.Response`
  `getBinaryByUsageAndVersion(CollectUnitModel unitModel, DataObjectVersionType usage, int version)`
  `DbObjectGroupModel`
  `getDbObjectGroup(CollectUnitModel unitModel)`
  `InputStream`
  `getInputStreamFromWorkspace(String containerName, String fileName)`
  `String`
  `pushStreamToWorkspace(String containerName, InputStream uploadedInputStream, String fileName)`
  `ObjectDto`
  `updateOrSaveObjectGroup(CollectUnitModel unitModel, DataObjectVersionType usage, int version, ObjectDto objectDto)`

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

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

- ## Field Details

  - ### UNABLE_TO_FIND_ARCHIVE_UNIT_ID

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

- ## Constructor Details

  - ### CollectService

    public CollectService(MetadataRepository metadataRepository, WorkspaceClientFactory workspaceCollectClientFactory, WorkspaceClientFactory workspaceClientFactory, FormatIdentifierFactory formatIdentifierFactory, ProcessingManagementClientFactory processingManagementClientFactory, LogbookOperationsClientFactory logbookOperationsClientFactory)

- ## Method Details

  - ### getArchiveUnitModel

    public CollectUnitModel getArchiveUnitModel(String unitId) throws CollectInternalException
    Throws:
      `CollectInternalException`

  - ### updateOrSaveObjectGroup

    public ObjectDto updateOrSaveObjectGroup(CollectUnitModel unitModel, DataObjectVersionType usage, int version, ObjectDto objectDto) throws CollectInternalException
    Throws:
      `CollectInternalException`

  - ### getDbObjectGroup

    public DbObjectGroupModel getDbObjectGroup(CollectUnitModel unitModel) throws CollectInternalException
    Throws:
      `CollectInternalException`

  - ### addBinaryInfoToQualifier

    public void addBinaryInfoToQualifier(DbObjectGroupModel dbObjectGroupModel, DataObjectVersionType usage, int version, InputStream uploadedInputStream) throws CollectInternalException
    Throws:
      `CollectInternalException`

  - ### pushStreamToWorkspace

    public String pushStreamToWorkspace(String containerName, InputStream uploadedInputStream, String fileName) throws CollectInternalException
    Throws:
      `CollectInternalException`

  - ### getInputStreamFromWorkspace

    public InputStream getInputStreamFromWorkspace(String containerName, String fileName) throws CollectInternalException
    Throws:
      `CollectInternalException`

  - ### detectFileFormat

    public Optional<FormatIdentifierResponse> detectFileFormat(File fileToDetect) throws CollectInternalException
    Throws:
      `CollectInternalException`

  - ### getBinaryByUsageAndVersion

    public jakarta.ws.rs.core.Response getBinaryByUsageAndVersion(CollectUnitModel unitModel, DataObjectVersionType usage, int version) throws StorageNotFoundException, CollectInternalException
    Throws:
      `StorageNotFoundException`
      `CollectInternalException`