class FileService extends BasicService implements OwnerAPISupport<File> {

	@DELETE
	@Path("/files/{fileId}")
	public Response deleteFile(@PathParam("fileId") long fileId) {
		File existingFile = getExistingFile(fileId, true);
		getECM().deleteDocumentByName(existingFile.getFileKey(), false);

		for (Owner owner : existingFile.getOwners()) {
			new OwnerDAO().deleteById(owner.getId());
		}

		return new FileDAO().deleteById(fileId) ? RESPONSE_OK : RESPONSE_BAD;
	}

}