class AuthorisationServiceInternal implements AuthorisationService {

    @Transactional
    @Override
    public CmsResponse<List<String>> getAuthorisationsByParentId(AuthorisationParentHolder parentHolder) {
        AuthService authService = authServiceResolver.getAuthService(parentHolder.getAuthorisationType());

        Optional<Authorisable> authorisationParentOptional = authService.getAuthorisationParent(parentHolder.getParentId());
        if (authorisationParentOptional.isEmpty()) {
            log.info("Parent ID: [{}]. Get the list of authorisation IDs has failed, because parent couldn't be found",
                     parentHolder.getParentId());
            return CmsResponse.<List<String>>builder()
                       .error(LOGICAL_ERROR)
                       .build();
        }

        Authorisable authorisationParent = authorisationParentOptional.get();
        Authorisable checkedParent = authService.checkAndUpdateOnConfirmationExpiration(authorisationParent);

        List<AuthorisationEntity> authorisations = authService.getAuthorisationsByParentId(checkedParent.getExternalId());
        List<String> authorisationIds = authorisations.stream()
                                            .map(AuthorisationEntity::getExternalId)
                                            .collect(Collectors.toList());

        return CmsResponse.<List<String>>builder()
                   .payload(authorisationIds)
                   .build();
    }

}