Class TapeCatalogRepository
- java.lang.Object
-
- fr.gouv.vitam.storage.offers.tape.impl.queue.QueueRepositoryImpl
-
- fr.gouv.vitam.storage.offers.tape.impl.catalog.TapeCatalogRepository
-
- All Implemented Interfaces:
QueueRepository
public class TapeCatalogRepository extends QueueRepositoryImpl
repository for Tapes Catalog management in mongo.
-
-
Field Summary
-
Fields inherited from class fr.gouv.vitam.storage.offers.tape.impl.queue.QueueRepositoryImpl
collection
-
-
Constructor Summary
Constructors Constructor Description TapeCatalogRepository(com.mongodb.client.MongoCollection<org.bson.Document> collection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
createTape(TapeCatalog tapeCatalog)
create a tape modelTapeCatalog
findTapeById(java.lang.String tapeId)
return tape model according to given IDjava.util.List<TapeCatalog>
findTapes(java.util.List<QueryCriteria> criteria)
return tape models according to given fieldsboolean
replaceTape(TapeCatalog tapeCatalog)
replace a tape modelboolean
updateTape(java.lang.String tapeId, java.util.Map<java.lang.String,java.lang.Object> fields)
apply fields changes for tape tapeId-
Methods inherited from class fr.gouv.vitam.storage.offers.tape.impl.queue.QueueRepositoryImpl
add, addIfAbsent, complete, initializeOnBootstrap, markError, markReady, receive, receive, receive, receive, receive, receive, remove
-
-
-
-
Method Detail
-
createTape
public java.lang.String createTape(TapeCatalog tapeCatalog) throws TapeCatalogException
create a tape model- Parameters:
tapeCatalog
-- Throws:
InvalidParseOperationException
TapeCatalogException
-
replaceTape
public boolean replaceTape(TapeCatalog tapeCatalog) throws TapeCatalogException
replace a tape model- Parameters:
tapeCatalog
-- Throws:
InvalidParseOperationException
TapeCatalogException
-
updateTape
public boolean updateTape(java.lang.String tapeId, java.util.Map<java.lang.String,java.lang.Object> fields) throws TapeCatalogException
apply fields changes for tape tapeId- Parameters:
tapeId
-fields
-- Returns:
- true if changes have been applied otherwise false
- Throws:
TapeCatalogException
-
findTapes
public java.util.List<TapeCatalog> findTapes(java.util.List<QueryCriteria> criteria) throws TapeCatalogException
return tape models according to given fields- Parameters:
criteria
-- Returns:
- Throws:
TapeCatalogException
-
findTapeById
public TapeCatalog findTapeById(java.lang.String tapeId) throws TapeCatalogException
return tape model according to given ID- Parameters:
tapeId
-- Returns:
- Throws:
TapeCatalogException
-
-