com.sun.identity.saml.protocol
Class AssertionArtifact

java.lang.Object
  |
  +--com.sun.identity.saml.protocol.AssertionArtifact

public class AssertionArtifact
extends java.lang.Object

This class represents the AssertionArtifact element in SAML protocol schema. Current implementation supports TYPE 1 artifact only. Other type of artifact can be supported by extending this class.


Field Summary
static int ARTIFACT_1_LENGTH
           
static byte[] ARTIFACT_1_TYPE_CODE
           
static byte ARTIFACT_1_TYPE_CODE_0
           
static byte ARTIFACT_1_TYPE_CODE_1
           
 
Constructor Summary
AssertionArtifact(java.lang.String theArtifact)
          This constructor is used to construct an assertion artifact.
AssertionArtifact(java.lang.String id, java.lang.String handle)
          This constructor will be used at the sender side to create a new AssertionArtifact.
 
Method Summary
 java.lang.String getAssertionArtifact()
          Gets the artifact.
 java.lang.String getAssertionHandle()
          Gets the AssertionHandle of the artifact.
 java.lang.String getSourceID()
          Gets the SourceID of the artifact.
 byte[] getTypeCode()
          Gets the typeCode of the artifact.
 java.lang.String toString()
          This method translates the AssertionArtifact to an XML document String based on the SAML schema.
 java.lang.String toString(boolean includeNS, boolean declareNS)
          Creates a String representation of the <samlp:AssertionArtifact> element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ARTIFACT_1_LENGTH

public static final int ARTIFACT_1_LENGTH

ARTIFACT_1_TYPE_CODE_0

public static final byte ARTIFACT_1_TYPE_CODE_0

ARTIFACT_1_TYPE_CODE_1

public static final byte ARTIFACT_1_TYPE_CODE_1

ARTIFACT_1_TYPE_CODE

public static final byte[] ARTIFACT_1_TYPE_CODE
Constructor Detail

AssertionArtifact

public AssertionArtifact(java.lang.String theArtifact)
                  throws SAMLException
This constructor is used to construct an assertion artifact.
Parameters:
theArtifact - is the string that is generated by a provider.
Throws:
SAMLException - if an error occurs.

AssertionArtifact

public AssertionArtifact(java.lang.String id,
                         java.lang.String handle)
                  throws SAMLException
This constructor will be used at the sender side to create a new AssertionArtifact.
Parameters:
id - A string that represents the sourceID.
handle - A string that represents the assertionHandle.
Throws:
SAMLException - if wrong input or couldn't encode the artifact.
Method Detail

getAssertionArtifact

public java.lang.String getAssertionArtifact()
Gets the artifact.
Returns:
the string format of the artifact. It's base64 encoded.

getSourceID

public java.lang.String getSourceID()
Gets the SourceID of the artifact.
Returns:
The SourceID of the artifact.

getAssertionHandle

public java.lang.String getAssertionHandle()
Gets the AssertionHandle of the artifact. The result will be decoded.
Returns:
The AssertionHandle of the artifact.

getTypeCode

public byte[] getTypeCode()
Gets the typeCode of the artifact.
Returns:
The byte array of the TypeCode for the artifact.

toString

public java.lang.String toString()
This method translates the AssertionArtifact to an XML document String based on the SAML schema.
Overrides:
toString in class java.lang.Object
Returns:
An XML String representing the AssertionArtifact.

toString

public java.lang.String toString(boolean includeNS,
                                 boolean declareNS)
Creates a String representation of the <samlp:AssertionArtifact> element.
Parameters:
IncludeNS - : Determines whether or not the namespace qualifier is prepended to the Element when converted
DeclareNS - : Determines whether or not the namespace is declared within the Element.
Returns:
A string containing the valid XML for this element