Factoring logic out of ProcessResource for reuse in a service class