use of org.apereo.portal.portletpublishing.xml.Step in project uPortal by Jasig.
the class PortletAdministrationHelper method getArbitraryPortletPreferenceNames.
/**
* Get a list of the key names of the currently-set arbitrary portlet preferences.
*
* @param form
* @return
*/
public Set<String> getArbitraryPortletPreferenceNames(PortletDefinitionForm form) {
// set default values for all portlet parameters
PortletPublishingDefinition cpd = this.portletPublishingDefinitionDao.getChannelPublishingDefinition(form.getTypeId());
Set<String> currentPrefs = new HashSet<>();
currentPrefs.addAll(form.getPortletPreferences().keySet());
for (Step step : cpd.getSteps()) {
if (step.getPreferences() != null) {
for (Preference pref : step.getPreferences()) {
currentPrefs.remove(pref.getName());
}
}
}
return currentPrefs;
}
Aggregations