It was definitely planned. The only question is whether it was planned just between Justin and Janet for publicity, or whether they had the go ahead to do it by CBS and MTV. MTV and CBS have issued apologies, but according to the Drudge Report (
http://www.drudgereport.com/mattjj.htm) CBS knew about it before...
In addition, it wasn't really a nipple cap, it was actually a nipple ring with a shield, like this:
Edit: First link goes to site with pictures of the happening/boob. Don't click if you're afraid of a couple millimeters of a nipple.