[java-identity-provider COMMIT] in /trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn: AbstractExtractionAct...

noreply at shibboleth.net noreply at shibboleth.net
Fri Feb 14 22:07:25 EST 2014


Author: scantor
Date: Fri Feb 14 22:07:24 2014
New Revision: 5384

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5384&view=rev
Log:
Allow for generic typing in derived actions.

Modified:
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractExtractionAction.java
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractExtractionAction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractExtractionAction.java?rev=5384&r1=5383&r2=5384&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractExtractionAction.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractExtractionAction.java Fri Feb 14 22:07:24 2014
@@ -40,12 +40,16 @@
  * A base class for authentication actions that extract usernames for subsequent use.
  * 
  * <p>The base class adds a common mechanism for applying regular expression transforms to
- * the username prior to being added to the context tree. 
+ * the username prior to being added to the context tree.</p>
+ *  
+ * @param <InboundMessageType> type of in-bound message
+ * @param <OutboundMessageType> type of out-bound message
  */
-public abstract class AbstractExtractionAction extends AbstractAuthenticationAction {
+public abstract class AbstractExtractionAction<InboundMessageType, OutboundMessageType>
+        extends AbstractAuthenticationAction<InboundMessageType, OutboundMessageType> {
 
     /** Class logger. */
-    private final Logger log = LoggerFactory.getLogger(AbstractExtractionAction.class);
+    @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractExtractionAction.class);
     
     /** Match patterns and replacement strings to apply. */
     @Nonnull @NonnullElements private List<Pair<Pattern,String>> transforms;
@@ -61,8 +65,6 @@
     
     /** Constructor. */
     public AbstractExtractionAction() {
-        super();
-
         transforms = Collections.emptyList();
         
         uppercase = false;

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java?rev=5384&r1=5383&r2=5384&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractSubjectCanonicalizationAction.java Fri Feb 14 22:07:24 2014
@@ -54,12 +54,16 @@
  * Authentication action implementations should override
  * {@link #doExecute(ProfileRequestContext, SubjectCanonicalizationContext)}
  * 
+ * @param <InboundMessageType> type of in-bound message
+ * @param <OutboundMessageType> type of out-bound message
+ * 
  * @event {@link AuthnEventIds#INVALID_SUBJECT_C14N_CTX}
  */
-public abstract class AbstractSubjectCanonicalizationAction extends AbstractProfileAction {
+public abstract class AbstractSubjectCanonicalizationAction<InboundMessageType, OutboundMessageType>
+        extends AbstractProfileAction<InboundMessageType, OutboundMessageType> {
 
     /** Class logger. */
-    private final Logger log = LoggerFactory.getLogger(AbstractSubjectCanonicalizationAction.class);
+    @Nonnull private final Logger log = LoggerFactory.getLogger(AbstractSubjectCanonicalizationAction.class);
     
     /**
      * Strategy used to find the {@link SubjectCanonicalizationContext} from the
@@ -156,7 +160,9 @@
     
     /** {@inheritDoc} */
     @Override
-    protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext) throws ProfileException {
+    protected boolean doPreExecute(
+            @Nonnull final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext)
+                    throws ProfileException {
         scContext = scCtxLookupStrategy.apply(profileRequestContext);
         if (scContext == null) {
             ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.INVALID_SUBJECT_C14N_CTX);
@@ -181,14 +187,17 @@
      * 
      * @throws SubjectCanonicalizationException thrown if there is a problem performing the authentication action
      */
-    protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext,
+    protected boolean doPreExecute(
+            @Nonnull final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext,
             @Nonnull final SubjectCanonicalizationContext c14nContext) throws SubjectCanonicalizationException {
         return c14nContext.getSubject() != null;
     }

[... 115 lines stripped ...]


More information about the commits mailing list