/**
* Stores the portlet preferences to a persistent storage. If a preferences
* validator is defined for this portlet, this method firstly validates the
* portlet preferences.
* <p>
* This method is invoked internally, thus it does not check the portlet
* request method ID (METHOD_RENDER or METHOD_ACTION).
* </p>
* @throws ValidatorException if the portlet preferences are not valid.
* @throws IOException if an error occurs with the persistence mechanism.
*/
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.
PortletDefinition portletD = window.getPortletDefinition();
PreferencesValidator validator = preferencesService.getPreferencesValidator(portletD);
if (validator != null)
{
validator.validate(this);
}
// Store the portlet preferences.
try {
preferencesService.store(window, request, preferences);
} catch (PortletContainerException ex) {
LOG.error("Error storing preferences.", ex);
throw new IOException("Error storing perferences: " + ex.getMessage());
}
}
PortletPreferencesImpl.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:portals-pluto
作者:
评论列表
文章目录