Class PersonalRepository
java.lang.Object
fr.gouv.vitam.security.internal.rest.repository.PersonalRepository
- All Implemented Interfaces:
CertificateCRLCheckStateUpdater<PersonalCertificateModel>
,CertificateRepository
public class PersonalRepository
extends Object
implements CertificateRepository, CertificateCRLCheckStateUpdater<PersonalCertificateModel>
store Personal certificate in mongo.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPersonalRepository
(MongoDbAccess mongoDbAccess) PersonalRepository
(MongoDbAccess mongoDbAccess, String collectionName) -
Method Summary
Modifier and TypeMethodDescriptionvoid
createPersonalCertificate
(PersonalCertificateModel personalCertificateModel) create a personal certificatevoid
return certificate by hashfindAll()
com.mongodb.client.FindIterable<org.bson.Document>
findCertificate
(String issuerDN, CertificateStatus certificateStatus) return list of certificate filtered by issuerDN and certificateStatusreturn certificate by hashvoid
updateCertificateState
(List<String> certificatesToUpdate, CertificateStatus certificateStatus) set state for a given list of certificates
-
Field Details
-
PERSONAL_COLLECTION
- See Also:
-
-
Constructor Details
-
PersonalRepository
-
PersonalRepository
-
-
Method Details
-
createPersonalCertificate
public void createPersonalCertificate(PersonalCertificateModel personalCertificateModel) throws InvalidParseOperationException create a personal certificate- Parameters:
personalCertificateModel
-- Throws:
InvalidParseOperationException
-
findPersonalCertificateByHash
public Optional<PersonalCertificateModel> findPersonalCertificateByHash(String hash) throws InvalidParseOperationException return certificate by hash- Parameters:
hash
-- Returns:
- Throws:
InvalidParseOperationException
-
findAll
- Specified by:
findAll
in interfaceCertificateRepository
- Throws:
InvalidParseOperationException
-
deletePersonalCertificate
return certificate by hash- Parameters:
hash
-
-
findCertificate
public com.mongodb.client.FindIterable<org.bson.Document> findCertificate(String issuerDN, CertificateStatus certificateStatus) throws InvalidParseOperationException return list of certificate filtered by issuerDN and certificateStatus- Specified by:
findCertificate
in interfaceCertificateCRLCheckStateUpdater<PersonalCertificateModel>
- Returns:
- list of identity certificate
- Throws:
InvalidParseOperationException
-
updateCertificateState
public void updateCertificateState(List<String> certificatesToUpdate, CertificateStatus certificateStatus) set state for a given list of certificates- Specified by:
updateCertificateState
in interfaceCertificateCRLCheckStateUpdater<PersonalCertificateModel>
-
getEntityModelType
- Specified by:
getEntityModelType
in interfaceCertificateCRLCheckStateUpdater<PersonalCertificateModel>
- Returns:
- certificate model class type
-