public class StoredPersistentIdGenerationStrategy extends AbstractInitializableComponent implements PersistentIdGenerationStrategy
PersistentIdStore, generating them either randomly or via a
ComputedPersistentIdGenerationStrategy (for compatibility with existing data).| Modifier and Type | Field and Description |
|---|---|
private ComputedPersistentIdGenerationStrategy |
computedIdStrategy
Optional generator of computed ID values.
|
private DataSource |
dataSource
A DataSource to auto-provision a
JDBCPersistentIdStoreEx instance. |
private PersistentIdStore |
deprecatedStore
Deprecated version of persistent identifier data store.
|
private org.slf4j.Logger |
log
Class logger.
|
private PersistentIdStoreEx |
pidStore
Updated version of persistent identifier data store layer.
|
| Constructor and Description |
|---|
StoredPersistentIdGenerationStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doInitialize() |
String |
generate(String assertingPartyId,
String relyingPartyId,
String principalName,
String sourceId)
Get a Persistent ID that corresponds to the inputs.
|
void |
setComputedIdStrategy(ComputedPersistentIdGenerationStrategy strategy)
Set a strategy to use to compute IDs for the first time.
|
void |
setDataSource(DataSource source)
Set a data source to inject into an auto-provisioned instance of
JDBCPersistentIdStoreEx
to use as the storage strategy. |
void |
setIDStore(IPersistentIdStore store)
Set an
IPersistentIdStore used to store the IDs. |
destroy, doDestroy, initialize, isDestroyed, isInitialized@Nonnull private final org.slf4j.Logger log
@NonnullAfterInit private PersistentIdStoreEx pidStore
@Nullable private DataSource dataSource
JDBCPersistentIdStoreEx instance.@Nullable private PersistentIdStore deprecatedStore
@Nullable private ComputedPersistentIdGenerationStrategy computedIdStrategy
public StoredPersistentIdGenerationStrategy()
public void setIDStore(@Nullable IPersistentIdStore store)
IPersistentIdStore used to store the IDs.
The marker interface is used, allowing injection of either the broken or the updated version of the interface.
store - the ID store to usepublic void setDataSource(@Nullable DataSource source)
JDBCPersistentIdStoreEx
to use as the storage strategy.source - the data sourcepublic void setComputedIdStrategy(@Nullable ComputedPersistentIdGenerationStrategy strategy)
strategy - computed ID strategyprotected void doInitialize()
throws ComponentInitializationException
doInitialize in class AbstractInitializableComponentComponentInitializationException@Nonnull @NotEmpty public String generate(@Nonnull@NotEmpty String assertingPartyId, @Nonnull@NotEmpty String relyingPartyId, @Nonnull@NotEmpty String principalName, @Nonnull@NotEmpty String sourceId) throws org.opensaml.saml.common.SAMLException
This may be generated directly from the inputs or retrieved from some other source.
generate in interface PersistentIdGenerationStrategyassertingPartyId - the asserting party providing the identifierrelyingPartyId - the relying party for whom we're obtaining the identifierprincipalName - name of the subjectsourceId - an underlying identifier for the subjectorg.opensaml.saml.common.SAMLException - if an error occurs generating the identifierCopyright © 1999–2017 Shibboleth Consortium. All rights reserved.