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 - InvalidParseOperationExceptionpublic Optional<IdentityModel> findIdentity(String subjectDN, BigInteger serialNumber) throws InvalidParseOperationException
subjectDN - serialNumber - InvalidParseOperationExceptionpublic 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>InvalidParseOperationExceptionpublic 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.