public SignatureVo disassemble(Signature entityObject) { SignatureVo res = null; if (null != entityObject) { res = new SignatureVo(); res.setIdentifier(entityObject.getUuid()); res.setCreationDate(entityObject.getCreationDate()); res.setCertIssuerDn(entityObject.getCertIssuerDn()); res.setCertSubjectDn(entityObject.getCertSubjectDn()); res.setCertNotAfter(entityObject.getCertNotAfter()); res.setCert(entityObject.getCert()); res.setSize(entityObject.getSize()); res.setName(entityObject.getName()); res.setPersistenceId(entityObject.getId()); UserVo signer = userTransformer.disassemble((User) entityObject.getSigner()); res.setSigner(signer); } return res; }
@Override public InputStream retrieveSignatureFileStream(SignatureVo signaturedoc) { Signature signature = signatureService.findByUuid(signaturedoc.getIdentifier()); return signatureService.getDocumentStream(signature); }