final FileMetaData entity = load(file);
if (!entity.getOwner().equals(Util.USER_FROM_ID.apply(actor)))
throw new AccessDenied("Only owner can set content");
if (RuleValidatorImpl.IS_UPLOAD_COMPLETE.apply(entity))
throw new AccessDenied("Content already set");
final NodePath path = storedObjectPaths.rawFilePath(actor, entity.getInstrument().getId(), entity.getName());
storageService.put(path, content);
entity.setContentId(path.getPath());
logger.debug("the content for file with ID = " + file + " for user " + actor + " has been set. Path = " + path.getPath());
fileRepository.save(entity);
}