you could apply it on lifecycle hook level, probably the most appropriate place for it