Class CollectService
- java.lang.Object
-
- fr.gouv.vitam.collect.internal.core.service.CollectService
-
public class CollectService extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
UNABLE_TO_FIND_ARCHIVE_UNIT_ID
-
Constructor Summary
Constructors Constructor Description CollectService(MetadataRepository metadataRepository, WorkspaceClientFactory workspaceCollectClientFactory, FormatIdentifierFactory formatIdentifierFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addBinaryInfoToQualifier(DbObjectGroupModel dbObjectGroupModel, DataObjectVersionType usage, int version, java.io.InputStream uploadedInputStream)
java.util.Optional<FormatIdentifierResponse>
detectFileFormat(java.io.File fileToDetect)
CollectUnitModel
getArchiveUnitModel(java.lang.String unitId)
javax.ws.rs.core.Response
getBinaryByUsageAndVersion(CollectUnitModel unitModel, DataObjectVersionType usage, int version)
DbObjectGroupModel
getDbObjectGroup(CollectUnitModel unitModel)
java.io.InputStream
getInputStreamFromWorkspace(java.lang.String containerName, java.lang.String fileName)
java.lang.String
pushStreamToWorkspace(java.lang.String containerName, java.io.InputStream uploadedInputStream, java.lang.String fileName)
ObjectDto
updateOrSaveObjectGroup(CollectUnitModel unitModel, DataObjectVersionType usage, int version, ObjectDto objectDto)
-
-
-
Field Detail
-
UNABLE_TO_FIND_ARCHIVE_UNIT_ID
public static final java.lang.String UNABLE_TO_FIND_ARCHIVE_UNIT_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CollectService
public CollectService(MetadataRepository metadataRepository, WorkspaceClientFactory workspaceCollectClientFactory, FormatIdentifierFactory formatIdentifierFactory)
-
-
Method Detail
-
getArchiveUnitModel
public CollectUnitModel getArchiveUnitModel(java.lang.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, java.io.InputStream uploadedInputStream) throws CollectInternalException
- Throws:
CollectInternalException
-
pushStreamToWorkspace
public java.lang.String pushStreamToWorkspace(java.lang.String containerName, java.io.InputStream uploadedInputStream, java.lang.String fileName) throws CollectInternalException
- Throws:
CollectInternalException
-
getInputStreamFromWorkspace
public java.io.InputStream getInputStreamFromWorkspace(java.lang.String containerName, java.lang.String fileName) throws CollectInternalException
- Throws:
CollectInternalException
-
detectFileFormat
public java.util.Optional<FormatIdentifierResponse> detectFileFormat(java.io.File fileToDetect) throws CollectInternalException
- Throws:
CollectInternalException
-
getBinaryByUsageAndVersion
public javax.ws.rs.core.Response getBinaryByUsageAndVersion(CollectUnitModel unitModel, DataObjectVersionType usage, int version) throws StorageNotFoundException, CollectInternalException
-
-