I sounds to me as a part of domain logic. I would move it to model.