} else {
ws = WindowState.NORMAL;
}
if ( !ws.equals(WindowState.MINIMIZED) && !ws.equals(WindowState.MAXIMIZED)) {
PortletURLProviderImpl url = (PortletURLProviderImpl)dip.getPortletURLProvider(window);
url.clearParameters();
url.setWindowState(WindowState.MINIMIZED);
XMLUtils.createElement(contenthandler, "minimize-uri", url.toString());
}
if ( !ws.equals(WindowState.NORMAL)) {
PortletURLProviderImpl url = (PortletURLProviderImpl)dip.getPortletURLProvider(window);
url.clearParameters();
url.setWindowState(WindowState.NORMAL);
XMLUtils.createElement(contenthandler, "maximize-uri", url.toString());
}
if ( !ws.equals(WindowState.MAXIMIZED)) {
PortletURLProviderImpl url = (PortletURLProviderImpl)dip.getPortletURLProvider(window);
url.clearParameters();
url.setWindowState(WindowState.MAXIMIZED);
XMLUtils.createElement(contenthandler, "fullscreen-uri", url.toString());
}
// portlet modes
final String pmString = (String)copletInstanceData.getTemporaryAttribute("portlet-mode");
PortletMode pm;
if ( pmString == null ) {
pm = PortletMode.VIEW;
} else {
pm = new PortletMode(pmString);
}
if ( !pm.equals(PortletMode.EDIT) ) {
PortletURLProviderImpl url = (PortletURLProviderImpl)dip.getPortletURLProvider(window);
url.clearParameters();
url.setPortletMode(PortletMode.EDIT);
XMLUtils.createElement(contenthandler, "edit-uri", url.toString());
}
if ( !pm.equals(PortletMode.HELP) ) {
PortletURLProviderImpl url = (PortletURLProviderImpl)dip.getPortletURLProvider(window);
url.clearParameters();
url.setPortletMode(PortletMode.HELP);
XMLUtils.createElement(contenthandler, "help-uri", url.toString());
}
if ( !pm.equals(PortletMode.VIEW) ) {
PortletURLProviderImpl url = (PortletURLProviderImpl)dip.getPortletURLProvider(window);
url.clearParameters();
url.setPortletMode(PortletMode.VIEW);
XMLUtils.createElement(contenthandler, "view-uri", url.toString());
}
}
}
context.invokeNext( layout, service, contenthandler );