Ejemplo n.º 1
0
 @Override
 @Secured
 public void removeAttachment(TestExecutionAttachment attachment) throws ServiceException {
   TestExecution exec = testExecutionDAO.get(attachment.getTestExecution().getId());
   if (exec == null) {
     throw new ServiceException(
         "serviceException.removeAttachment.testExecutionNotFound",
         attachment.getTestExecution().getName());
   }
   TestExecutionAttachment freshAttachment = testExecutionAttachmentDAO.get(attachment.getId());
   if (freshAttachment != null) {
     testExecutionAttachmentDAO.remove(freshAttachment);
   }
 }
Ejemplo n.º 2
0
 @Override
 public TestExecutionAttachment getAttachment(Long id) {
   return testExecutionAttachmentDAO.get(id);
 }