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: AttributeStatement.java,v 1.2 2008/06/25 05:47:40 qcheng Exp $
026 *
027 * Portions Copyrighted 2015 ForgeRock AS.
028 */
029
030package com.sun.identity.saml2.assertion;
031
032import java.util.List;
033
034import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
035import com.sun.identity.saml2.assertion.impl.AttributeStatementImpl;
036import com.sun.identity.saml2.assertion.impl.SubjectImpl;
037import com.sun.identity.saml2.common.SAML2Exception;
038
039/**
040 * The <code>AttributeStatement</code> element describes a statement by
041 * the SAML authority asserting that the assertion subject is associated with
042 * the specified attributes. It is of type <code>AttributeStatementType</code>.
043 * <p>
044 * <pre>
045 * &lt;complexType name="AttributeStatementType">
046 *   &lt;complexContent>
047 *     &lt;extension base="{urn:oasis:names:tc:SAML:2.0:assertion}
048 *     StatementAbstractType">
049 *       &lt;choice maxOccurs="unbounded">
050 *         &lt;element ref="{urn:oasis:names:tc:SAML:2.0:assertion}Attribute"/>
051 *         &lt;element ref="{urn:oasis:names:tc:SAML:2.0:assertion}
052 *         EncryptedAttribute"/>
053 *       &lt;/choice>
054 *     &lt;/extension>
055 *   &lt;/complexContent>
056 * &lt;/complexType>
057 * </pre>
058 * @supported.all.api
059 */
060@JsonDeserialize(as=AttributeStatementImpl.class)
061public interface AttributeStatement extends Statement {
062
063    /**
064     * Returns <code>Attribute</code>(s) of the statement. 
065     *
066     * @return List of <code>Attribute</code>(s) in the statement.
067     * @see #setAttribute(List)
068     */
069    List<Attribute> getAttribute();
070
071    /**
072     * Sets <code>Attribute</code>(s) of the statement.
073     *
074     * @param value List of new <code>Attribute</code>(s).
075     * @throws SAML2Exception if the object is immutable.
076     * @see #getAttribute()
077     */
078    void setAttribute(List<Attribute> value) throws SAML2Exception;
079
080    /**
081     * Returns <code>EncryptedAttribute</code>(s) of the statement. 
082     *
083     * @return List of <code>EncryptedAttribute</code>(s) in the statement.
084     * @see #setEncryptedAttribute(List)
085     */
086    List<EncryptedAttribute> getEncryptedAttribute();
087
088    /**
089     * Sets <code>EncryptedAttribute</code>(s) of the statement.
090     *
091     * @param value List of new <code>EncryptedAttribute</code>(s).
092     * @throws SAML2Exception if the object is immutable.
093     * @see #getEncryptedAttribute()
094     */
095    void setEncryptedAttribute(List<EncryptedAttribute> value) throws SAML2Exception;
096
097}
098