Class PersonalRepository
- java.lang.Object
-
- fr.gouv.vitam.security.internal.rest.repository.PersonalRepository
-
- All Implemented Interfaces:
CertificateCRLCheckStateUpdater<PersonalCertificateModel>
public class PersonalRepository extends java.lang.Object implements CertificateCRLCheckStateUpdater<PersonalCertificateModel>
store Personal certificate in mongo.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PERSONAL_COLLECTION
-
Constructor Summary
Constructors Constructor Description PersonalRepository(MongoDbAccess mongoDbAccess)
PersonalRepository(MongoDbAccess mongoDbAccess, java.lang.String collectionName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createPersonalCertificate(PersonalCertificateModel personalCertificateModel)
create a personal certificatevoid
deletePersonalCertificate(java.lang.String hash)
return certificate by hashcom.mongodb.client.FindIterable<org.bson.Document>
findCertificate(java.lang.String issuerDN, CertificateStatus certificateStatus)
return list of certificate filtered by issuerDN and certificateStatusjava.util.Optional<PersonalCertificateModel>
findPersonalCertificateByHash(java.lang.String hash)
return certificate by hashjava.lang.Class<PersonalCertificateModel>
getEntityModelType()
void
updateCertificateState(java.util.List<java.lang.String> certificatesToUpdate, CertificateStatus certificateStatus)
set state for a given list of certificates
-
-
-
Field Detail
-
PERSONAL_COLLECTION
public static final java.lang.String PERSONAL_COLLECTION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PersonalRepository
public PersonalRepository(MongoDbAccess mongoDbAccess, java.lang.String collectionName)
-
PersonalRepository
public PersonalRepository(MongoDbAccess mongoDbAccess)
-
-
Method Detail
-
createPersonalCertificate
public void createPersonalCertificate(PersonalCertificateModel personalCertificateModel) throws InvalidParseOperationException
create a personal certificate- Parameters:
personalCertificateModel
-- Throws:
InvalidParseOperationException
-
findPersonalCertificateByHash
public java.util.Optional<PersonalCertificateModel> findPersonalCertificateByHash(java.lang.String hash) throws InvalidParseOperationException
return certificate by hash- Parameters:
hash
-- Returns:
- Throws:
InvalidParseOperationException
-
deletePersonalCertificate
public void deletePersonalCertificate(java.lang.String hash)
return certificate by hash- Parameters:
hash
-
-
findCertificate
public com.mongodb.client.FindIterable<org.bson.Document> findCertificate(java.lang.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(java.util.List<java.lang.String> certificatesToUpdate, CertificateStatus certificateStatus)
set state for a given list of certificates- Specified by:
updateCertificateState
in interfaceCertificateCRLCheckStateUpdater<PersonalCertificateModel>
-
getEntityModelType
public java.lang.Class<PersonalCertificateModel> getEntityModelType()
- Specified by:
getEntityModelType
in interfaceCertificateCRLCheckStateUpdater<PersonalCertificateModel>
- Returns:
- certificate model class type
-
-