Class PersonalCertificateService
- java.lang.Object
-
- fr.gouv.vitam.security.internal.rest.service.PersonalCertificateService
-
public class PersonalCertificateService extends java.lang.Object
Manages personal certificates
-
-
Constructor Summary
Constructors Constructor Description PersonalCertificateService(LogbookOperationsClientFactory logbookOperationsClientFactory, PersonalRepository personalRepository)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkPersonalCertificateExistence(byte[] certificate, java.lang.String permission)
Checks if the personal certificate if valid.void
createPersonalCertificateIfNotPresent(byte[] certificate)
Create certificate if not present in DB.void
deletePersonalCertificateIfPresent(byte[] certificate)
Delete certificate if present.
-
-
-
Constructor Detail
-
PersonalCertificateService
public PersonalCertificateService(LogbookOperationsClientFactory logbookOperationsClientFactory, PersonalRepository personalRepository)
-
-
Method Detail
-
createPersonalCertificateIfNotPresent
public void createPersonalCertificateIfNotPresent(byte[] certificate) throws PersonalCertificateException, InvalidParseOperationException
Create certificate if not present in DB.- Throws:
java.security.cert.CertificateException
InvalidParseOperationException
PersonalCertificateException
-
deletePersonalCertificateIfPresent
public void deletePersonalCertificateIfPresent(byte[] certificate) throws PersonalCertificateException
Delete certificate if present.- Parameters:
certificate
-- Throws:
PersonalCertificateException
-
checkPersonalCertificateExistence
public void checkPersonalCertificateExistence(byte[] certificate, java.lang.String permission) throws LogbookClientServerException, LogbookClientAlreadyExistsException, LogbookClientBadRequestException, InvalidParseOperationException, PersonalCertificateException
Checks if the personal certificate if valid.- Parameters:
certificate
- the certificate to checkpermission
- the permission for which access if checked (required for logbook logging)- Throws:
LogbookClientServerException
LogbookClientAlreadyExistsException
LogbookClientBadRequestException
InvalidParseOperationException
PersonalCertificateException
-
-