org.opensaml.common.binding.artifact
Class BasicSAMLArtifactMap

java.lang.Object
  extended by org.opensaml.common.binding.artifact.BasicSAMLArtifactMap
All Implemented Interfaces:
SAMLArtifactMap

public class BasicSAMLArtifactMap
extends java.lang.Object
implements SAMLArtifactMap

Basic artifact map implementation that uses a StorageService to store and retrieve artifacts.


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.opensaml.common.binding.artifact.SAMLArtifactMap
SAMLArtifactMap.SAMLArtifactMapEntry
 
Constructor Summary
BasicSAMLArtifactMap(org.opensaml.xml.parse.ParserPool parser, org.opensaml.util.storage.StorageService<java.lang.String,SAMLArtifactMap.SAMLArtifactMapEntry> storage, long lifetime)
          Constructor.
BasicSAMLArtifactMap(org.opensaml.util.storage.StorageService<java.lang.String,SAMLArtifactMap.SAMLArtifactMapEntry> storage, java.lang.String storageParition, long lifetime)
          Constructor.
 
Method Summary
 boolean contains(java.lang.String artifact)
          Checks if a given artifact has a map entry.
 SAMLArtifactMap.SAMLArtifactMapEntry get(java.lang.String artifact)
          Gets the artifact entry for the given artifact.
 void put(java.lang.String artifact, java.lang.String relyingPartyId, java.lang.String issuerId, SAMLObject samlMessage)
          Creates a mapping between a given artifact and the SAML message to which it maps.
 void remove(java.lang.String artifact)
          Removes the artifact from this map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicSAMLArtifactMap

public BasicSAMLArtifactMap(org.opensaml.xml.parse.ParserPool parser,
                            org.opensaml.util.storage.StorageService<java.lang.String,SAMLArtifactMap.SAMLArtifactMapEntry> storage,
                            long lifetime)
Constructor.

Parameters:
parser - parser pool used to parse serialized messages
storage - artifact mapping storage
lifetime - lifetime of an artifact in milliseconds

BasicSAMLArtifactMap

public BasicSAMLArtifactMap(org.opensaml.util.storage.StorageService<java.lang.String,SAMLArtifactMap.SAMLArtifactMapEntry> storage,
                            java.lang.String storageParition,
                            long lifetime)
Constructor.

Parameters:
storage - artifact mapping storage
storageParition - name of storage service partition to use
lifetime - lifetime of an artifact in milliseconds
Method Detail

contains

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

Specified by:
contains in interface SAMLArtifactMap
Parameters:
artifact - the artifact to check
Returns:
true of this map has an entry for the given artifact, false it not

get

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

Specified by:
get in interface SAMLArtifactMap
Parameters:
artifact - the artifact to retrieve the entry for
Returns:
the entry or null if the artifact has already expired or did not exist

put

public void put(java.lang.String artifact,
                java.lang.String relyingPartyId,
                java.lang.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.

Specified by:
put in interface SAMLArtifactMap
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

remove

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

Specified by:
remove in interface SAMLArtifactMap
Parameters:
artifact - artifact to be removed


Copyright © 2006-2011 Internet2. All Rights Reserved.