@Override public List<SignatureVo> getAllSignatures(UserVo userVo, DocumentVo documentVo) { Account actor = accountService.findByLsUuid(userVo.getLsUuid()); try { DocumentEntry document = documentEntryService.findById(actor, documentVo.getIdentifier()); return signatureTransformer.disassembleList( new ArrayList<Signature>(document.getDocument().getSignatures())); } catch (BusinessException e) { logger.error("Can't find document : " + documentVo.getIdentifier() + ": " + e.getMessage()); } return null; }
@Override public SignatureVo getSignature(UserVo currentSigner, DocumentVo documentVo) { Account actor = accountService.findByLsUuid(currentSigner.getLsUuid()); try { DocumentEntry document = documentEntryService.findById(actor, documentVo.getIdentifier()); SignatureVo res = null; for (Signature signature : document.getDocument().getSignatures()) { if (signature.getSigner().equals(actor)) { res = signatureTransformer.disassemble(signature); break; } } return res; } catch (BusinessException e) { logger.error("Can't find document : " + documentVo.getIdentifier() + ": " + e.getMessage()); } return null; }