AMPrimaryMastHeadViewBean.java revision c779e0e7411f4cc42604ef0033ebbfd4af99e13a
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: AMPrimaryMastHeadViewBean.java,v 1.11 2009/08/18 22:38:10 veiming Exp $
*
*/
/*
* Portions Copyrighted 2011-2012 ForgeRock Inc
*/
/**
* This is the base class for all view beans that have primary
* <code>masthead</code> in Console.
*/
public abstract class AMPrimaryMastHeadViewBean
extends AMViewBeanBase
implements CCNodeEventHandlerInterface
{
static {
}
/**
* Creates an instance of base view bean object.
*
* @param name Name of page.
*/
super(name);
}
super.setRequestContext(rc);
}
}
if (!handleRealmNameInTabSwitch(rc)) {
}
}
boolean forwarded = false;
// Need to default realm name if it is not even set at this point.
}
//check to see if class is in the noneeddealwith bean
forwarded = true;
}
}
return forwarded;
}
/**
* Registers user interface components used by this view bean.
*/
protected void registerChildren() {
super.registerChildren();
}
/**
* Creates user interface components used by this view bean.
*
* @param name of component
* @return child component
*/
this, createMastheadModel(), name);
} else {
}
return view;
}
throws ModelControlException {
beginDisplay(event, true);
}
// this allows dervived class to delay the setting of selected tab node.
throws ModelControlException {
super.beginDisplay(event);
getRequestContext().getRequest());
}
if (setSelectedTabNode) {
}
}
int id = 1;
}
} else {
try {
} catch (NumberFormatException e) {
"AMPrimaryMastHeadVB.setSelectedTabNode", e);
}
}
}
}
private CCMastheadModel createMastheadModel() {
/*
* set the logo; can be different for each realm based on
* the console jsp directory attribute.
*/
/*
* enable some of the masthead display features...
* turn off the date, does not provide anything valid and is
* issue for localization
*/
mm.setShowDate(false);
mm.setShowServer(true);
mm.setShowUserRole(true);
return mm;
}
private String getUserDisplayName() {
}
return name;
}
/**********************************************************************
*
* code to handle tab related functionality
*
**********************************************************************/
protected void createTabModel() {
}
}
}
/**
* Handles tab selected event.
*
* @param event Request Invocation Event.
* @param nodeID Selected Node ID.
*/
try {
} catch (AMConsoleException e) {
forwardTo();
}
}
/**
* Pass session attribute map to other view bean.
*
* @param other view bean
*/
/*
* This method does not carry over page session attributes
* from on tab set to another.
*/
}
}
/**
* Returns view bean for a tab.
*
* @param tabSetName Name of tab set.
* @param nodeID Node ID.
* @return view bean for a tab.
* @throws AMConsoleException if view bean cannot be found.
*/
protected AMViewBeanBase getTabNodeAssociatedViewBean(
int nodeID
) throws AMConsoleException {
AMViewBeanBase v = null;
getRequestContext().getRequest());
}
return vb;
}
private int getChildNodeId(int nodeID) {
int childNodeId = -1;
childNodeId = c.getId();
}
}
return childNodeId;
}
protected String getTrackingTabIDName() {
return "opensso.SelectedTabId";
}
boolean isRoot = false;
{
isRoot = true;
}
return isRoot;
}
private PageTrail getPageTrail() {
}
private String getPageTrailID() {
if (pageTrailID == null) {
}
return pageTrailID;
}
protected void initPageTrail()
throws AMConsoleException
{
if (swap) {
}
if (initPageTrail == null) {
if (pageTrailID != null) {
}
throw new AMConsoleException("unable to get page trail");
}
}
if (displayName != null) {
if (swap) {
} else if (startPageTrail()) {
} else {
}
}
}
}
}
}
}
if (size >= 1) {
size--;
for (int i = 0; i < size; i++) {
}
} else {
}
} else {
}
}
protected String getBreadCrumbDisplayName() {
return null;
}
protected boolean startPageTrail() {
return true;
}
public void unlockPageTrail() {
}
public void unlockPageTrailForSwapping() {
}
public void lockPageTrail() {
}
try {
try {
} catch (ClassNotFoundException e) {
forwardTo();
}
} catch (AMConsoleException e) {
AMAdminFrameViewBean.class);
}
} else {
AMAdminFrameViewBean.class);
}
}
}