{
Set keySet = prefsInfo.getKeys();
descs = new ArrayList<PropertyDescription>(keySet.size());
for (Object key : keySet)
{
PreferenceInfo prefInfo = prefsInfo.getPreference((String)key);
// WSRP Spec 8.7: return only the portion of the Portlet's persistent state the user is allowed to modify
// if read only status is not determined, we consider it as being read-only to be safe
Boolean readOnly = prefInfo.isReadOnly();
if (readOnly != null && !readOnly)
{
//todo: check what we should use key
//todo: right now we only support String properties
List<String> desiredLocales = getPortletPropertyDescription.getDesiredLocales();
desiredLocales = WSRPUtils.replaceByEmptyListIfNeeded(desiredLocales);
PropertyDescription desc = WSRPTypeFactory.createPropertyDescription(prefInfo.getKey(), WSRPConstants.XSD_STRING);
desc.setLabel(Utils.convertToWSRPLocalizedString(prefInfo.getDisplayName(), desiredLocales));
desc.setHint(Utils.convertToWSRPLocalizedString(prefInfo.getDescription(), desiredLocales));
descs.add(desc);
}
}
}