1/*2 * Licensed to the Apache Software Foundation (ASF) under one or more3 * contributor license agreements. See the NOTICE file distributed with4 * this work for additional information regarding copyright ownership.5 * The ASF licenses this file to You under the Apache License, Version 2.06 * (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 * 9 * http://www.apache.org/licenses/LICENSE-2.010 * 11 * Unless required by applicable law or agreed to in writing, software12 * distributed under the License is distributed on an "AS IS" BASIS,13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.14 * See the License for the specific language governing permissions and15 * limitations under the License.16 */17packageorg.apache.jetspeed.container.state.impl;
1819import java.io.Serializable;
2021import javax.portlet.PortletMode;
22import javax.portlet.WindowState;
2324/***25 * PortletWindowBaseNavigationalState26 *27 * @author <a href="mailto:ate@apache.org">Ate Douma</a>28 * @version $Id: PortletWindowBaseNavigationalState.java 516448 2007-03-09 16:25:47Z ate $29 */30publicclassPortletWindowBaseNavigationalState implements Serializable
31 {
32private String modeName;
33private String stateName;
3435privatetransient PortletMode portletMode;
36privatetransient WindowState windowState;
3738public PortletMode getPortletMode()
39 {
40if ( portletMode == null && modeName != null )
41 {
42 portletMode = new PortletMode(modeName);
43 }
44return portletMode ;
45 }
4647publicvoid setPortletMode(PortletMode portletMode)
48 {
49this.portletMode = portletMode;
50this.modeName = portletMode == null ? null : portletMode.toString();
51 }
5253public WindowState getWindowState()
54 {
55if ( windowState == null && stateName != null )
56 {
57 windowState = new WindowState(stateName);
58 }
59return windowState;
60 }
6162publicvoid setWindowState(WindowState windowState)
63 {
64this.windowState = windowState;
65this.stateName = windowState == null ? null : windowState.toString();
66 }
67 }