コード例 #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);
   }
 }
コード例 #2
0
 @Override
 public TestExecutionAttachment getAttachment(Long id) {
   return testExecutionAttachmentDAO.get(id);
 }