*/
protected final void internalStore() throws IOException, ValidatorException {
// Validate the preferences before storing, if a validator is defined.
// If the preferences cannot pass the validation,
// an ValidatorException will be thrown out.
PreferencesValidator validator = window.getPortletEntity()
.getPreferencesValidator();
if (validator != null) {
validator.validate(this);
}
// Store the portlet preferences.
InternalPortletPreference[] prefs = (InternalPortletPreference[])
(new ArrayList(preferences.values())).toArray(
new InternalPortletPreference[preferences.size()]);