01: /**
02: * $Id: MastheadBean.java,v 1.4 2006/01/26 22:20:48 hc109819 Exp $
03: * Copyright 2005 Sun Microsystems, Inc. All
04: * rights reserved. Use of this product is subject
05: * to license terms. Federal Acquisitions:
06: * Commercial Software -- Government Users
07: * Subject to Standard License Terms and
08: * Conditions.
09: *
10: * Sun, Sun Microsystems, the Sun logo, and Sun ONE
11: * are trademarks or registered trademarks of Sun Microsystems,
12: * Inc. in the United States and other countries.
13: */package com.sun.portal.admin.console.common;
14:
15: import java.io.IOException;
16: import java.util.logging.Level;
17: import javax.servlet.http.HttpSession;
18: import com.sun.portal.admin.console.util.JMXHelpers;
19: import javax.faces.context.FacesContext;
20: import javax.faces.el.VariableResolver;
21:
22: public class MastheadBean extends PSBaseBean {
23:
24: /** Creates a new instance of MastheadBean */
25: public MastheadBean() {
26: }
27:
28: public String getUid() {
29: return getUID();
30: }
31:
32: /*
33: public void setUid(String id) {
34: uid = id;
35: }
36: */
37: public String help() {
38: return "";
39: }
40:
41: public String version() {
42: return "";
43: }
44:
45: public String logout() {
46: try {
47: closeConnection();
48: } catch (IOException ioe) {
49: PSBaseBean
50: .log(
51: Level.SEVERE,
52: "Exception closing the JMX connector : MastheadBean.logout()",
53: ioe);
54: }
55: resetAuthCredential();
56: return "logout";
57: }
58:
59: public static MastheadBean getCurrentInstance() {
60: VariableResolver vr = FacesContext.getCurrentInstance()
61: .getApplication().getVariableResolver();
62: Object obj = vr.resolveVariable(FacesContext
63: .getCurrentInstance(), "MastheadBean");
64: if ((obj != null) && (obj instanceof MastheadBean)) {
65: return (MastheadBean) obj;
66: }
67: return null;
68: }
69: }
|