[java-identity-provider COMMIT] /trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ar/AttributeReleaseC...
noreply at shibboleth.net
noreply at shibboleth.net
Tue Nov 11 09:48:26 EST 2014
Author: rdw
Date: Tue Nov 11 09:48:26 2014
New Revision: 6877
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6877&view=rev
Log:
Add setters for strategies. Just in case
Modified:
trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ar/AttributeReleaseConsentFunction.java
Modified: trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ar/AttributeReleaseConsentFunction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ar/AttributeReleaseConsentFunction.java?rev=6877&r1=6876&r2=6877&view=diff
==============================================================================
--- trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ar/AttributeReleaseConsentFunction.java (original)
+++ trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/ar/AttributeReleaseConsentFunction.java Tue Nov 11 09:48:26 2014
@@ -33,6 +33,7 @@
import net.shibboleth.idp.consent.flow.ConsentFlowDescriptor;
import net.shibboleth.idp.consent.logic.AttributeValuesHashFunction;
import net.shibboleth.idp.consent.logic.FlowDescriptorLookup;
+import net.shibboleth.utilities.java.support.logic.Constraint;
import org.opensaml.messaging.context.navigate.ChildContextLookup;
import org.opensaml.profile.context.ProfileRequestContext;
@@ -67,8 +68,52 @@
hashFunction = new AttributeValuesHashFunction();
}
+ /**
+ * Set the ConsentContextLookupStrategy.
+ *
+ * @param what what to set.
+ */
+ public void setConsentContextLookupStrategy(
+ @Nonnull Function<ProfileRequestContext, ConsentContext> what) {
+ consentContextLookupStrategy =
+ Constraint.isNotNull(what, "ConsentContextLookupStrategy must be non-null");
+ }
+
+ /**
+ * Set the ConsentFlowDescriptorLookupStrategy.
+ *
+ * @param what what to set.
+ */
+ public void setConsentFlowDescriptorLookupStrategy(
+ @Nonnull Function<ProfileRequestContext, ConsentFlowDescriptor> what) {
+ consentFlowDescriptorLookupStrategy =
+ Constraint.isNotNull(what, "ConsentFlowDescriptorLookupStrategy must be non-null");
+ }
+
+ /**
+ * Set the AttributeReleaseContextLookupStrategy.
+ *
+ * @param what what to set.
+ */
+ public void setAttributeReleaseContextLookupStrategy(
+ @Nonnull Function<ProfileRequestContext, AttributeReleaseContext> what) {
+ attributeReleaseContextLookupStrategy =
+ Constraint.isNotNull(what, "AttributeReleaseContextLookupStrategy must be non-null");
+ }
+
+ /**
+ * Set the HashFunction.
+ *
+ * @param what what to set.
+ */
+ public void setHashFunction(
+ @Nonnull Function<Collection<IdPAttributeValue<?>>, String> what) {
+ hashFunction =
+ Constraint.isNotNull(what, "HashFunction must be non-null");
+ }
+
/** {@inheritDoc} */
- @Nullable public Map<String, Consent> apply(@Nullable final ProfileRequestContext input) {
+ @Override @Nullable public Map<String, Consent> apply(@Nullable final ProfileRequestContext input) {
if (input == null) {
return null;
}
More information about the commits
mailing list