SCServiceProfileViewBean.java revision 28de0461d82a4e6471c71d793af7a9492ca98dd3
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * The contents of this file are subject to the terms
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * of the Common Development and Distribution License
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * (the License). You may not use this file except in
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * compliance with the License.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * You can obtain a copy of the License at
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * https://opensso.dev.java.net/public/CDDLv1.0.html or
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * See the License for the specific language governing
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * permission and limitations under the License.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * When distributing Covered Code, include this CDDL
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Header Notice in each file and include the License file
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * If applicable, add the following below the CDDL Header,
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * with the fields enclosed by brackets [] replaced by
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * your own identifying information:
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * "Portions Copyrighted [year] [name of copyright owner]"
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * $Id: SCServiceProfileViewBean.java,v 1.7 2009/01/09 22:35:19 asyhuang Exp $
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Portions Copyrighted 2011-2015 ForgeRock AS.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Portions Copyrighted 2015 Nomura Research Institute, Ltd.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.iplanet.jato.model.ModelControlException;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.iplanet.jato.view.event.RequestInvocationEvent;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.authentication.util.AMAuthUtils;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.base.AMPropertySheet;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.base.AMServiceProfile;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.base.ScriptValidatorViewBean;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.base.model.AMAdminConstants;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.base.model.AMAdminUtils;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.base.model.AMConsoleException;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.base.model.AMPropertySheetModel;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.base.model.AMServiceProfileModel;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.base.model.SMSubConfig;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.components.view.html.SerializedField;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.service.model.SubConfigModel;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.service.model.SubConfigModelImpl;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.service.model.SubSchemaModel;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.console.service.model.SubSchemaModelImpl;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncimport com.sun.identity.sm.DynamicAttributeValidator;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsyncpublic class SCServiceProfileViewBean extends ScriptValidatorViewBean {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync public static final String PAGE_NAME = "SCServiceProfile";
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync private static final String validatorAttributeName = "ScriptValidator";
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync private boolean populatedSubConfigTable;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync * Creates a service profile view bean.
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync SCServiceProfileViewBean(String name, String defaultURL) {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync private void initService() {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync String serviceName = (String)getPageSessionAttribute(
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync SerializedField szCache = (SerializedField)getChild(SZ_CACHE);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync populateTableModel((List)szCache.getSerializedObj());
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync CCActionTableModel tblModel =(CCActionTableModel)tbl.getModel();
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync SerializedField szCache = (SerializedField)getChild(SZ_CACHE);
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync boolean firstEntry = true;
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync for (Iterator iter = subconfig.iterator(); iter.hasNext(); ) {
cf22150eaeeb72431bf1cf65c309a431454fb22bvboxsync conf.getLocalizedName() == null ? conf.getName() : conf.getLocalizedName());
throws NavigationException {
if (!submitCycle) {
boolean canCreate = false;
canCreate = true;
if (!dynamicRequest) {
throws AMConsoleException {
return new SubSchemaModelImpl(
} catch (AMConsoleException e) {
e.getMessage());
return null;
return new SubConfigModelImpl(
} catch (AMConsoleException e) {
e.getMessage());
return null;
public void handleTblSubConfigButtonAddRequest(
SubConfigAddViewBean.class);
forwardTo();
private void addViewBeanClassToPageSession() {
public void handleTblSubConfigButtonDeleteRequest(
) throws ModelControlException {
submitCycle = true;
} catch (AMConsoleException e) {
e.getMessage());
submitCycle = false;
forwardTo();
SubConfigEditViewBean.class);
backTrail();
} catch (ClassNotFoundException e) {
protected boolean startPageTrail() {
} catch (Exception e) {
forwardTo();