public function save($idSite, $idNote, $date = null, $note = null, $starred = null)
    {
        $this->checkSingleIdSite($idSite, $extraMessage = "Note: Cannot modify more than one note at a time.");
        $this->checkDateIsValid($date, $canBeNull = true);

        // get the annotations for the site
        $annotations = new AnnotationList($idSite);

        // check permissions
        $this->checkUserCanModifyOrDelete($idSite, $annotations->get($idSite, $idNote));

        // modify the annotation, and save the whole list
        $annotations->update($idSite, $idNote, $date, $note, $starred);
        $annotations->save($idSite);

        return $annotations->get($idSite, $idNote);
    }