Beispiel #1
0
 @Override
 @Secured
 public void removeParameter(TestExecutionParameter tep) throws ServiceException {
   TestExecution exec = testExecutionDAO.get(tep.getTestExecution().getId());
   if (exec == null) {
     throw new ServiceException(
         "serviceException.testExecutionNotFound", tep.getTestExecution().getName());
   }
   TestExecutionParameter tepRemove = testExecutionParameterDAO.get(tep.getId());
   testExecutionParameterDAO.remove(tepRemove);
 }
Beispiel #2
0
  @Override
  @Secured
  public TestExecutionParameter updateParameter(TestExecutionParameter tep)
      throws ServiceException {
    TestExecution exec = testExecutionDAO.get(tep.getTestExecution().getId());
    if (exec == null) {
      throw new ServiceException(
          "serviceException.testExecutionNotFound", tep.getTestExecution().getName());
    }
    if (testExecutionParameterDAO.hasTestParam(exec.getId(), tep)) {
      throw new ServiceException("serviceException.parameterExists", tep.getName());
    }

    return testExecutionParameterDAO.update(tep);
  }
Beispiel #3
0
  @Override
  public TestExecutionParameter getFullParameter(Long paramId) {
    TestExecutionParameter p = testExecutionParameterDAO.get(paramId);
    if (p == null) {
      return null;
    }

    TestExecutionParameter pclone = p.clone();
    pclone.setTestExecution(p.getTestExecution().clone());

    return pclone;
  }