ServerSiteViewBean.java revision 84b168a45ee7013336cbc64ac025285206c5fa31
/**
* 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: ServerSiteViewBean.java,v 1.3 2008/07/07 20:39:20 veiming Exp $
*
*/
/*
* Portions Copyrighted [2011] [ForgeRock AS]
*/
/**
* Servers and Sites Management main page.
*/
public class ServerSiteViewBean
extends AMPrimaryMastHeadViewBean
{
private static final String DEFAULT_DISPLAY_URL =
private static final String TBL_SERVER_BUTTON_CLONE =
"tblServerButtonClone";
private static final String TBL_SERVER_BUTTON_DELETE =
"tblServerButtonDelete";
private static final String TBL_DATA_SERVER_ACTION_HREF =
"tblDataServerActionHref";
private static final String TBL_SITE_BUTTON_DELETE =
"tblSiteButtonDelete";
private static final String TBL_DATA_SITE_ACTION_HREF =
"tblDataSiteActionHref";
private CCActionTableModel tblServerModel;
private CCActionTableModel tblSiteModel;
private CCPageTitleModel ptModel;
/**
* Creates a servers and sites view bean.
*/
public ServerSiteViewBean() {
super("ServerSite");
ptModel = new CCPageTitleModel(
}
protected void registerChildren() {
super.registerChildren();
ptModel.registerChildren(this);
tblServerModel.registerChildren(this);
tblSiteModel.registerChildren(this);
}
} else {
}
return view;
}
/**
* Displays servers and sites information.
*
* @param event Display Event.
* @throws ModelControlException if unable to initialize model.
*/
throws ModelControlException
{
if (isXuiAdminConsoleEnabled()) {
} else {
super.beginDisplay(event);
}
getSiteNames();
}
protected AMModel getModelInternal() {
}
private void createTableModel() {
tblSiteModel = new CCActionTableModel(
"com/sun/identity/console/tblSite.xml"));
"table.site.button.new");
"table.site.button.delete");
"table.site.name.column.name");
"table.site.url.column.name");
"table.site.servers.column.name");
tblServerModel = new CCActionTableModel(
"com/sun/identity/console/tblServer.xml"));
"table.server.button.new");
"table.server.button.delete");
"table.server.button.clone");
"table.server.name.column.name");
"table.server.site.column.name");
}
private void getSiteNames() {
try {
}
} else {
}
}
} catch (AMConsoleException e) {
e.getMessage());
}
}
private void getServerNames() {
try {
}
} catch (AMConsoleException e) {
e.getMessage());
}
}
int counter = 0;
) {
if (counter > 0) {
}
stringToHex(name));
}
} else {
}
}
int counter = 0;
) {
if (counter > 0) {
}
}
} else {
}
}
/**
* Forwards request to site creation view bean.
*
* @param event Request Invocation Event.
*/
SiteAddViewBean.class);
}
/**
* Forwards request to server clone view bean.
*
* @param event Request Invocation Event.
*/
throws ModelControlException {
ServerCloneViewBean.class);
}
/**
* Forwards request to server creation view bean.
*
* @param event Request Invocation Event.
*/
ServerAddViewBean.class);
}
/**
* Deletes server.
*
* @param event Request Invocation Event.
* @throws ModelControlException if table model cannot be restored.
*/
throws ModelControlException
{
}
try {
"serverconfig.message.deleted");
} else {
"serverconfig.message.deleted.pural");
}
} catch (AMConsoleException e) {
e.getMessage());
}
forwardTo();
}
/**
* Deletes site.
*
* @param event Request Invocation Event.
* @throws ModelControlException if table model cannot be restored.
*/
throws ModelControlException
{
}
try {
"siteconfig.message.deleted");
} else {
"siteconfig.message.deleted.pural");
}
} catch (AMConsoleException e) {
e.getMessage());
}
forwardTo();
}
/**
* Handles edit site request.
*
* @param event Request Invocation Event.
* @throws ModelControlException if table model cannot be restored.
*/
throws ModelControlException {
SiteEditViewBean.class);
}
/**
* Handles edit server request.
*
* @param event Request Invocation Event.
* @throws ModelControlException if table model cannot be restored.
*/
public void handleTblDataServerActionHrefRequest(
) throws ModelControlException {
}
int idxTab = 421;
}
try {
} catch (AMConsoleException e) {
e.getMessage());
}
}
}
protected String getBreadCrumbDisplayName() {
return "breadcrumbs.server.config";
}
}