class FileService extends BasicService implements OwnerAPISupport<File> {

	@PUT
	@Path("/files/{fileId}")
	@Produces(MediaType.APPLICATION_JSON)
	public File updateFile(@PathParam("fileId") long fileId, File fileData) {
		File existingFile = getExistingFile(fileId, true);

		existingFile.setName(fileData.getName());
		existingFile.setDescription(fileData.getDescription());
		existingFile.setListPublicly(fileData.isListPublicly());

		return FileDAO.save(existingFile);
	}

}