while (it.hasNext())
{
Map<String, PortletPreference> portletPreference = new HashMap<String, PortletPreference>();
Object preference = it.next();
String userName = null;
JSNVPElements preferenceElements = null;
if (preference instanceof JSEntityPreference)
{
JSEntityPreference pref = (JSEntityPreference)preference;
userName = pref.getPrincapalName();
preferenceElements = pref.getPreferences();
}
else if (preference instanceof JSEntityPreferenceCompat)
{
JSEntityPreferenceCompat pref = (JSEntityPreferenceCompat)preference;
userName = pref.getName();
preferenceElements = pref.getPreferences();
}
for (JSNVPElement element : preferenceElements.getValues())
{
if (element.getValues() == null)
{
portletPreference.put(element.getKey(), new JetspeedPreferenceImpl(element.getKey(), new String[] { element.getValue() }, element.isReadOnly()));
}