01: /* Copyright 2004 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.container.services.information;
07:
08: import javax.portlet.PortletMode;
09: import javax.portlet.WindowState;
10:
11: import org.apache.pluto.om.window.PortletWindow;
12: import org.apache.pluto.services.information.PortletActionProvider;
13:
14: /**
15: * Implementation of Apache Pluto PortletActionProvider.
16: * @author Michael Ivanov, mvi@immagic.com
17: * @version $Revision: 35428 $
18: */
19: public class PortletActionProviderImpl implements PortletActionProvider {
20:
21: private PortletWindow portletWindow;
22:
23: public PortletActionProviderImpl(PortletWindow portletWindow) {
24: this .portletWindow = portletWindow;
25: }
26:
27: // PortletActionProvider methods
28: public void changePortletMode(PortletMode mode) {
29: if (mode != null) {
30: PortletStateManager.setMode(portletWindow, mode);
31: }
32: }
33:
34: public void changePortletWindowState(WindowState state) {
35: if (state != null) {
36: PortletStateManager.setState(portletWindow, state);
37: }
38: }
39:
40: }
|