org.opensaml.common.binding.artifact
Interface SAMLArtifactMap

All Known Implementing Classes:
BasicSAMLArtifactMap

public interface SAMLArtifactMap

Maps an artifact to a SAML message and back again. Artifacts must be thread safe. An implementation of this interface MUST ensure that the persisted SAML message is no longer tied to any parent XMLObject that may have contained it. This ensure it can be safely added to another object once retrieved from the map. The easiest way to do this is to serailize the message out in to a string and re-parse and unmarhsall it again once retrieved from the underlying data store.


Nested Class Summary
static interface SAMLArtifactMap.SAMLArtifactMapEntry
          Represents a mapping between an artifact a SAML message with some associated metadata.
 
Method Summary
 boolean contains(String artifact)
          Checks if a given artifact has a map entry.
 SAMLArtifactMap.SAMLArtifactMapEntry get(String artifact)
          Gets the artifact entry for the given artifact.
 void put(String artifact, String relyingPartyId, String issuerId, SAMLObject samlMessage)
          Creates a mapping between a given artifact and the SAML message to which it maps.
 void remove(String artifact)
          Removes the artifact from this map.
 

Method Detail

contains

boolean contains(String artifact)
Checks if a given artifact has a map entry.

Parameters:
artifact - the artifact to check
Returns:
true of this map has an entry for the given artifact, false it not

put

void put(String artifact,
         String relyingPartyId,
         String issuerId,
         SAMLObject samlMessage)
         throws org.opensaml.xml.io.MarshallingException
Creates a mapping between a given artifact and the SAML message to which it maps.

Parameters:
artifact - the artifact
relyingPartyId - ID of the party the artifact was sent to
issuerId - ID of the issuer of the artifact
samlMessage - the SAML message
Throws:
org.opensaml.xml.io.MarshallingException - thrown if the given SAML message can not be marshalled

get

SAMLArtifactMap.SAMLArtifactMapEntry get(String artifact)
Gets the artifact entry for the given artifact.

Parameters:
artifact - the artifact to retrieve the entry for
Returns:
the entry or null if the artifact has already expired or did not exist

remove

void remove(String artifact)
Removes the artifact from this map.

Parameters:
artifact - artifact to be removed


Copyright © 2006-2010 Internet2. All Rights Reserved.