01: /*
02: * Copyright (C) 2004 TiongHiang Lee
03: *
04: * This library is free software; you can redistribute it and/or
05: * modify it under the terms of the GNU Lesser General Public
06: * License as published by the Free Software Foundation; either
07: * version 2.1 of the License, or (at your option) any later version.
08: *
09: * This library is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12: * Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public
15: * License along with this library; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: *
18: * Email: thlee@onemindsoft.org
19: */
20:
21: package org.onemind.jxp;
22:
23: /**
24: * Represent a cached page source
25: * @author TiongHiang Lee (thlee@onemindsoft.org)
26: *
27: */
28: public final class CachedJxpPage extends JxpPage {
29: /** the source specific page timestamp **/
30: private long _pageTimestamp;
31:
32: /**
33: * {@inheritDoc}
34: */
35: public CachedJxpPage(JxpPageSource source, String name,
36: String encoding) {
37: super (source, name, encoding);
38: }
39:
40: /**
41: * Return the timestamp
42: * @return the page timestamp.
43: */
44: public final long getPageTimestamp() {
45: return _pageTimestamp;
46: }
47:
48: /**
49: * Set the timestamp
50: * @param pageTimestamp The timestamp.
51: */
52: public final void setPageTimepstamp(long pageTimestamp) {
53: _pageTimestamp = pageTimestamp;
54: }
55:
56: /**
57: * {@inheritDoc}
58: */
59: public final Object declareStaticVariable(String name, Object value) {
60: return ((CachingPageSource) getSource())
61: .declarePageStaticVariable(this , name, value);
62: }
63:
64: /**
65: * {@inheritDoc}
66: */
67: public final boolean hasStaticVariable(String name) {
68: return ((CachingPageSource) getSource()).hasPageStaticVariable(
69: this , name);
70: }
71:
72: /**
73: * {@inheritDoc}
74: */
75: public final Object getStaticVariable(String name) {
76: return ((CachingPageSource) getSource()).getPageStaticVariable(
77: this , name);
78: }
79:
80: /**
81: * {@inheritDoc}
82: */
83: public Object assignStaticVariable(String name, Object value) {
84: return ((CachingPageSource) getSource())
85: .assignPageStaticVariable(this, name, value);
86: }
87: }
|