01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * 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 and
15: * limitations under the License.
16: */
17: package org.apache.jetspeed.container.state.impl;
18:
19: import java.io.Serializable;
20:
21: import javax.portlet.PortletMode;
22: import javax.portlet.WindowState;
23:
24: /**
25: * PortletWindowBaseNavigationalState
26: *
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: */
30: public class PortletWindowBaseNavigationalState implements Serializable {
31: private String modeName;
32: private String stateName;
33:
34: private transient PortletMode portletMode;
35: private transient WindowState windowState;
36:
37: public PortletMode getPortletMode() {
38: if (portletMode == null && modeName != null) {
39: portletMode = new PortletMode(modeName);
40: }
41: return portletMode;
42: }
43:
44: public void setPortletMode(PortletMode portletMode) {
45: this .portletMode = portletMode;
46: this .modeName = portletMode == null ? null : portletMode
47: .toString();
48: }
49:
50: public WindowState getWindowState() {
51: if (windowState == null && stateName != null) {
52: windowState = new WindowState(stateName);
53: }
54: return windowState;
55: }
56:
57: public void setWindowState(WindowState windowState) {
58: this.windowState = windowState;
59: this.stateName = windowState == null ? null : windowState
60: .toString();
61: }
62: }
|