public class IdentityRepository extends Object implements CertificateCRLCheckStateUpdater<IdentityModel>
Modifier and Type | Field and Description |
---|---|
static String |
CERTIFICATE_COLLECTION |
Constructor and Description |
---|
IdentityRepository(MongoDbAccess mongoDbAccess) |
Modifier and Type | Method and Description |
---|---|
boolean |
contextIsUsed(String contextId)
Check if a context is used
|
void |
createIdentity(IdentityModel identityModel)
create a certificate with contextId and many information
|
com.mongodb.client.FindIterable<org.bson.Document> |
findCertificate(String issuerDN,
CertificateStatus certificateStatus)
return list of certificate filtered by issuerDN and certificateStatus
|
Optional<IdentityModel> |
findIdentity(String subjectDN,
BigInteger serialNumber)
return certificate according to subjectDN and serilanumber
|
Class<IdentityModel> |
getEntityModelType() |
void |
linkContextToIdentity(String subjectDN,
String contextId,
BigInteger serialNumber) |
void |
updateCertificateState(List<String> certificatesToUpdate,
CertificateStatus certificateStatus)
set state for a given list of certificates
|
public static final String CERTIFICATE_COLLECTION
public IdentityRepository(MongoDbAccess mongoDbAccess)
public void createIdentity(IdentityModel identityModel) throws InvalidParseOperationException
identityModel
- InvalidParseOperationException
public Optional<IdentityModel> findIdentity(String subjectDN, BigInteger serialNumber) throws InvalidParseOperationException
subjectDN
- serialNumber
- InvalidParseOperationException
public void linkContextToIdentity(String subjectDN, String contextId, BigInteger serialNumber)
subjectDN
- contextId
- serialNumber
- public boolean contextIsUsed(String contextId)
contextId
- public com.mongodb.client.FindIterable<org.bson.Document> findCertificate(String issuerDN, CertificateStatus certificateStatus) throws InvalidParseOperationException
findCertificate
in interface CertificateCRLCheckStateUpdater<IdentityModel>
InvalidParseOperationException
public void updateCertificateState(List<String> certificatesToUpdate, CertificateStatus certificateStatus)
updateCertificateState
in interface CertificateCRLCheckStateUpdater<IdentityModel>
public Class<IdentityModel> getEntityModelType()
getEntityModelType
in interface CertificateCRLCheckStateUpdater<IdentityModel>
Copyright © 2018 Vitam. All rights reserved.