LPS-51303 Moves code from action to util class, we reuse this code when we convert journal content in a osgi module