Iterator contentTypeIter = pDef.getContentTypeSet().iterator();
while (contentTypeIter.hasNext())
{
buffer.append("\t<supports>\n");
ContentType contentType = (ContentType) contentTypeIter.next();
buffer.append("\t\t<mime-type>\n");
buffer.append(contentType.getContentType());
buffer.append("</mime-type>\n");
Iterator modeIter = contentType.getPortletModes();
while (modeIter.hasNext())
{
PortletMode mode = (PortletMode) modeIter.next();
buffer.append("\t\t<portlet-mode>");
buffer.append(mode.toString());