You're doing too much work manually here. Just call layoutTypePortlet.addPortletId