add setCurrent and getCurrent to resourceFactory