ServerEditViewBeanBase.java revision d97b7ab26c446ed6c58b71c45249970c62f876f8
/*
* 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: ServerEditViewBeanBase.java,v 1.3 2008/09/11 16:33:16 veiming Exp $
*
* Portions Copyrighted 2011-2015 ForgeRock AS.
*/
/**
* Base class for server profile view bean.
*/
public abstract class ServerEditViewBeanBase
extends AMPrimaryMastHeadViewBean
{
private CCPageTitleModel ptModel;
private AMPropertySheetModel propertySheetModel;
protected boolean submitCycle;
/**
* Creates a edit server configuration view bean.
*/
super(name);
}
protected void initialize() {
if (!initialized) {
if (serverName != null) {
super.initialize();
initialized = true;
}
}
}
protected void registerChildren() {
super.registerChildren();
ptModel.registerChildren(this);
}
} else if ((propertySheetModel != null) &&
) {
} else {
}
return view;
}
protected AMModel getModelInternal() {
}
/**
* Displays the profile of a site.
*/
throws ModelControlException
{
super.beginDisplay(event);
try {
} catch (AMConsoleException e) {
e.getMessage());
}
}
throws AMConsoleException {
if (!submitCycle) {
} else {
if (view instanceof CCCheckBox) {
} else {
}
}
}
}
}
}
private void createPageTitleModel() {
ptModel = new CCPageTitleModel(
}
getRequestContext().getRequest());
}
}
}
try {
} else {
i.remove();
}
}
if (!textValues.isEmpty()) {
}
} catch (AMConsoleException e) {
e.getMessage());
}
// this is because default server configuration does not have
// parent site.
}
while (start != -1) {
}
return names;
}
value = "";
}
if (idx != -1) {
// If we find a Password field, obfuscate the value before it is shown.
value = "********";
} else {
}
}
}
return xml;
}
protected void modifyProperties() {
try {
"serverconfig.updated");
} catch (UnknownPropertyNameException e) {
// ignore, this cannot happen because properties on this page
// are pre checked.
} catch (AMConsoleException e) {
e.getMessage());
}
}
if (view instanceof CCCheckBox) {
}
if (view instanceof CCPassword) {
// If the value is not the same as the random value then it has been updated =>
// encrypt and include in the map of attribute values to save
}
} else {
}
}
return map;
}
/**
* Handles reset request.
*
* @param event Request invocation event
*/
forwardTo();
}
/**
* Handles return to home page request.
*
* @param event Request invocation event
*/
throws ModelControlException {
}
throws ModelControlException {
}
/**
* Handles tab selected event.
*
* @param event Request Invocation Event.
* @param nodeID Selected Node ID.
*/
try {
"cscGeneral", nodeID);
} catch (AMConsoleException e) {
forwardTo();
}
}
private void returnToHomePage() {
backTrail();
ServerSiteViewBean.class);
}
protected String getBreadCrumbDisplayName() {
return "breadcrumbs.editserver";
}
protected boolean startPageTrail() {
return false;
}
protected String getBackButtonLabel() {
return getBackButtonLabel("page.title.serversite.config");
}
//General Tab View Bean will overwrite this.
return xml;
}
protected String getTrackingTabIDName() {
return TAB_TRACKER;
}
protected abstract String getPropertyXML();
private static final String TEXT_TEMPLATE =
"<cc name=\"{0}\" tagclass=\"com.sun.web.ui.taglib.html.CCStaticTextFieldTag\"><attribute name=\"defaultValue\" value=\"{1}\" /></cc>";
}