Refactor Resource's decision whether to update

Split the decision of whether an update is required into a separate method.

Change-Id: I838985a17ab4a5dca48a17d620729117c277c65b
Merge "Refactor Resource's decision whether to update"