public void renderXML (ContentHandler out, String uid) throws PortalException {
ChannelState channelState = (ChannelState)channelStateMap.get(uid);
ChannelStaticData staticData = channelState.getStaticData();
ChannelRuntimeData runtimeData = channelState.getRuntimeData();
IPerson person = staticData.getPerson();
Document doc = DocumentFactory.getNewDocument();
Element attributesE = doc.createElement("attributes");
IPersonAttributeDao pa = PersonDirectory.getPersonAttributeDao();
Set possibleAttrs = pa.getPossibleUserAttributeNames();
if (possibleAttrs != null)
possibleAttrs = new HashSet(possibleAttrs);
else
possibleAttrs = new HashSet();
for (Enumeration attribs = person.getAttributeNames(); attribs.hasMoreElements(); ) {
// Get the attribute name
String attName = (String) attribs.nextElement();
// Remove this attr from the list of possible attrs
possibleAttrs.remove(attName);
// Set the attribute
Element attributeE = doc.createElement("attribute");
Element nameE = doc.createElement("name");
nameE.appendChild(doc.createTextNode(attName));
attributeE.appendChild(nameE);
// Get the IPerson attribute value for this eduPerson attribute name
if (person.getAttributeValues(attName) != null) {
Object[] values = person.getAttributeValues(attName);
for (int i = 0; i < values.length; i++) {
if (log.isTraceEnabled())
log.trace("type of value["+i+"] is " + values[i].getClass().getName());
String value = values[i].toString();
Element valueE = doc.createElement("value");