this logic to get the absolute path is the same as in findByName. can we extract that to a protected method "determineAbsolutePath"? and call it from both places? it can then check ! isAbsolutePath and do the expansion in that case.

what happens in the case of no contentDocument but relative path? right now we would leave id unset. not sure if it hurts or if we need to care about the case.