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: */package org.apache.geronimo.console.gbean;
17:
18: import org.apache.geronimo.gbean.GBeanInfo;
19: import org.apache.geronimo.gbean.GBeanInfoBuilder;
20:
21: /**
22: * A GBean that implements ContextForward. This way any Geronimo module can
23: * add forwards to the console.
24: *
25: * @version $Rev: 476061 $ $Date: 2006-11-16 22:36:50 -0800 (Thu, 16 Nov 2006) $
26: */
27: public class ContextForwardGBean implements ContextForward {
28: private String portalPathPrefix;
29: private String portletContextPath;
30: private String portletServletPath;
31:
32: public ContextForwardGBean(String portalPathPrefix,
33: String portletContextPath, String portletServletPath) {
34: this .portalPathPrefix = portalPathPrefix;
35: this .portletContextPath = portletContextPath;
36: this .portletServletPath = portletServletPath;
37: }
38:
39: public String getPortalPathPrefix() {
40: return portalPathPrefix;
41: }
42:
43: public String getPortletContextPath() {
44: return portletContextPath;
45: }
46:
47: public String getPortletServletPath() {
48: return portletServletPath;
49: }
50:
51: public static final GBeanInfo GBEAN_INFO;
52: static {
53: GBeanInfoBuilder infoFactory = GBeanInfoBuilder
54: .createStatic(ContextForwardGBean.class);
55: infoFactory.addAttribute("portalPathPrefix", String.class,
56: true, true);
57: infoFactory.addAttribute("portletContextPath", String.class,
58: true, true);
59: infoFactory.addAttribute("portletServletPath", String.class,
60: true, true);
61: infoFactory.addInterface(ContextForward.class);
62: infoFactory.setConstructor(new String[] { "portalPathPrefix",
63: "portletContextPath", "portletServletPath" });
64: GBEAN_INFO = infoFactory.getBeanInfo();
65: }
66:
67: public static GBeanInfo getGBeanInfo() {
68: return GBEAN_INFO;
69: }
70: }
|