}
@Override
public void updateExperimentAttachmentContent(long actor, long experiment, long attachment, String contentId) {
if (!validator.userHasEditPermissionsOnExperiment(actor, experiment)) {
throw new AccessDenied("User cannot edit the attachments for the experiment. User ID = " + actor + ". Experiment ID = " + experiment);
}
if (!validator.canModifyAttachment(actor, attachment)) {
throw new AccessDenied("User update the attachment. User ID = " + actor + ". Attachment ID = " + attachment);
}
final Attachment toUpdate = attachmentRepository.findOne(attachment);
toUpdate.setContentId(contentId);
}