Exemplo n.º 1
0
 @Override
 public List<String> getParametersByPrefix(String prefix) {
   List<TestExecutionParameter> parameters = testExecutionParameterDAO.findByPrefix(prefix);
   List<String> result = new ArrayList<>();
   for (TestExecutionParameter parameter : parameters) {
     result.add(parameter.getName());
   }
   return result;
 }
Exemplo n.º 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);
  }