[java-identity-provider COMMIT] in /trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor: Abst...

noreply at shibboleth.net noreply at shibboleth.net
Thu Sep 25 18:21:19 EDT 2014


Author: tzeller
Date: Thu Sep 25 18:21:19 2014
New Revision: 6575

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6575&view=rev
Log:
Checkpoint work on profile interceptor result.

Added:
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/AbstractProfileInterceptorResult.java   (with props)
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorResult.java   (with props)
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/WriteProfileInterceptorResultToStorage.java   (with props)
Modified:
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorContext.java
    trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorFlowDescriptor.java

Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorContext.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorContext.java?rev=6575&r1=6574&r2=6575&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorContext.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorContext.java Thu Sep 25 18:21:19 2014
@@ -25,6 +25,7 @@
 
 import net.shibboleth.utilities.java.support.annotation.constraint.Live;
 import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
+import net.shibboleth.utilities.java.support.logic.Constraint;
 
 import org.opensaml.messaging.context.BaseContext;
 
@@ -43,8 +44,12 @@
     /** Flows that have been attempted, successfully or otherwise, without producing a completed result. */
     @Nonnull @NonnullElements private final Map<String, ProfileInterceptorFlowDescriptor> intermediateFlows;
 
+    /** The result of the flow. */
+    @Nullable private ProfileInterceptorResult result;
+
     /** Constructor. */
     public ProfileInterceptorContext() {
+        // TODO nonnull element constraints
         intermediateFlows = new LinkedHashMap<>();
         availableFlows = new LinkedHashMap<>();
     }
@@ -84,4 +89,22 @@
     @Nonnull @NonnullElements @Live public Map<String, ProfileInterceptorFlowDescriptor> getIntermediateFlows() {
         return intermediateFlows;
     }
+
+    /**
+     * Get the result.
+     * 
+     * @return the result
+     */
+    @Nullable public ProfileInterceptorResult getResult() {
+        return result;
+    }
+
+    /**
+     * Set the result.
+     * 
+     * @param interceptorResult the result
+     */
+    public void setResult(@Nonnull final ProfileInterceptorResult interceptorResult) {
+        result = Constraint.isNotNull(interceptorResult, "Interceptor result cannot be null");
+    }
 }

Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorFlowDescriptor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorFlowDescriptor.java?rev=6575&r1=6574&r2=6575&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorFlowDescriptor.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/interceptor/ProfileInterceptorFlowDescriptor.java Thu Sep 25 18:21:19 2014
@@ -18,13 +18,18 @@
 package net.shibboleth.idp.profile.interceptor;
 
 import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
 
+import net.shibboleth.utilities.java.support.annotation.constraint.NonnullAfterInit;
 import net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent;
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
 import org.opensaml.profile.context.ProfileRequestContext;
+import org.opensaml.storage.StorageSerializer;
+import org.opensaml.storage.StorageService;
 
+import com.google.common.base.Function;
 import com.google.common.base.MoreObjects;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
@@ -44,6 +49,18 @@
     /** Predicate that must be true for this flow to be usable for a given request. */
     @Nonnull private Predicate<ProfileRequestContext> activationCondition;
 
+    /** Custom serializer for the results generated by this flow. */
+    @Nullable private StorageSerializer<ProfileInterceptorResult> resultSerializer;
+
+    /** Storage service for the results generated by this flow. */
+    @Nullable private StorageService storageService;
+
+    /** Strategy used to determine the storage key. */
+    @Nullable private Function<ProfileRequestContext, String> storageKeyLookupStrategy;
+

[... 96 lines stripped ...]


More information about the commits mailing list