[java-identity-provider COMMIT] in /trunk: idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/navigate/A...

noreply at shibboleth.net noreply at shibboleth.net
Thu May 15 21:59:39 EDT 2014


Author: scantor
Date: Thu May 15 21:59:38 2014
New Revision: 5935

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5935&view=rev
Log:
Some new config lookup functions, and a bit of factoring.

Added:
    trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/navigate/AbstractRelyingPartyLookupFunction.java   (with props)
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/navigate/ProxyAudienceRestrictionsLookupFunction.java   (with props)
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/navigate/ProxyCountLookupFunction.java   (with props)
Modified:
    trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/navigate/IdentifierGenerationStrategyLookupFunction.java
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/config/navigate/DecryptionConfigurationLookupFunction.java
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/config/navigate/EncryptionConfigurationLookupFunction.java
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/config/navigate/SignatureSigningConfigurationLookupFunction.java
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/config/navigate/SignatureValidationConfigurationLookupFunction.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/navigate/AssertionLifetimeLookupFunction.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/navigate/AudienceRestrictionsLookupFunction.java
    trunk/idp-saml-impl/src/main/java/net/shibboleth/idp/saml/profile/config/navigate/SessionLifetimeLookupFunction.java

Modified: trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/navigate/IdentifierGenerationStrategyLookupFunction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/navigate/IdentifierGenerationStrategyLookupFunction.java?rev=5935&r1=5934&r2=5935&view=diff
==============================================================================
--- trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/navigate/IdentifierGenerationStrategyLookupFunction.java (original)
+++ trunk/idp-profile-api/src/main/java/net/shibboleth/idp/profile/config/navigate/IdentifierGenerationStrategyLookupFunction.java Thu May 15 21:59:38 2014
@@ -17,19 +17,13 @@
 
 package net.shibboleth.idp.profile.config.navigate;
 
-import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 
 import net.shibboleth.idp.profile.config.ProfileConfiguration;
 import net.shibboleth.idp.profile.context.RelyingPartyContext;
-import net.shibboleth.utilities.java.support.logic.Constraint;
 import net.shibboleth.utilities.java.support.security.IdentifierGenerationStrategy;
 
-import org.opensaml.messaging.context.navigate.ChildContextLookup;
-import org.opensaml.messaging.context.navigate.ContextDataLookupFunction;
 import org.opensaml.profile.context.ProfileRequestContext;
-
-import com.google.common.base.Function;
 
 /**
  * A function that returns an {@link IdentifierGenerationStrategy} by way of a {@link RelyingPartyContext}
@@ -38,49 +32,25 @@
  * <p>If a specific setting is unavailable, a default generator can be returned.</p>
  */
 public class IdentifierGenerationStrategyLookupFunction
-        implements ContextDataLookupFunction<ProfileRequestContext,IdentifierGenerationStrategy> {
+        extends AbstractRelyingPartyLookupFunction<IdentifierGenerationStrategy> {
     
     /** Default strategy to return. */
     @Nullable private IdentifierGenerationStrategy defaultGenerator;
-
-    /**
-     * Strategy used to locate the {@link RelyingPartyContext} associated with a given {@link ProfileRequestContext}.
-     */
-    @Nonnull private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy;
-    
-    /** Constructor. */
-    public IdentifierGenerationStrategyLookupFunction() {
-        relyingPartyContextLookupStrategy = new ChildContextLookup<>(RelyingPartyContext.class);
-    }
     
     /**
      * Set the default {@link IdentifierGenerationStrategy} to return.
      * 
      * @param strategy  default generation strategy;
      */
-    public synchronized void setDefaultIdentifierGenerationStrategy(
-            @Nullable final IdentifierGenerationStrategy strategy) {
+    public void setDefaultIdentifierGenerationStrategy(@Nullable final IdentifierGenerationStrategy strategy) {
         defaultGenerator = strategy;
-    }
-
-    /**
-     * Sets the strategy used to locate the {@link RelyingPartyContext} associated with a given
-     * {@link ProfileRequestContext}.
-     * 
-     * @param strategy strategy used to locate the {@link RelyingPartyContext} associated with a given
-     *            {@link ProfileRequestContext}
-     */
-    public synchronized void setRelyingPartyContextLookupStrategy(
-            @Nonnull final Function<ProfileRequestContext,RelyingPartyContext> strategy) {
-        relyingPartyContextLookupStrategy =

[... 315 lines stripped ...]


More information about the commits mailing list