package com.oguerreiro.resilient.web.rest;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.oguerreiro.resilient.domain.Document;
import com.oguerreiro.resilient.repository.DocumentRepository;
import com.oguerreiro.resilient.service.DocumentService;
import com.oguerreiro.resilient.service.dto.DocumentDTO;

/**
 * REST controller for managing {@link com.oguerreiro.resilient.domain.Document}.
 */
@RestController
@RequestMapping("/api/documents")
public class DocumentResource extends AbstractResilientResource<Document, DocumentDTO, Long> {

  private static final String ENTITY_NAME = "document";

  @Value("${jhipster.clientApp.name}")
  private String applicationName;

  public DocumentResource(DocumentService documentService, DocumentRepository documentRepository) {
    super(Document.class, documentRepository, documentService);
  }

  /* Abstract methods impl*/
  @Override
  protected String getEntityName() {
    return ENTITY_NAME;
  }
}
