/** * 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 * https://opensso.dev.java.net/public/CDDLv1.0.html or * opensso/legal/CDDLv1.0.txt * 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: SAMLPropertyTemplate.java,v 1.5 2008/12/19 18:58:45 farble1670 Exp $ * */ package com.sun.identity.console.federation; import com.sun.identity.saml.common.SAMLConstants; import java.util.HashMap; import java.util.Map; public class SAMLPropertyTemplate { private static Map templates = new HashMap(); private static Map readonlyTemplates = new HashMap(); private static Map sections = new HashMap(); public static final String CONFIRM_SUFFIX = "_confirm"; static { templates.put(SAMLConstants.PARTNERNAME, ""); readonlyTemplates.put(SAMLConstants.PARTNERNAME, ""); templates.put(SAMLConstants.SOURCEID, ""); readonlyTemplates.put(SAMLConstants.SOURCEID, ""); templates.put(SAMLConstants.TARGET, ""); readonlyTemplates.put(SAMLConstants.TARGET, ""); templates.put(SAMLConstants.POSTURL, ""); readonlyTemplates.put(SAMLConstants.POSTURL, ""); templates.put(SAMLConstants.ATTRIBUTEMAPPER, ""); readonlyTemplates.put(SAMLConstants.ATTRIBUTEMAPPER, ""); templates.put(SAMLConstants.ACTIONMAPPER, ""); readonlyTemplates.put(SAMLConstants.ACTIONMAPPER, ""); templates.put(SAMLConstants.SITEATTRIBUTEMAPPER, ""); readonlyTemplates.put(SAMLConstants.SITEATTRIBUTEMAPPER, ""); templates.put(SAMLConstants.NAMEIDENTIFIERMAPPER, ""); readonlyTemplates.put(SAMLConstants.NAMEIDENTIFIERMAPPER, ""); templates.put(SAMLConstants.SOAPUrl, ""); readonlyTemplates.put(SAMLConstants.SOAPUrl, ""); templates.put(SAMLConstants.ACCOUNTMAPPER, ""); readonlyTemplates.put(SAMLConstants.ACCOUNTMAPPER, ""); templates.put(SAMLConstants.AUTHTYPE, ""); readonlyTemplates.put(SAMLConstants.AUTHTYPE, ""); templates.put(SAMLConstants.AUTH_UID, ""); readonlyTemplates.put(SAMLConstants.AUTH_UID, ""); templates.put(SAMLConstants.AUTH_PASSWORD, ""); readonlyTemplates.put(SAMLConstants.AUTH_PASSWORD, ""); templates.put(SAMLConstants.AUTH_PASSWORD + CONFIRM_SUFFIX, ""); readonlyTemplates.put(SAMLConstants.AUTH_PASSWORD + CONFIRM_SUFFIX, ""); templates.put(SAMLConstants.CERTALIAS, ""); readonlyTemplates.put(SAMLConstants.CERTALIAS, ""); templates.put(SAMLConstants.ISSUER, ""); readonlyTemplates.put(SAMLConstants.ISSUER, ""); templates.put(SAMLConstants.SAMLURL, ""); readonlyTemplates.put(SAMLConstants.SAMLURL, ""); templates.put(SAMLConstants.HOST_LIST, ""); readonlyTemplates.put(SAMLConstants.HOST_LIST, ""); templates.put(SAMLConstants.VERSION, ""); readonlyTemplates.put(SAMLConstants.VERSION, ""); sections.put(SAMLProperty.COMMON_SETTINGS, "
"); sections.put(SAMLProperty.ROLE_DESTINATION, "
"); sections.put(SAMLProperty.ROLE_SOURCE, "
"); sections.put(SAMLProperty.METHOD_ARTIFACT, ""); sections.put(SAMLProperty.METHOD_POST, ""); sections.put(SAMLProperty.METHOD_SOAP, ""); } static final String DESTINATION_SOAP_ISSUER_XML = ""; static final String DESTINATION_SOAP_ISSUER_XML_READONLY = ""; static final String EDIT_SETTING_XML = ""; static final String NO_ATTRIBUTE_CC = ""; private SAMLPropertyTemplate() { } static String getAttribute(String name, boolean readonly) { return (readonly) ? (String)readonlyTemplates.get(name) : (String)templates.get(name); } static String getSection(String name) { return (String)sections.get(name); } }