}
protected void clearPortletCacheForPage(RequestContext request, PortletWindow actionWindow)
throws JetspeedException
{
ContentPage page = request.getPage();
if (null == page)
{
throw new JetspeedException("Failed to find PSML Pin ContentPageAggregator.build");
}
ContentFragment root = page.getRootContentFragment();
if (root == null)
{
throw new JetspeedException("No root ContentFragment found in ContentPage");
}
if (!isNonStandardAction(actionWindow))
{
notifyFragments(root, request, page);
// if the fragment is rendered from a decorator template, the target cache would not be cleared by the above notification.
// so, let's clear target cache of action window directly again.
String fragmentId = actionWindow.getWindowId();
if (page.getFragmentById(fragmentId) == null)
{
clearTargetCache(fragmentId, request);
}
}
else
{
ContentFragment fragment = page.getContentFragmentById(actionWindow.getWindowId());
if (fragment != null)
{
clearTargetCache(fragment, request);
}