class SecretsResource {

  @Timed @ExceptionMetered
  @GET
  @Path("versions/{name}")
  @Produces(APPLICATION_JSON)
  public List<SanitizedSecret> secretVersions(@Auth User user,
      @PathParam("name") String name, @QueryParam("versionIdx") int versionIdx,
      @QueryParam("numVersions") int numVersions) {

    logger.info("User '{}' listing {} versions starting at index {} for secret '{}'.", user,
        numVersions, versionIdx, name);

    ImmutableList<SanitizedSecret> versions =
        secretDAOReadOnly.getSecretVersionsByName(name, versionIdx, numVersions)
            .orElseThrow(NotFoundException::new);

    return versions;
  }

  @SuppressWarnings("unused") @Inject public  SecretsResource(SecretController secretController, AclDAOFactory aclDAOFactory,
      SecretDAOFactory secretDAOFactory, AuditLog auditLog);
  @VisibleForTesting  SecretsResource(SecretController secretController, AclDAO aclDAOReadOnly,
      SecretDAO secretDAOReadWrite, AuditLog auditLog);

}