SMProfileViewBean.java revision b3ccab776ea1230611ef6a611ccfdb7963192b82
/**
* 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: SMProfileViewBean.java,v 1.3 2009/10/13 21:17:03 asyhuang Exp $
*
*/
public class SMProfileViewBean
extends SMViewBeanBase
implements HasEntitiesTabs
{
public static final String DEFAULT_DISPLAY_URL =
private static final String TBL_COL_MAX_SESSION_TIME =
"tblColMaxSessionTime";
private static final String TBL_DATA_MAX_SESSION_TIME =
"tblDataMaxSessionTime";
private CCPageTitleModel ptModel;
protected int curPage = 0;
private boolean validSession = true;
/**
* Creates a default named session view bean.
*/
public SMProfileViewBean() {
super("SMProfile");
ptModel = new CCPageTitleModel(
}
/**
* Creates a session view bean by name.
*/
super(name);
ptModel = new CCPageTitleModel(
}
/**
* Registers user interface components used by this view bean.
*/
protected void registerChildren() {
super.registerChildren();
ptModel.registerChildren(this);
tblModel.registerChildren(this);
}
/**
* Creates user interface components used by this view bean.
*
* @param name of component
* @return child component
*/
} else {
}
return view;
}
/**
* Sets the required information to display the page.
*
* @param event display event.
* @throws ModelControlException if problem access value of component.
*/
throws ModelControlException
{
if (validSession) {
super.beginDisplay(event);
}
}
}
try {
"message.warning", errorMessage);
}
}
} catch (AMConsoleException ae) {
}
}
// Set our Sub-Tabs
}
}
}
/**
* Returns model for this view bean.
*
* @return model for view bean.
*/
protected AMModel getModelInternal() {
}
private void createTableModel() {
tblModel = new CCActionTableModel(
"table.session.userid.column.name");
"table.session.timeleft.column.name");
"table.session.maxsessiontime.column.name");
"table.session.idletime.column.name");
"table.session.maxidletime.column.name");
}
/**
* Returns filter (wildcards) string.
*
* @return filter string.
*/
protected String getFilterString() {
filter = "*";
} else {
filter = "*";
}
}
return filter;
}
}
} else {
}
}
/**
* Handles search request.
*
* @param event Request Invocation Event.
*/
forwardTo();
}
/**
* Handles the event request for <i>Invalidate</i> button.
*
* @param event request invocation event.
* @throws ModelControlException if table model cannot be restored.
*/
throws ModelControlException
{
}
boolean error = false;
try {
} catch (AMConsoleException e) {
error = true;
e.getMessage());
}
// TOFIX: need to display mutiple message.
}
if (!model.isSessionValid()) {
validSession = false;
}
forwardTo();
}
/**
* Handles the event request for dropdown menu.
*
* @param event request invocation event.
*/
forwardTo();
}
/**
* Returns true if the current session is invalid.
*
* @param event child display event.
* @return true if the current session is invalid.
*/
boolean display = false;
if (!validSession) {
display = true;
}
return display;
}
}