0N/A/**
2362N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
0N/A *
0N/A * Copyright (c) 2007 Sun Microsystems Inc. All Rights Reserved
0N/A *
0N/A * The contents of this file are subject to the terms
2362N/A * of the Common Development and Distribution License
0N/A * (the License). You may not use this file except in
2362N/A * compliance with the License.
0N/A *
0N/A * You can obtain a copy of the License at
0N/A * https://opensso.dev.java.net/public/CDDLv1.0.html or
0N/A * opensso/legal/CDDLv1.0.txt
0N/A * See the License for the specific language governing
0N/A * permission and limitations under the License.
0N/A *
0N/A * When distributing Covered Code, include this CDDL
0N/A * Header Notice in each file and include the License file
0N/A * at opensso/legal/CDDLv1.0.txt.
0N/A * If applicable, add the following below the CDDL Header,
2362N/A * with the fields enclosed by brackets [] replaced by
2362N/A * your own identifying information:
2362N/A * "Portions Copyrighted [year] [name of copyright owner]"
0N/A *
0N/A * $Id: SCSOAPBindingRequestHandlerListDupViewBean.java,v 1.3 2008/06/25 05:49:44 qcheng Exp $
0N/A *
0N/A */
0N/A
0N/Apackage com.sun.identity.console.service;
0N/A
0N/Aimport com.iplanet.jato.model.ModelControlException;
0N/Aimport com.iplanet.jato.view.event.DisplayEvent;
0N/Aimport com.sun.identity.shared.datastruct.OrderedSet;
0N/Aimport com.sun.identity.console.service.model.SCSOAPBindingModelImpl;
0N/Aimport com.sun.identity.console.service.model.SOAPBindingRequestHandler;
0N/Aimport java.util.Map;
0N/A
0N/Apublic class SCSOAPBindingRequestHandlerListDupViewBean
0N/A extends SCSOAPBindingRequestHandlerListAddViewBean
0N/A{
0N/A public static final String DEFAULT_DISPLAY_URL =
0N/A "/console/service/SCSOAPBindingRequestHandlerListDup.jsp";
0N/A private int dupIndex = -1;
0N/A
0N/A public SCSOAPBindingRequestHandlerListDupViewBean() {
0N/A super("SCSOAPBindingRequestHandlerListDup", DEFAULT_DISPLAY_URL);
0N/A }
0N/A
0N/A protected String getPageTitleText() {
0N/A return "soapBinding.service.requestHandlerList.duplicate.page.title";
0N/A }
0N/A
0N/A void setDupIndex(int index) {
0N/A dupIndex = index;
0N/A }
0N/A
0N/A public void beginDisplay(DisplayEvent event)
0N/A throws ModelControlException {
0N/A super.beginDisplay(event);
0N/A
0N/A if (dupIndex != -1) {
0N/A Map mapAttrs = (Map)getPageSessionAttribute(
0N/A SCSOAPBindingViewBean.PROPERTY_ATTRIBUTE);
0N/A OrderedSet set = (OrderedSet)mapAttrs.get(
0N/A SCSOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
0N/A setValues((String)set.get(dupIndex));
0N/A }
0N/A }
0N/A
0N/A protected void setValues(String value) {
0N/A SOAPBindingRequestHandler entry = new
0N/A SOAPBindingRequestHandler(value);
0N/A String newKey = entry.strKey +
0N/A getModel().getLocalizedString(
0N/A "soapBinding.service.table.requestHandlerList.action.dup.copy");
0N/A propertySheetModel.setValue(ATTR_KEY, newKey);
0N/A propertySheetModel.setValue(ATTR_CLASS, entry.strClass);
0N/A
0N/A if (entry.strSOAPAction != null) {
0N/A propertySheetModel.setValue(ATTR_ACTION, entry.strSOAPAction);
0N/A }
0N/A }
0N/A protected String getBreadCrumbDisplayName() {
0N/A return "breadcrumbs.webservices.soapbinding.requesthandlerlist.dup";
0N/A }
0N/A
0N/A protected boolean startPageTrail() {
0N/A return false;
0N/A }
0N/A}
0N/A