public class StorageServiceSAMLArtifactMap extends AbstractInitializableComponent implements SAMLArtifactMap
StorageService
.SAMLArtifactMap.SAMLArtifactMapEntry, SAMLArtifactMap.SAMLArtifactMapEntryFactory
Modifier and Type | Field and Description |
---|---|
static String |
STORAGE_CONTEXT
Storage context label.
|
Constructor and Description |
---|
StorageServiceSAMLArtifactMap()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(String artifact)
Checks if a given artifact has a map entry.
|
protected void |
doInitialize()
Performs the initialization of the component.
|
SAMLArtifactMap.SAMLArtifactMapEntry |
get(String artifact)
Gets the artifact entry for the given artifact.
|
long |
getArtifactLifetime()
Get the artifact entry lifetime in milliseconds.
|
SAMLArtifactMap.SAMLArtifactMapEntryFactory |
getEntryFactory()
Get the map entry factory.
|
org.opensaml.storage.StorageService |
getStorageService()
Get the artifact store.
|
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.
|
void |
setArtifactLifetime(long lifetime)
Set the artifact entry lifetime in milliseconds.
|
void |
setEntryFactory(SAMLArtifactMap.SAMLArtifactMapEntryFactory factory)
Set the map entry factory.
|
void |
setStorageService(org.opensaml.storage.StorageService store)
Set the artifact store.
|
destroy, doDestroy, initialize, isDestroyed, isInitialized
public StorageServiceSAMLArtifactMap()
protected void doInitialize() throws ComponentInitializationException
doInitialize
in class AbstractInitializableComponent
ComponentInitializationException
- thrown if there is a problem initializing the component@NonnullAfterInit public org.opensaml.storage.StorageService getStorageService()
@Positive public long getArtifactLifetime()
@Nonnull public SAMLArtifactMap.SAMLArtifactMapEntryFactory getEntryFactory()
public void setStorageService(@Nonnull org.opensaml.storage.StorageService store)
store
- the artifact storepublic void setArtifactLifetime(@Duration @Positive long lifetime)
lifetime
- artifact entry lifetime in millisecondspublic void setEntryFactory(@Nonnull SAMLArtifactMap.SAMLArtifactMapEntryFactory factory)
In addition to implementing the SAMLArtifactMapEntryFactory
interface, the injected
object must support the StorageSerializer
interface to enable entries to be stored via the injected
StorageService
instance.
factory
- map entry factorypublic boolean contains(@Nonnull @NotEmpty String artifact) throws IOException
contains
in interface SAMLArtifactMap
artifact
- the artifact to checkIOException
- if an error occurs retrieving the information@Nullable public SAMLArtifactMap.SAMLArtifactMapEntry get(@Nonnull @NotEmpty String artifact) throws IOException
get
in interface SAMLArtifactMap
artifact
- the artifact to retrieve the entry forIOException
- if an error occurs retrieving the informationpublic void put(@Nonnull @NotEmpty String artifact, @Nonnull @NotEmpty String relyingPartyId, @Nonnull @NotEmpty String issuerId, @Nonnull SAMLObject samlMessage) throws IOException
put
in interface SAMLArtifactMap
artifact
- the artifactrelyingPartyId
- ID of the party the artifact was sent toissuerId
- ID of the issuer of the artifactsamlMessage
- the SAML messageIOException
- if an error occurs storing the informationpublic void remove(@Nonnull @NotEmpty String artifact) throws IOException
remove
in interface SAMLArtifactMap
artifact
- artifact to be removedIOException
- if an error occurs retrieving the informationCopyright © 2016 JBoss by Red Hat. All rights reserved.