Refactor confusing case statement in the resourceFactory action method.

A coworker ran across the case statement at the beginning of the resourceFactory action method definition. I refactored it so it's clearer what's going on. As a result, the jshint exception is no longer needed. Tests pass, but we have not tried it in a production app yet.