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: Artifact.java,v 1.2 2008/06/25 05:47:55 qcheng Exp $
026 *
027 */
028
029
030
031package com.sun.identity.saml2.protocol;
032
033import com.sun.identity.saml2.common.SAML2Exception;
034
035/**
036 * This class represents the <code>Artifact</code> element in
037 * SAMLv2 protocol schema.
038 * <p>
039 * <pre>
040 * &lt;element name="Artifact" type="{http://www.w3.org/2001/XMLSchema}string"/>
041 * </pre>
042 *
043 * @supported.all.api
044 */
045public interface Artifact {
046
047    /**
048     * Returns the artifact.
049     *
050     * @return the value of the artifact. It's <code>Base64</code>
051     *          encoded.
052     */
053    public String getArtifactValue();
054
055    /**
056     * Returns the <code>SourceID</code> of the artifact.
057     *
058     * @return The <code>SourceID</code> of the artifact.
059     */
060    public String getSourceID();
061
062    /**
063     * Returns the <code>MessageHandle</code> of the artifact.
064     *          The result will be decoded.
065     *
066     * @return The <code>MessageHandle</code> of the artifact.
067     */
068    public String getMessageHandle();
069
070    /**
071     * Returns the <code>TypeCode</code> of the artifact.
072     * @return The byte array of the <code>TypeCode</code> for the artifact.
073     */
074    public byte[] getTypeCode();
075
076    /**
077     * Returns the <code>EndpointIndex</code> of the artifact.
078     * @return value of the <code>EndpointIndex</code> for the
079     *          artifact.
080     */
081    public int getEndpointIndex();
082
083    /**
084     * Returns a String representation of the element.
085     *
086     * @return A string containing the valid XML for this element.
087     *          By default name space name is prepended to the element name.
088     * @throws SAML2Exception if the object does not conform to the schema.
089     */
090    public String toXMLString()
091        throws SAML2Exception;
092
093    /**
094     * Returns a String representation of the element.
095     *
096     * @param includeNS Determines whether or not the namespace qualifier is
097     *          prepended to the Element when converted
098     * @param declareNS Determines whether or not the namespace is declared
099     *          within the Element.
100     * @return A string containing the valid XML for this element
101     * @throws SAML2Exception if the object does not conform to the schema.
102     */
103    public String toXMLString(boolean includeNS, boolean declareNS)
104        throws SAML2Exception;
105
106}




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.