SessionHAPropertiesViewBean.java revision aee26cce86cd7acccbcd94284b027d11cb9ac327
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * The contents of this file are subject to the terms
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * of the Common Development and Distribution License
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * (the License). You may not use this file except in
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * compliance with the License.
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * You can obtain a copy of the License at
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * https://opensso.dev.java.net/public/CDDLv1.0.html or
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * See the License for the specific language governing
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * permission and limitations under the License.
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * When distributing Covered Code, include this CDDL
8cf870d281dc8c242f083d14dfef05f24aa5fceeJnRouvignac * Header Notice in each file and include the License file
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * If applicable, add the following below the CDDL Header,
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * with the fields enclosed by brackets [] replaced by
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * your own identifying information:
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * "Portions Copyrighted [year] [name of copyright owner]"
4323400c50c6c6f278c473544883e91ac4c0e781ludo * $Id: SessionHAPropertiesViewBean.java,v 1.2 2008/06/25 05:43:12 qcheng Exp $
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoffimport com.iplanet.jato.view.event.RequestInvocationEvent;
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoffimport com.sun.identity.console.base.model.AMConsoleException;
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoffimport com.sun.identity.console.base.model.AMPropertySheetModel;
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoffimport com.sun.identity.console.session.model.SMProfileModel;
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoffimport com.sun.identity.console.session.model.SMProfileModelImpl;
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift private static final String PAGETITLE = "pgtitle";
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff private boolean initialized;
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * Creates a authentication domains view bean.
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift protected void initialize() {
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff String sessionAttribute = (String) getPageSessionAttribute(SESSION_HA_PROPERTIES);
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff protected void registerChildren() {
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff registerChild(SESSION_HA_PROPERTIES, AMPropertySheet.class);
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift view = new AMPropertySheet(this, psModel, name);
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift } else if ((psModel != null) && psModel.isChildSupported(name)) {
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff } else if ((ptModel != null) && ptModel.isChildSupported(name)) {
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift SMProfileModel model = (SMProfileModel) getModel();
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff String sessionAttribute = (String) getPageSessionAttribute(SESSION_HA_PROPERTIES);
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift (AMPropertySheet) getChild(SESSION_HA_PROPERTIES);
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff //ps.setAttributeValues(
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff // model.getAttributeValues(sessionAttribute), model);
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift //} catch (AMConsoleException a) {
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff // setInlineAlertMessage(CCAlert.TYPE_ERROR,
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff // "message.error", "no.properties");
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff // Set our Sub-Tabs and current position, relative to one.
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff private void createPageTitleModel() {
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff RequestContext rc = RequestManager.getRequestContext();
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff return new SMProfileModelImpl(req, getPageSessionAttributes());
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift protected void createPropertyModel(String modelName) {
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error",
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff e.getMessage() + ", File Not Found for ModelName:[" + modelName + "].");
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift * Handles save button request.
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift * @param event Request invocation event
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift public void handleButton1Request(RequestInvocationEvent event)
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift SMProfileModel model = (SMProfileModel) getModel();
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff (String) getPageSessionAttribute(SESSION_HA_PROPERTIES);
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff //AMPropertySheet ps = (AMPropertySheet) getChild(SESSION_HA_PROPERTIES);
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff //Map orig = model.getAttributeValues(name);
7185b49f58c4cdb16d035ecc45e38ec9b1cd9bd0matthew_swift //Map values = ps.getAttributeValues(orig, true, true, model);
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff //model.setAttributeValues(name, values);
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information",
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff "message.updated");
4323400c50c6c6f278c473544883e91ac4c0e781ludo //} catch (AMConsoleException e) {
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff // setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error",
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff // e.getMessage());
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * Handles reset request.
9448ac32f12d59ed3d29eaf65703f4abe866c3eblutoff * @param event Request invocation event