@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); } }
@Override public TestExecutionAttachment getAttachment(Long id) { return testExecutionAttachmentDAO.get(id); }