001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
005 *
006 * The contents of this file are subject to the terms
007 * of the Common Development and Distribution License
008 * (the License). You may not use this file except in
009 * compliance with the License.
010 *
011 * You can obtain a copy of the License at
012 * https://opensso.dev.java.net/public/CDDLv1.0.html or
013 * opensso/legal/CDDLv1.0.txt
014 * See the License for the specific language governing
015 * permission and limitations under the License.
016 *
017 * When distributing Covered Code, include this CDDL
018 * Header Notice in each file and include the License file
019 * at opensso/legal/CDDLv1.0.txt.
020 * If applicable, add the following below the CDDL Header,
021 * with the fields enclosed by brackets [] replaced by
022 * your own identifying information:
023 * "Portions Copyrighted [year] [name of copyright owner]"
024 *
025 * $Id: SiteAttributeMapper.java,v 1.2 2008/06/25 05:47:36 qcheng Exp $
026 *
027 */
028
029
030package com.sun.identity.saml.plugins;
031
032import com.sun.identity.saml.common.SAMLException;
033import java.util.List;
034
035/**
036 * This interface needs to be implemented by partner site to return a
037 * list of <code>Attribute</code> objects which they want returned
038 * as <code>AttributeStatements</code> elements, as part of the
039 * Authentication Assertion returned to the partner during the
040 * SSO scenario of Browser Artifact and POST profile.
041 * <p>
042 * Different partner would need to have a different implementation
043 * of the interface. The mappings between the partner source ID and 
044 * the implementation class are configured at the <code>Partner URLs</code> 
045 * field in SAML service.
046 * @deprecated This class has been deprecated. Please use
047 *      <code>PartnerSiteAttributeMapper</code> instead.
048 * @see PartnerSiteAttributeMapper
049 *
050 *
051 * @supported.all.api
052 */
053public interface SiteAttributeMapper {
054
055    /**
056     * Returns <code>List</code> of <code>Attribute</code> objects
057     *
058     * @param token User's session.
059     * @return <code>List</code> if <code>Attribute</code> objects.
060     *         <code>Attribute</code> is defined in the SAML SDK as part of
061     *         <code>com.sun.identity.saml.assertion</code> package.
062     * @throws SAMLException if attributes cannot be obtained.
063     */
064    public List getAttributes(Object token) throws SAMLException;
065}